diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index c88423d..de4a262 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -803,7 +803,9 @@ class InteractiveShell(SingletonConfigurable): This will allow deprecation warning of function used interactively to show warning to users, and still hide deprecation warning from libraries import. """ - warnings.filterwarnings("default", category=DeprecationWarning, module=self.user_ns.get("__name__")) + if sys.version_info < (3,7): + warnings.filterwarnings("default", category=DeprecationWarning, module=self.user_ns.get("__name__")) + def init_builtins(self): # A single, static flag that we set to True. Its presence indicates