##// END OF EJS Templates
Deprecate CUnicodeIO...
Thomas Kluyver -
Show More
@@ -84,6 +84,7 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
88 from IPython.utils.py3compat import PYPY, cast_unicode
89 from IPython.utils.py3compat import PYPY, cast_unicode
89 from IPython.utils.encoding import get_stream_enc
90 from IPython.utils.encoding import get_stream_enc
@@ -107,7 +108,12 b' def _safe_getattr(obj, attr, default=None):'
107 except Exception:
108 except Exception:
108 return default
109 return default
109
110
110 CUnicodeIO = StringIO
111 class CUnicodeIO(StringIO):
112 def __init__(self, *args, **kwargs):
113 super().__init__(*args, **kwargs)
114 warn(("CUnicodeIO is deprecated since IPython 6.0. "
115 "Please use io.StringIO instead."),
116 DeprecationWarning, stacklevel=2)
111
117
112 def pretty(obj, verbose=False, max_width=79, newline='\n', max_seq_length=MAX_SEQ_LENGTH):
118 def pretty(obj, verbose=False, max_width=79, newline='\n', max_seq_length=MAX_SEQ_LENGTH):
113 """
119 """
General Comments 0
You need to be logged in to leave comments. Login now