Re: zope.testing 3.8.7: downgrade the deprecation warning

Benji York <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <[email protected]>
On Tue, Jan 26, 2010 at 7:49 AM, Marius Gedminas <[email protected]> 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
_______________________________________________
Zope-Dev maillist  -  [email protected]
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 )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.