Show More
@@ -64,7 +64,6 b' from IPython.utils import io' | |||||
64 | from IPython.utils import py3compat |
|
64 | from IPython.utils import py3compat | |
65 | from IPython.utils import openpy |
|
65 | from IPython.utils import openpy | |
66 | from IPython.utils.decorators import undoc |
|
66 | from IPython.utils.decorators import undoc | |
67 | from IPython.utils.doctestreload import doctest_reload |
|
|||
68 | from IPython.utils.io import ask_yes_no |
|
67 | from IPython.utils.io import ask_yes_no | |
69 | from IPython.utils.ipstruct import Struct |
|
68 | from IPython.utils.ipstruct import Struct | |
70 | from IPython.utils.path import get_home_dir, get_ipython_dir, get_py_filename, unquote_filename |
|
69 | from IPython.utils.path import get_home_dir, get_ipython_dir, get_py_filename, unquote_filename | |
@@ -489,7 +488,6 b' class InteractiveShell(SingletonConfigurable):' | |||||
489 | self.init_display_pub() |
|
488 | self.init_display_pub() | |
490 | self.init_data_pub() |
|
489 | self.init_data_pub() | |
491 | self.init_displayhook() |
|
490 | self.init_displayhook() | |
492 | self.init_reload_doctest() |
|
|||
493 | self.init_latextool() |
|
491 | self.init_latextool() | |
494 | self.init_magics() |
|
492 | self.init_magics() | |
495 | self.init_logstart() |
|
493 | self.init_logstart() | |
@@ -682,14 +680,6 b' class InteractiveShell(SingletonConfigurable):' | |||||
682 | # the appropriate time. |
|
680 | # the appropriate time. | |
683 | self.display_trap = DisplayTrap(hook=self.displayhook) |
|
681 | self.display_trap = DisplayTrap(hook=self.displayhook) | |
684 |
|
682 | |||
685 | def init_reload_doctest(self): |
|
|||
686 | # Do a proper resetting of doctest, including the necessary displayhook |
|
|||
687 | # monkeypatching |
|
|||
688 | try: |
|
|||
689 | doctest_reload() |
|
|||
690 | except ImportError: |
|
|||
691 | warn("doctest module does not exist.") |
|
|||
692 |
|
||||
693 | def init_latextool(self): |
|
683 | def init_latextool(self): | |
694 | """Configure LaTeXTool.""" |
|
684 | """Configure LaTeXTool.""" | |
695 | cfg = LaTeXTool.instance(config=self.config) |
|
685 | cfg = LaTeXTool.instance(config=self.config) |
@@ -62,6 +62,11 b' def doctest_reload():' | |||||
62 |
|
62 | |||
63 | Notes |
|
63 | Notes | |
64 | ----- |
|
64 | ----- | |
|
65 | ||||
|
66 | As of Python 2.6.6, 2.7.1 and 3.2, this monkeypatching is no longer required. | |||
|
67 | doctest now takes care of resetting sys.displayhook itself. This function | |||
|
68 | remains for now in case anyone has to work with older versions, but it's | |||
|
69 | no longer called during IPython startup. | |||
65 |
|
70 | |||
66 | This function *used to* reload doctest, but this has been disabled because |
|
71 | This function *used to* reload doctest, but this has been disabled because | |
67 | reloading doctest unconditionally can cause massive breakage of other |
|
72 | reloading doctest unconditionally can cause massive breakage of other |
General Comments 0
You need to be logged in to leave comments.
Login now