[Python-Dev] 'warnings' module changes still breaking Twisted, still looking for a fix

glyph at divmod.com glyph at divmod.com
Fri Sep 5 00:11:53 CEST 2008


With the 2.6 final release impending, the Twisted community buildbot is 
still red, <http://bit.ly/zFymN>, but there only seems to be one real 
issue: the warn_explicit change.  This seems like it could be a pretty 
minor bit of maintenance to clear up on our end, if Python provided the 
appropriate hook.

The current solution we have in mind for this problem is to build our 
own warnings module <http://bit.ly/4F3Qr2>, but that is obviously 
inelegant.  While we do want to experiment with our own features for 
deprecation, users of Twisted will (rightfully) expect our "assertWarns" 
to continue covering warnings produced by the Python 2.6 warnings 
system.

The proposed solution to this problem seems to have been 
"warnings.catch_warnings()" <http://bugs.python.org/issue3602>, but it 
is insufficient for testing, since subsequent calls to 
"catch_warnings()" will not catch warnings suppressed by duplication 
suppression; without even getting into multiple tests testing the same 
code path, this breaks features like our 'trial' tool's "--until- 
failure" option, which runs a fixed group of tests repeatedly in an 
attempt to flush out buggy tests which have race conditions that cause 
them to fail intermittently.

We thought we'd filed a ticket for this before, but searching around in 
the issue tracker hasn't come up with anything.  JP Calderone has filed 
a new ticket for this problem: <http://bugs.python.org/issue3780> .

Any chance this could be made into a release blocker?  If this one issue 
were fixed, Python 2.6 would be the smallest disruption to Twisted since 
Python 2.0 :-).


More information about the Python-Dev mailing list