From e37cee317b16b07362f525dc35a6b6870a2f6f85 Mon Sep 17 00:00:00 2001 From: Elizaveta Shashkova Date: Sun, 4 Jun 2017 15:15:46 +0300 Subject: [PATCH] Fix Debug console isn't working with IPython 6.1.0 (PY-24537) Remove hard-coded names --- .../pydev/_pydev_bundle/pydev_ipython_console_011.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py b/python/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py index b7705c6f680d..9db31072fe69 100644 --- a/python/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py +++ b/python/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py @@ -36,6 +36,7 @@ except ImportError: from IPython.core import release from _pydev_bundle.pydev_imports import xmlrpclib +from _pydevd_bundle.pydevd_constants import dict_keys default_pydev_banner_parts = default_banner_parts @@ -139,8 +140,7 @@ class PyDevTerminalInteractiveShell(TerminalInteractiveShell): # Things related to exceptions #------------------------------------------------------------------------- - def showtraceback(self, exc_tuple=None, filename=None, tb_offset=None, - exception_only=False): + def showtraceback(self, *args, **kwargs): # IPython does a lot of clever stuff with Exceptions. However mostly # it is related to IPython running in a terminal instead of an IDE. # (e.g. it prints out snippets of code around the stack trace) @@ -331,8 +331,8 @@ class _PyDevFrontEnd: def update(self, globals, locals): ns = self.ipython.user_ns - for ind in ['_oh', '_ih', '_dh', '_sh', 'In', 'Out', 'get_ipython', 'exit', 'quit']: - locals[ind] = ns[ind] + for key in dict_keys(self.ipython.user_ns): + locals[key] = ns[key] self.ipython.user_global_ns.clear() self.ipython.user_global_ns.update(globals)