On Jan 26, 2010, at 7:49 AM, Marius Gedminas wrote: > I got tired of seeing things like > > /home/mg/tmp/buildout-eggs/zope.testing-3.8.6-py2.5.egg/zope/testing/testrunner/debug.py:23: > DeprecationWarning: zope.testing.doctest is deprecated in favour of the > Python standard library doctest module > from zope.testing import doctest > > and since zope.testing's trunk hasn't got the problem fully licked yet > (importing zope.testing.renormalizing causes a deprecation warning > about zope.testing.doctest), I created a 3.8 branch based on the last > public zope.testing release (3.8.6), downgraded the DeprecationWarning > into a PendingDeprecationWarning, and released zope.testing 3.8.7. > > zope.testing's trunk is henceforth known as 3.9.0pre. Any ideas about > fixing the deprecation warning caused by renormalizing.py? All it does > is > > 'import doctest' > > which, due to Python's unfortunate import semantics, is interpreted as > > 'from zope.testing import doctest' > > Perhaps a > > from __future__ import absolute_import > > would help at the top? But it's only availably starting from Python > 2.5, and I think zope.testing wants to be compatible with Python 2.4 > too. > > Ideas?
There's always the pre-2.5 icky __import__ hack for this if you need it. You probably know it, or I can look it up if you want, but that's the only approach I know of for this kind of issue in pre-2.5 Gary _______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )