Show More
@@ -84,7 +84,9 b' import re' | |||||
84 | import datetime |
|
84 | import datetime | |
85 | from collections import deque |
|
85 | from collections import deque | |
86 | from io import StringIO |
|
86 | from io import StringIO | |
|
87 | from warnings import warn | |||
87 |
|
88 | |||
|
89 | from IPython.utils.decorators import undoc | |||
88 | from IPython.utils.py3compat import PYPY, cast_unicode |
|
90 | from IPython.utils.py3compat import PYPY, cast_unicode | |
89 | from IPython.utils.encoding import get_stream_enc |
|
91 | from IPython.utils.encoding import get_stream_enc | |
90 |
|
92 | |||
@@ -107,7 +109,13 b' def _safe_getattr(obj, attr, default=None):' | |||||
107 | except Exception: |
|
109 | except Exception: | |
108 | return default |
|
110 | return default | |
109 |
|
111 | |||
110 | CUnicodeIO = StringIO |
|
112 | @undoc | |
|
113 | class CUnicodeIO(StringIO): | |||
|
114 | def __init__(self, *args, **kwargs): | |||
|
115 | super().__init__(*args, **kwargs) | |||
|
116 | warn(("CUnicodeIO is deprecated since IPython 6.0. " | |||
|
117 | "Please use io.StringIO instead."), | |||
|
118 | DeprecationWarning, stacklevel=2) | |||
111 |
|
119 | |||
112 | def pretty(obj, verbose=False, max_width=79, newline='\n', max_seq_length=MAX_SEQ_LENGTH): |
|
120 | def pretty(obj, verbose=False, max_width=79, newline='\n', max_seq_length=MAX_SEQ_LENGTH): | |
113 | """ |
|
121 | """ |
General Comments 0
You need to be logged in to leave comments.
Login now