Comment 10 for bug 737936

Revision history for this message
Andrew Bennetts (spiv) wrote : Re: [Bug 737936] Re: ValueError parsing git-unpeel-map

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.