Show More
@@ -0,0 +1,7 b'' | |||||
|
1 | A couple of unused function and methods have been deprecated and will be removed | |||
|
2 | in future versions: | |||
|
3 | ||||
|
4 | - ``IPython.utils.io.raw_print_err`` | |||
|
5 | - ``IPython.utils.io.raw_print`` | |||
|
6 | ||||
|
7 |
@@ -210,35 +210,34 b" def temp_pyfile(src, ext='.py'):" | |||||
210 | f.flush() |
|
210 | f.flush() | |
211 | return fname, f |
|
211 | return fname, f | |
212 |
|
212 | |||
|
213 | @undoc | |||
213 | def atomic_writing(*args, **kwargs): |
|
214 | def atomic_writing(*args, **kwargs): | |
214 | """DEPRECATED: moved to notebook.services.contents.fileio""" |
|
215 | """DEPRECATED: moved to notebook.services.contents.fileio""" | |
215 | warn("IPython.utils.io.atomic_writing has moved to notebook.services.contents.fileio", stacklevel=2) |
|
216 | warn("IPython.utils.io.atomic_writing has moved to notebook.services.contents.fileio since IPython 4.0", DeprecationWarning, stacklevel=2) | |
216 | from notebook.services.contents.fileio import atomic_writing |
|
217 | from notebook.services.contents.fileio import atomic_writing | |
217 | return atomic_writing(*args, **kwargs) |
|
218 | return atomic_writing(*args, **kwargs) | |
218 |
|
219 | |||
|
220 | @undoc | |||
219 | def raw_print(*args, **kw): |
|
221 | def raw_print(*args, **kw): | |
220 | """Raw print to sys.__stdout__, otherwise identical interface to print().""" |
|
222 | """DEPRECATED: Raw print to sys.__stdout__, otherwise identical interface to print().""" | |
|
223 | warn("IPython.utils.io.raw_print has been deprecated since IPython 7.0", DeprecationWarning, stacklevel=2) | |||
221 |
|
224 | |||
222 | print(*args, sep=kw.get('sep', ' '), end=kw.get('end', '\n'), |
|
225 | print(*args, sep=kw.get('sep', ' '), end=kw.get('end', '\n'), | |
223 | file=sys.__stdout__) |
|
226 | file=sys.__stdout__) | |
224 | sys.__stdout__.flush() |
|
227 | sys.__stdout__.flush() | |
225 |
|
228 | |||
226 |
|
229 | @undoc | ||
227 | def raw_print_err(*args, **kw): |
|
230 | def raw_print_err(*args, **kw): | |
228 | """Raw print to sys.__stderr__, otherwise identical interface to print().""" |
|
231 | """DEPRECATED: Raw print to sys.__stderr__, otherwise identical interface to print().""" | |
|
232 | warn("IPython.utils.io.raw_print_err has been deprecated since IPython 7.0", DeprecationWarning, stacklevel=2) | |||
229 |
|
233 | |||
230 | print(*args, sep=kw.get('sep', ' '), end=kw.get('end', '\n'), |
|
234 | print(*args, sep=kw.get('sep', ' '), end=kw.get('end', '\n'), | |
231 | file=sys.__stderr__) |
|
235 | file=sys.__stderr__) | |
232 | sys.__stderr__.flush() |
|
236 | sys.__stderr__.flush() | |
233 |
|
237 | |||
234 |
|
238 | @undoc | ||
235 | # Short aliases for quick debugging, do NOT use these in production code. |
|
|||
236 | rprint = raw_print |
|
|||
237 | rprinte = raw_print_err |
|
|||
238 |
|
||||
239 |
|
||||
240 | def unicode_std_stream(stream='stdout'): |
|
239 | def unicode_std_stream(stream='stdout'): | |
241 | """DEPRECATED, moved to nbconvert.utils.io""" |
|
240 | """DEPRECATED, moved to nbconvert.utils.io""" | |
242 | warn("IPython.utils.io.unicode_std_stream has moved to nbconvert.utils.io", stacklevel=2) |
|
241 | warn("IPython.utils.io.unicode_std_stream has moved to nbconvert.utils.io since IPython 4.0", DeprecationWarning, stacklevel=2) | |
243 | from nbconvert.utils.io import unicode_std_stream |
|
242 | from nbconvert.utils.io import unicode_std_stream | |
244 | return unicode_std_stream(stream) |
|
243 | return unicode_std_stream(stream) |
General Comments 0
You need to be logged in to leave comments.
Login now