[Zope-dev] zope.testing 3.8.7: downgrade the deprecation warning

Marius Gedminas marius at gedmin.as
Tue Jan 26 07:49:48 EST 2010


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?

Marius Gedminas
-- 
http://pov.lt/ -- Zope 3 consulting and development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20100126/5c8e385c/attachment.bin 


More information about the Zope-Dev mailing list