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

Benji York benji at zope.com
Tue Jan 26 08:11:58 EST 2010


On Tue, Jan 26, 2010 at 7:49 AM, Marius Gedminas <marius at gedmin.as> wrote:
> 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'

> Ideas?

It's not real pretty, but you can do absolute imports in Python 2.4 like
so:

import imp

name = 'doctest'
doctest = imp.load_module(name, *imp.find_module(name))

Manuel uses this technique to import doctest (Manuel also has a
submodule named "doctest").
-- 
Benji York


More information about the Zope-Dev mailing list