Jelmer Vernooij wrote:
[…]
> There are a few places where I do actually do fairly expensive things in
> assert statements that I would like to disable for production users. How
> does Bazaar handle that sort of situation?
I agree with John's mail, but I think also the key issue is that
“users/environments that use python -O or not” is not very well
correlated with “is production user/environment or not”.
So triggering these extra runtime checks is probably better done by an
explicit debug flag, or perhaps by checking the version_info to see if
this is a dev/beta vs. final/pre release, etc.
The question of when it's appropriate to emit warnings intended for
developers (API deprecations and the like) is probably closely related.
Jelmer Vernooij wrote:
[…]
> There are a few places where I do actually do fairly expensive things in
> assert statements that I would like to disable for production users. How
> does Bazaar handle that sort of situation?
I agree with John's mail, but I think also the key issue is that
“users/environments that use python -O or not” is not very well
correlated with “is production user/environment or not”.
So triggering these extra runtime checks is probably better done by an
explicit debug flag, or perhaps by checking the version_info to see if
this is a dev/beta vs. final/pre release, etc.
The question of when it's appropriate to emit warnings intended for
developers (API deprecations and the like) is probably closely related.