[Zope3-checkins] SVN: zope.testing/trunk/src/zope/testing/doctest Show the deprecation warning at the spot where the module is imported.
Marius Gedminas
marius at pov.lt
Tue Dec 22 04:22:06 EST 2009
Log message for revision 106860:
Show the deprecation warning at the spot where the module is imported.
Changed:
U zope.testing/trunk/src/zope/testing/doctest.py
U zope.testing/trunk/src/zope/testing/doctestunit.py
-=-
Modified: zope.testing/trunk/src/zope/testing/doctest.py
===================================================================
--- zope.testing/trunk/src/zope/testing/doctest.py 2009-12-22 09:16:42 UTC (rev 106859)
+++ zope.testing/trunk/src/zope/testing/doctest.py 2009-12-22 09:22:05 UTC (rev 106860)
@@ -107,7 +107,8 @@
# Tell people to use the builtin module instead.
warnings.warn('zope.testing.doctest is deprecated in favour of '
- 'the Python standard library doctest module', DeprecationWarning)
+ 'the Python standard library doctest module', DeprecationWarning,
+ stacklevel=2)
class UnusedFootnoteWarning(Warning):
"""Warn about a footnote that is defined, but never referenced."""
Modified: zope.testing/trunk/src/zope/testing/doctestunit.py
===================================================================
--- zope.testing/trunk/src/zope/testing/doctestunit.py 2009-12-22 09:16:42 UTC (rev 106859)
+++ zope.testing/trunk/src/zope/testing/doctestunit.py 2009-12-22 09:22:05 UTC (rev 106860)
@@ -21,7 +21,8 @@
import warnings
warnings.warn('zope.testing.doctestunit is deprecated in favour of '
- 'the Python standard library doctest module', DeprecationWarning)
+ 'the Python standard library doctest module', DeprecationWarning,
+ stacklevel=2)
from doctest import DocFileSuite, DocTestSuite
from doctest import debug_src, debug
More information about the Zope3-Checkins
mailing list