From 8ed6e67ed9d7662222542d9f4c4bd92bd68d5adb 2018-10-14 23:43:51 From: Matthias Bussonnier Date: 2018-10-14 23:43:51 Subject: [PATCH] Merge pull request #11396 from LucianaMarques/master added filter warnings for older versions of python (<3.7) --- 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