From 085e9011746c536f90cbe3d02bac80fd009d6f1c 2024-12-11 12:26:11 From: M Bussonnier Date: 2024-12-11 12:26:11 Subject: [PATCH] removal deprecated in 7.10 --- diff --git a/IPython/core/oinspect.py b/IPython/core/oinspect.py index 3577337..30e2bbc 100644 --- a/IPython/core/oinspect.py +++ b/IPython/core/oinspect.py @@ -299,42 +299,6 @@ def is_simple_callable(obj): return (inspect.isfunction(obj) or inspect.ismethod(obj) or \ isinstance(obj, _builtin_func_type) or isinstance(obj, _builtin_meth_type)) -@undoc -def getargspec(obj): - """Wrapper around :func:`inspect.getfullargspec` - - In addition to functions and methods, this can also handle objects with a - ``__call__`` attribute. - - DEPRECATED: Deprecated since 7.10. Do not use, will be removed. - """ - - warnings.warn('`getargspec` function is deprecated as of IPython 7.10' - 'and will be removed in future versions.', DeprecationWarning, stacklevel=2) - - if safe_hasattr(obj, '__call__') and not is_simple_callable(obj): - obj = obj.__call__ - - return inspect.getfullargspec(obj) - -@undoc -def format_argspec(argspec): - """Format argspect, convenience wrapper around inspect's. - - This takes a dict instead of ordered arguments and calls - inspect.format_argspec with the arguments in the necessary order. - - DEPRECATED (since 7.10): Do not use; will be removed in future versions. - """ - - warnings.warn('`format_argspec` function is deprecated as of IPython 7.10' - 'and will be removed in future versions.', DeprecationWarning, stacklevel=2) - - - return inspect.formatargspec(argspec['args'], argspec['varargs'], - argspec['varkw'], argspec['defaults']) - - def _get_wrapped(obj): """Get the original object if wrapped in one or more @decorators diff --git a/IPython/terminal/interactiveshell.py b/IPython/terminal/interactiveshell.py index ef4f5cd..4d3291f 100644 --- a/IPython/terminal/interactiveshell.py +++ b/IPython/terminal/interactiveshell.py @@ -859,13 +859,6 @@ class TerminalInteractiveShell(InteractiveShell): return text - def enable_win_unicode_console(self): - # Since IPython 7.10 doesn't support python < 3.6 and PEP 528, Python uses the unicode APIs for the Windows - # console by default, so WUC shouldn't be needed. - warn("`enable_win_unicode_console` is deprecated since IPython 7.10, does not do anything and will be removed in the future", - DeprecationWarning, - stacklevel=2) - def init_io(self): if sys.platform not in {'win32', 'cli'}: return