Show More
@@ -299,42 +299,6 def is_simple_callable(obj): | |||||
299 | return (inspect.isfunction(obj) or inspect.ismethod(obj) or \ |
|
299 | return (inspect.isfunction(obj) or inspect.ismethod(obj) or \ | |
300 | isinstance(obj, _builtin_func_type) or isinstance(obj, _builtin_meth_type)) |
|
300 | isinstance(obj, _builtin_func_type) or isinstance(obj, _builtin_meth_type)) | |
301 |
|
301 | |||
302 | @undoc |
|
|||
303 | def getargspec(obj): |
|
|||
304 | """Wrapper around :func:`inspect.getfullargspec` |
|
|||
305 |
|
||||
306 | In addition to functions and methods, this can also handle objects with a |
|
|||
307 | ``__call__`` attribute. |
|
|||
308 |
|
||||
309 | DEPRECATED: Deprecated since 7.10. Do not use, will be removed. |
|
|||
310 | """ |
|
|||
311 |
|
||||
312 | warnings.warn('`getargspec` function is deprecated as of IPython 7.10' |
|
|||
313 | 'and will be removed in future versions.', DeprecationWarning, stacklevel=2) |
|
|||
314 |
|
||||
315 | if safe_hasattr(obj, '__call__') and not is_simple_callable(obj): |
|
|||
316 | obj = obj.__call__ |
|
|||
317 |
|
||||
318 | return inspect.getfullargspec(obj) |
|
|||
319 |
|
||||
320 | @undoc |
|
|||
321 | def format_argspec(argspec): |
|
|||
322 | """Format argspect, convenience wrapper around inspect's. |
|
|||
323 |
|
||||
324 | This takes a dict instead of ordered arguments and calls |
|
|||
325 | inspect.format_argspec with the arguments in the necessary order. |
|
|||
326 |
|
||||
327 | DEPRECATED (since 7.10): Do not use; will be removed in future versions. |
|
|||
328 | """ |
|
|||
329 |
|
||||
330 | warnings.warn('`format_argspec` function is deprecated as of IPython 7.10' |
|
|||
331 | 'and will be removed in future versions.', DeprecationWarning, stacklevel=2) |
|
|||
332 |
|
||||
333 |
|
||||
334 | return inspect.formatargspec(argspec['args'], argspec['varargs'], |
|
|||
335 | argspec['varkw'], argspec['defaults']) |
|
|||
336 |
|
||||
337 |
|
||||
338 | def _get_wrapped(obj): |
|
302 | def _get_wrapped(obj): | |
339 | """Get the original object if wrapped in one or more @decorators |
|
303 | """Get the original object if wrapped in one or more @decorators | |
340 |
|
304 |
@@ -12,20 +12,20 from IPython.utils.py3compat import input | |||||
12 | from IPython.utils.terminal import toggle_set_term_title, set_term_title, restore_term_title |
|
12 | from IPython.utils.terminal import toggle_set_term_title, set_term_title, restore_term_title | |
13 | from IPython.utils.process import abbrev_cwd |
|
13 | from IPython.utils.process import abbrev_cwd | |
14 | from traitlets import ( |
|
14 | from traitlets import ( | |
|
15 | Any, | |||
15 | Bool, |
|
16 | Bool, | |
16 | Unicode, |
|
|||
17 | Dict, |
|
17 | Dict, | |
|
18 | Enum, | |||
|
19 | Float, | |||
|
20 | Instance, | |||
18 | Integer, |
|
21 | Integer, | |
19 | List, |
|
22 | List, | |
20 | observe, |
|
|||
21 | Instance, |
|
|||
22 | Type, |
|
23 | Type, | |
23 | default, |
|
24 | Unicode, | |
24 | Enum, |
|
|||
25 | Union, |
|
25 | Union, | |
26 | Any, |
|
26 | default, | |
|
27 | observe, | |||
27 | validate, |
|
28 | validate, | |
28 | Float, |
|
|||
29 | ) |
|
29 | ) | |
30 |
|
30 | |||
31 | from prompt_toolkit.auto_suggest import AutoSuggestFromHistory |
|
31 | from prompt_toolkit.auto_suggest import AutoSuggestFromHistory | |
@@ -859,13 +859,6 class TerminalInteractiveShell(InteractiveShell): | |||||
859 |
|
859 | |||
860 | return text |
|
860 | return text | |
861 |
|
861 | |||
862 | def enable_win_unicode_console(self): |
|
|||
863 | # Since IPython 7.10 doesn't support python < 3.6 and PEP 528, Python uses the unicode APIs for the Windows |
|
|||
864 | # console by default, so WUC shouldn't be needed. |
|
|||
865 | warn("`enable_win_unicode_console` is deprecated since IPython 7.10, does not do anything and will be removed in the future", |
|
|||
866 | DeprecationWarning, |
|
|||
867 | stacklevel=2) |
|
|||
868 |
|
||||
869 | def init_io(self): |
|
862 | def init_io(self): | |
870 | if sys.platform not in {'win32', 'cli'}: |
|
863 | if sys.platform not in {'win32', 'cli'}: | |
871 | return |
|
864 | return |
General Comments 0
You need to be logged in to leave comments.
Login now