From eee3d3bf70fe806d7e2d65aab4aec928c806ba8d 2013-04-04 11:51:12 From: Thomas Kluyver Date: 2013-04-04 11:51:12 Subject: [PATCH] Document need to call doctest_reload() with older Python versions --- diff --git a/IPython/utils/doctestreload.py b/IPython/utils/doctestreload.py index 1b0d365..0daac62 100644 --- a/IPython/utils/doctestreload.py +++ b/IPython/utils/doctestreload.py @@ -52,13 +52,13 @@ def doctest_reload(): - imports doctest but does NOT reload it (see below). - resets its global 'master' attribute to None, so that multiple uses of - the module interactively don't produce cumulative reports. + the module interactively don't produce cumulative reports. - Monkeypatches its core test runner method to protect it from IPython's - modified displayhook. Doctest expects the default displayhook behavior - deep down, so our modification breaks it completely. For this reason, a - hard monkeypatch seems like a reasonable solution rather than asking - users to manually use a different doctest runner when under IPython. + modified displayhook. Doctest expects the default displayhook behavior + deep down, so our modification breaks it completely. For this reason, a + hard monkeypatch seems like a reasonable solution rather than asking + users to manually use a different doctest runner when under IPython. Notes ----- diff --git a/docs/source/whatsnew/development.txt b/docs/source/whatsnew/development.txt index 70a35f1..6913544 100644 --- a/docs/source/whatsnew/development.txt +++ b/docs/source/whatsnew/development.txt @@ -40,3 +40,7 @@ Backwards incompatible changes :mod:`IPython.lib.inputhook`. * For all kernel managers, the ``sub_channel`` attribute has been renamed to ``iopub_channel``. +* Users on Python versions before 2.6.6, 2.7.1 or 3.2 will now need to call + :func:`IPython.utils.doctestreload.doctest_reload` to make doctests run + correctly inside IPython. Python releases since those versions are unaffected. + For details, see :ghpull:`3068` and `Python issue 8048 `_.