[Zope-dev] zope.testing 3.8.6 emits deprecation warnings from itself?

Marius Gedminas marius at gedmin.as
Tue Dec 29 17:47:44 EST 2009


On Tue, Dec 29, 2009 at 10:55:37PM +0100, Fabio Tranchitella wrote:
> * 2009-12-29 21:54, Marius Gedminas wrote:
> >   * Fabio Tranchitella is working to make the zope.testing.doctest
> >     deprecation warning useful by doing scary things like converting
> >     zope.testing.doctest from a module into a package that has all the
> >     code in __init__.py.  He asked for a review of his changes.  I'm too
> >     scared to do that.
> > 
> >   * Meanwhile there are discussions about issues switching from old
> >     zope.testing.doctest to stdlib's doctest with Windows and newlines.
> 
> Note that the current trunk of zope.testing is already using the standard
> doctest; zope.testing.doctest is still there for backward compatibility,
> and emits a single deprecation warning at import time. We were considering
> about switching to a deprecation warning issued at each usage of
> zope.testing.doctest.{DocFileSuite,DocTestSuite}, though.
> 
> I tested the whole ZTK (hey, with the zope.app.* packages too :)) and
> there were no regressions.

That's kinda reassuring, but ZTK is a (small) subset of packages that
rely on zope.testing.

I don't know enough about the differences between stdlib's doctest.py
(in its various Python 2.4/2.5/2.6 incarnations) and
zope.testing.doctest, other than that I've seen diffs, they were
non-trivial, with bugfixes and new features; I've heard about
monkey-patching the stdlib's doctest.py (which fills me with dread; when
exactly is the monkey-patching performed?), and I'd rather not touch the
issue without either complete understanding or a very large test suite
(all of the packages that were in the Zope 3 KGS at the very least) run
on various platforms.

> I'd love if somebody would review my changes, though, and help me to make a
> release.

Where are the changes, again?  Are you talking about r107023?
http://zope3.pov.lt/trac/changeset/107023/zope.testing/trunk

Ah, I understand the point of putting code into __init__.py now!
Clever.

+1 for all the changes, but AFAICS if people move from
zope.testing.doctest to stdlib's doctest they lose at least two things:

  * custom doctest exception formatting

  * support for the INTERPRET_FOOTNOTES feature

and since zope.testing.doctest still reimplements large bits of doctest,
I don't know what other bugfixes might be lost too (like the universal
newline thing that punishes people for daring to release packages from
Windows machines).

Overall, I'm still -1 for deprecating zope.testing.doctest at this point.
A PendingDeprecationWarning would be more appropriate, IMHO.

Cheers!
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/20091230/04e7d5f4/attachment.bin 


More information about the Zope-Dev mailing list