Show More
@@ -23,7 +23,9 b' from .py3compat import string_types, input, PY3' | |||
|
23 | 23 | @undoc |
|
24 | 24 | class IOStream: |
|
25 | 25 | |
|
26 | def __init__(self,stream, fallback=None): | |
|
26 | def __init__(self, stream, fallback=None): | |
|
27 | warn('IOStream is deprecated since IPython 5.0, use sys.{stdin,stdout,stderr} instead', | |
|
28 | DeprecationWarning, stacklevel=2) | |
|
27 | 29 | if not hasattr(stream,'write') or not hasattr(stream,'flush'): |
|
28 | 30 | if fallback is not None: |
|
29 | 31 | stream = fallback |
@@ -44,7 +46,7 b' class IOStream:' | |||
|
44 | 46 | return tpl.format(mod=cls.__module__, cls=cls.__name__, args=self.stream) |
|
45 | 47 | |
|
46 | 48 | def write(self,data): |
|
47 | warn('IOStream is deprecated, use sys.{stdin,stdout,stderr} instead', | |
|
49 | warn('IOStream is deprecated since IPython 5.0, use sys.{stdin,stdout,stderr} instead', | |
|
48 | 50 | DeprecationWarning, stacklevel=2) |
|
49 | 51 | try: |
|
50 | 52 | self._swrite(data) |
@@ -60,7 +62,7 b' class IOStream:' | |||
|
60 | 62 | file=sys.stderr) |
|
61 | 63 | |
|
62 | 64 | def writelines(self, lines): |
|
63 | warn('IOStream is deprecated, use sys.{stdin,stdout,stderr} instead', | |
|
65 | warn('IOStream is deprecated since IPython 5.0, use sys.{stdin,stdout,stderr} instead', | |
|
64 | 66 | DeprecationWarning, stacklevel=2) |
|
65 | 67 | if isinstance(lines, string_types): |
|
66 | 68 | lines = [lines] |
General Comments 0
You need to be logged in to leave comments.
Login now