From 8c11a03eaee54010dc0190c61dd9302d99f4bb4d 2018-10-14 23:02:10 From: luciana Date: 2018-10-14 23:02:10 Subject: [PATCH] added filter warnings for older versions of python (<3.7) This is a "squash" of three commits into one. This means that the intermediate history has been rewritten. --- 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