Tres Seaver wrote:
Note that I have just figured out that we can make DeprecationWarnings more useful by passing the 'stacklevel' argument to 'warnings.warn'; passing a value of 2 for that argument causes the warning to be reported against the *caller* of the code issuing the warning, which makes it possible to find and remove the deprecated use.
Oooh, coool. Reckon it'd be a good idea if I changed all the deprecation warnings in Zope to do the same?
I've always found them totally useless 'cos they don't tell you where they come from and so you can't fix them...
Bit like the random ZODB errors when it no longer has the class for some long-forgotten object burried deep in an opaque pickled data structure which you have no hope of ever finding and deleting... but I digress ;-)
cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk _______________________________________________ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests