diff options
Diffstat (limited to 'contrib/python/ipython/py3/IPython/testing/globalipapp.py')
| -rw-r--r-- | contrib/python/ipython/py3/IPython/testing/globalipapp.py | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/contrib/python/ipython/py3/IPython/testing/globalipapp.py b/contrib/python/ipython/py3/IPython/testing/globalipapp.py index c435f9d0873..698e3d845aa 100644 --- a/contrib/python/ipython/py3/IPython/testing/globalipapp.py +++ b/contrib/python/ipython/py3/IPython/testing/globalipapp.py @@ -14,6 +14,8 @@ import sys import types import warnings +from pathlib import Path + from . import tools from IPython.core import page @@ -21,30 +23,6 @@ from IPython.utils import io from IPython.terminal.interactiveshell import TerminalInteractiveShell -class StreamProxy(io.IOStream): - """Proxy for sys.stdout/err. This will request the stream *at call time* - allowing for nose's Capture plugin's redirection of sys.stdout/err. - - Parameters - ---------- - name : str - The name of the stream. This will be requested anew at every call - """ - - def __init__(self, name): - warnings.warn("StreamProxy is deprecated and unused as of IPython 5", DeprecationWarning, - stacklevel=2, - ) - self.name=name - - @property - def stream(self): - return getattr(sys, self.name) - - def flush(self): - self.stream.flush() - - def get_ipython(): # This will get replaced by the real thing once we start IPython below return start_ipython() @@ -95,7 +73,7 @@ def start_ipython(): # A few more tweaks needed for playing nicely with doctests... # remove history file - shell.tempfiles.append(config.HistoryManager.hist_file) + shell.tempfiles.append(Path(config.HistoryManager.hist_file)) # These traps are normally only active for interactive use, set them # permanently since we'll be mocking interactive sessions. |
