[MERGE] Add test framework for checking code that raises python warnings

Martin Pool mbp at sourcefrog.net
Thu Oct 25 01:18:03 BST 2007


> I think the LockWarning is for developers.

What's a LockWarning?

> We may want an env var that
> developers can set, so that you can see things like this.

Yes, I was thinking that we probably do want an "I'm a developer (and
I'm ok)" mode, controlled by an environment variable or config option.
 This would let us avoid showing messages to users that they cannot
reasonably do anything about.

The downside is that if there is a bad situation hit rarely, getting a
warning may prompt users to send mail and tell us about it.

> I'm not sure that this patch actually provides a lot (since nobody is actually
> using callCatchWarnings), but it does seem reasonable, and it has tests.

Indeed, it is not used.  I put it up separately for easy review as
preparation for making unlock raise a warning if a write group is
open, but after talking to Robert decided to keep it as an error.
(Separate patch to follow.)

I think this should still merge because people do sometimes want to
signal warnings at particular times, and at the moment there is no
straightforward way to test that it actually worked.

-- 
Martin



More information about the bazaar mailing list