ipython 9.4.0__tar.gz → 9.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/completer.py +145 -15
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/debugger.py +137 -16
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/displaypub.py +23 -1
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/guarded_eval.py +319 -59
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/history.py +1 -1
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/interactiveshell.py +2 -2
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/magic_arguments.py +5 -3
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/magics/basic.py +88 -23
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/magics/execution.py +19 -37
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/magics/namespace.py +6 -8
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/magics/script.py +6 -1
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/release.py +1 -1
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/ultratb.py +13 -10
- {ipython-9.4.0 → ipython-9.6.0}/IPython/extensions/deduperreload/deduperreload.py +55 -34
- {ipython-9.4.0 → ipython-9.6.0}/IPython/extensions/deduperreload/deduperreload_patching.py +31 -24
- {ipython-9.4.0 → ipython-9.6.0}/IPython/extensions/tests/test_deduperreload.py +36 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/terminal/interactiveshell.py +7 -2
- {ipython-9.4.0 → ipython-9.6.0}/IPython/terminal/shortcuts/__init__.py +1 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/_sysinfo.py +1 -1
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/text.py +7 -3
- {ipython-9.4.0/ipython.egg-info → ipython-9.6.0}/PKG-INFO +8 -9
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/interactive/reference.rst +59 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/overview.rst +2 -3
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/version9.rst +62 -0
- {ipython-9.4.0 → ipython-9.6.0/ipython.egg-info}/PKG-INFO +8 -9
- {ipython-9.4.0 → ipython-9.6.0}/ipython.egg-info/requires.txt +7 -8
- {ipython-9.4.0 → ipython-9.6.0}/pyproject.toml +15 -22
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_completer.py +210 -1
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_debug_magic.py +1 -1
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_debugger.py +318 -7
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_display_2.py +71 -9
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_formatters.py +30 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_guarded_eval.py +180 -13
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_interactiveshell.py +10 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_magic.py +155 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_oinspect.py +2 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_pycolorize.py +1 -1
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_text.py +11 -1
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_ultratb.py +18 -0
- {ipython-9.4.0 → ipython-9.6.0}/.flake8 +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/.mailmap +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/.pre-commit-config.yaml +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/COPYING.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/__init__.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/__main__.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/__init__.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/alias.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/application.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/async_helpers.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/autocall.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/builtin_trap.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/compilerop.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/completerlib.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/crashhandler.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/debugger_backport.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/display.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/display_functions.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/display_trap.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/displayhook.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/doctb.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/error.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/events.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/extensions.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/formatters.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/getipython.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/historyapp.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/hooks.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/inputtransformer2.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/latex_symbols.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/logger.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/macro.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/magic.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/magics/__init__.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/magics/ast_mod.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/magics/auto.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/magics/code.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/magics/config.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/magics/display.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/magics/extension.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/magics/history.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/magics/logging.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/magics/osm.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/magics/packaging.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/magics/pylab.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/oinspect.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/page.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/payload.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/payloadpage.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/prefilter.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/profile/README_STARTUP +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/profileapp.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/profiledir.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/pylabtools.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/shellapp.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/splitinput.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/tbtools.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/tips.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/core/usage.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/display.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/extensions/__init__.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/extensions/autoreload.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/extensions/deduperreload/__init__.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/extensions/storemagic.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/external/__init__.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/external/pickleshare.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/external/qt_for_kernel.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/external/qt_loaders.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/lib/__init__.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/lib/backgroundjobs.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/lib/clipboard.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/lib/deepreload.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/lib/demo.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/lib/display.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/lib/editorhooks.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/lib/guisupport.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/lib/latextools.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/lib/lexers.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/lib/pretty.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/paths.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/py.typed +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/sphinxext/__init__.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/sphinxext/custom_doctests.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/sphinxext/ipython_console_highlighting.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/sphinxext/ipython_directive.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/terminal/__init__.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/terminal/debugger.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/terminal/embed.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/terminal/ipapp.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/terminal/magics.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/terminal/prompts.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/terminal/pt_inputhooks/__init__.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/terminal/pt_inputhooks/asyncio.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/terminal/pt_inputhooks/glut.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/terminal/pt_inputhooks/gtk.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/terminal/pt_inputhooks/gtk3.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/terminal/pt_inputhooks/gtk4.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/terminal/pt_inputhooks/osx.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/terminal/pt_inputhooks/pyglet.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/terminal/pt_inputhooks/qt.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/terminal/pt_inputhooks/tk.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/terminal/pt_inputhooks/wx.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/terminal/ptutils.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/terminal/shortcuts/auto_match.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/terminal/shortcuts/auto_suggest.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/terminal/shortcuts/filters.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/testing/__init__.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/testing/decorators.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/testing/globalipapp.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/testing/ipunittest.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/testing/plugin/Makefile +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/testing/plugin/__init__.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/testing/plugin/dtexample.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/testing/plugin/ipdoctest.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/testing/plugin/pytest_ipdoctest.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/testing/plugin/setup.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/testing/plugin/simple.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/testing/plugin/simplevars.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/testing/plugin/test_combo.txt +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/testing/plugin/test_example.txt +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/testing/plugin/test_exampleip.txt +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/testing/plugin/test_ipdoctest.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/testing/plugin/test_refs.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/testing/skipdoctest.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/testing/tools.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/PyColorize.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/__init__.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/_process_cli.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/_process_common.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/_process_emscripten.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/_process_posix.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/_process_win32.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/_process_win32_controller.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/capture.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/coloransi.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/contexts.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/data.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/decorators.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/dir2.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/docs.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/encoding.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/eventful.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/frame.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/generics.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/importstring.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/io.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/ipstruct.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/jsonutil.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/log.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/module_paths.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/openpy.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/path.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/process.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/py3compat.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/sentinel.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/strdispatch.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/sysinfo.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/syspathcontext.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/tempdir.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/terminal.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/timing.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/tokenutil.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/IPython/utils/wildcard.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/LICENSE +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/MANIFEST.in +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/README.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/_build_meta.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/Makefile +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/README.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/autogen_api.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/autogen_config.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/autogen_magics.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/autogen_shortcuts.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/make.cmd +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/man/ipython.1 +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/requirements.txt +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/2.0/running-crop.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/2.0/running.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/2.0/treeview.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/2.0/user-interface.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/2.0/widgets.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/8.0/auto_suggest_1_prompt_no_text.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/8.0/auto_suggest_2_print_hello_suggest.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/8.0/auto_suggest_3_print_hello_suggest.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/8.0/auto_suggest_4_print_hello.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/8.0/auto_suggest_d_completions.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/8.0/auto_suggest_d_phantom.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/8.0/auto_suggest_def_completions.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/8.0/auto_suggest_def_phantom.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/8.0/auto_suggest_match_parens.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/8.0/auto_suggest_second_prompt.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/8.0/pathlib_pathlib_everywhere.jpg +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/autosuggest.gif +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/ipy_013_dashboard.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/ipy_013_dashboard_cluster.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/ipy_013_notebook_cythonmagic.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/ipy_013_notebook_long_out.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/ipy_013_notebook_octavemagic.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/ipy_013_notebook_rmagic.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/ipy_013_notebook_script_cells.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/ipy_013_notebook_spectrogram.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/ipy_013_notebook_tooltip.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/ipy_013_par_tb.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/ipy_013_qtconsole_baboon.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/ipy_013_qtconsole_completer.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/ipython-6-screenshot.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/jedi_type_inference_60.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/kernel_selector_screenshot.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/ms_visual_studio.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/notebook_specgram.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/ptshell_features.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/qtconsole.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/qtconsole_tabbed.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_images/unicode_completion.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_static/favicon.ico +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_static/logo.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_static/theme_overrides.css +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_templates/breadcrumbs.html +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/_templates/notebook_redirect.html +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/about/history.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/about/index.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/about/license_and_copyright.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/api/index.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/conf.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/config/callbacks.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/config/custommagics.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/config/details.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/config/eventloops.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/config/extensions/autoreload.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/config/extensions/index.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/config/extensions/storemagic.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/config/index.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/config/inputtransforms.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/config/integrating.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/config/intro.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/config/options/index.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/config/shell_mimerenderer.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/config/shortcuts/index.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/coredev/index.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/development/config.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/development/execution.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/development/figs/ipy_kernel_and_terminal.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/development/figs/ipy_kernel_and_terminal.svg +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/development/figs/other_kernels.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/development/figs/other_kernels.svg +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/development/how_ipython_works.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/development/index.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/development/inputhook_app.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/development/kernels.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/development/messaging.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/development/pycompat.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/development/wrapperkernels.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/index.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/install/index.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/install/install.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/install/kernel_install.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/interactive/autoawait.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/interactive/index.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/interactive/magics.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/interactive/plotting.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/interactive/python-ipython-diff.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/interactive/shell.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/interactive/tips.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/interactive/tutorial.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/links.txt +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/parallel/index.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/sphinx.toml +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/sphinxext.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/development.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/github-stats-0.11.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/github-stats-0.12.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/github-stats-0.13.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/github-stats-1.0.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/github-stats-2.0.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/github-stats-3.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/github-stats-4.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/github-stats-5.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/github-stats-6.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/github-stats-7.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/github-stats-8.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/index.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/pr/README.md +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/pr/antigravity-feature.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/pr/incompat-switching-to-perl.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/version0.10.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/version0.11.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/version0.12.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/version0.13.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/version0.8.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/version0.9.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/version1.0.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/version2.0.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/version3.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/version3_widget_migration.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/version4.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/version5.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/version6.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/version7.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/source/whatsnew/version8.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/sphinxext/apigen.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/sphinxext/configtraits.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/sphinxext/github.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/docs/sphinxext/magics.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/examples/Embedding/embed_class_long.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/examples/Embedding/embed_class_short.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/examples/Embedding/embed_function.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/examples/Embedding/start_ipython_config.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/examples/IPython Kernel/example-demo.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/examples/IPython Kernel/gui/gui-glut.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/examples/IPython Kernel/gui/gui-gtk4.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/examples/IPython Kernel/gui/gui-qt.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/examples/IPython Kernel/ipython-completion.bash +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/examples/IPython Kernel/ipython-get-history.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/examples/IPython Kernel/ipython.desktop +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/examples/auto_suggest_llm.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/examples/utils/cwd_prompt.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/examples/utils/list_pyfiles.ipy +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/examples/utils/list_subdirs.ipy +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/ipython.egg-info/SOURCES.txt +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/ipython.egg-info/dependency_links.txt +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/ipython.egg-info/entry_points.txt +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/ipython.egg-info/not-zip-safe +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/ipython.egg-info/top_level.txt +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/long_description.rst +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/scripts/ipython.ico +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/scripts/ipython_nb.ico +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/setup.cfg +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/setup.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/setupbase.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/2x2.jpg +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/2x2.png +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/__init__.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/bad_all.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/conftest.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/cve.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/fake_ext_dir/daft_extension.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/fake_llm.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/nonascii.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/nonascii2.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/print_argv.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/refbug.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/simpleerr.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/tclass.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test.wav +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_alias.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_application.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_async_helpers.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_autocall.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_backgroundjobs.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_capture.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_clipboard.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_compilerop.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_completerlib.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_decorators.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_decorators_2.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_deepreload.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_dir2.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_display.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_displayhook.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_editorhooks.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_embed.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_events.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_exceptiongroup_tb.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_extension.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_handlers.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_help.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_history.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_hooks.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_imports.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_importstring.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_inputtransformer2.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_inputtransformer2_line.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_interactivshell.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_io.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_iplib.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_ipunittest.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_latextools.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_logger.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_magic_arguments.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_magic_terminal.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_module_paths.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_openpy.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_page.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_path.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_paths.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_prefilter.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_pretty.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_process.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_profile.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_pt_inputhooks.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_pylabtools.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_qt_loaders.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_run.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_shellapp.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_shortcuts.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_splitinput.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_storemagic.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_sysinfo.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_tempdir.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_tips.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_tokenutil.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_tools.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_wildcard.py +0 -0
- {ipython-9.4.0 → ipython-9.6.0}/tests/test_zzz_autoreload.py +0 -0
|
@@ -213,8 +213,12 @@ from typing import (
|
|
|
213
213
|
Literal,
|
|
214
214
|
)
|
|
215
215
|
|
|
216
|
-
from IPython.core.guarded_eval import
|
|
217
|
-
|
|
216
|
+
from IPython.core.guarded_eval import (
|
|
217
|
+
guarded_eval,
|
|
218
|
+
EvaluationContext,
|
|
219
|
+
_validate_policy_overrides,
|
|
220
|
+
)
|
|
221
|
+
from IPython.core.error import TryNext, UsageError
|
|
218
222
|
from IPython.core.inputtransformer2 import ESC_MAGIC
|
|
219
223
|
from IPython.core.latex_symbols import latex_symbols, reverse_latex_symbol
|
|
220
224
|
from IPython.testing.skipdoctest import skip_doctest
|
|
@@ -222,7 +226,6 @@ from IPython.utils import generics
|
|
|
222
226
|
from IPython.utils.PyColorize import theme_table
|
|
223
227
|
from IPython.utils.decorators import sphinx_options
|
|
224
228
|
from IPython.utils.dir2 import dir2, get_real_method
|
|
225
|
-
from IPython.utils.docs import GENERATING_DOCUMENTATION
|
|
226
229
|
from IPython.utils.path import ensure_dir_exists
|
|
227
230
|
from IPython.utils.process import arg_split
|
|
228
231
|
from traitlets import (
|
|
@@ -953,7 +956,6 @@ class CompletionSplitter:
|
|
|
953
956
|
return self._delim_re.split(cut_line)[-1]
|
|
954
957
|
|
|
955
958
|
|
|
956
|
-
|
|
957
959
|
class Completer(Configurable):
|
|
958
960
|
|
|
959
961
|
greedy = Bool(
|
|
@@ -1045,6 +1047,18 @@ class Completer(Configurable):
|
|
|
1045
1047
|
""",
|
|
1046
1048
|
).tag(config=True)
|
|
1047
1049
|
|
|
1050
|
+
@observe("evaluation")
|
|
1051
|
+
def _evaluation_changed(self, _change):
|
|
1052
|
+
_validate_policy_overrides(
|
|
1053
|
+
policy_name=self.evaluation, policy_overrides=self.policy_overrides
|
|
1054
|
+
)
|
|
1055
|
+
|
|
1056
|
+
@observe("policy_overrides")
|
|
1057
|
+
def _policy_overrides_changed(self, _change):
|
|
1058
|
+
_validate_policy_overrides(
|
|
1059
|
+
policy_name=self.evaluation, policy_overrides=self.policy_overrides
|
|
1060
|
+
)
|
|
1061
|
+
|
|
1048
1062
|
auto_import_method = DottedObjectName(
|
|
1049
1063
|
default_value="importlib.import_module",
|
|
1050
1064
|
allow_none=True,
|
|
@@ -1113,7 +1127,7 @@ class Completer(Configurable):
|
|
|
1113
1127
|
except IndexError:
|
|
1114
1128
|
return None
|
|
1115
1129
|
|
|
1116
|
-
def global_matches(self, text):
|
|
1130
|
+
def global_matches(self, text: str, context: Optional[CompletionContext] = None):
|
|
1117
1131
|
"""Compute matches when text is a simple name.
|
|
1118
1132
|
|
|
1119
1133
|
Return a list of all keywords, built-in functions and names currently
|
|
@@ -1123,12 +1137,41 @@ class Completer(Configurable):
|
|
|
1123
1137
|
matches = []
|
|
1124
1138
|
match_append = matches.append
|
|
1125
1139
|
n = len(text)
|
|
1126
|
-
|
|
1140
|
+
|
|
1141
|
+
search_lists = [
|
|
1127
1142
|
keyword.kwlist,
|
|
1128
1143
|
builtin_mod.__dict__.keys(),
|
|
1129
1144
|
list(self.namespace.keys()),
|
|
1130
1145
|
list(self.global_namespace.keys()),
|
|
1131
|
-
]
|
|
1146
|
+
]
|
|
1147
|
+
if context and context.full_text.count("\n") > 1:
|
|
1148
|
+
# try to evaluate on full buffer
|
|
1149
|
+
previous_lines = "\n".join(
|
|
1150
|
+
context.full_text.split("\n")[: context.cursor_line]
|
|
1151
|
+
)
|
|
1152
|
+
if previous_lines:
|
|
1153
|
+
all_code_lines_before_cursor = (
|
|
1154
|
+
self._extract_code(previous_lines) + "\n" + text
|
|
1155
|
+
)
|
|
1156
|
+
context = EvaluationContext(
|
|
1157
|
+
globals=self.global_namespace,
|
|
1158
|
+
locals=self.namespace,
|
|
1159
|
+
evaluation=self.evaluation,
|
|
1160
|
+
auto_import=self._auto_import,
|
|
1161
|
+
policy_overrides=self.policy_overrides,
|
|
1162
|
+
)
|
|
1163
|
+
try:
|
|
1164
|
+
obj = guarded_eval(
|
|
1165
|
+
all_code_lines_before_cursor,
|
|
1166
|
+
context,
|
|
1167
|
+
)
|
|
1168
|
+
except Exception as e:
|
|
1169
|
+
if self.debug:
|
|
1170
|
+
warnings.warn(f"Evaluation exception {e}")
|
|
1171
|
+
|
|
1172
|
+
search_lists.append(list(context.transient_locals.keys()))
|
|
1173
|
+
|
|
1174
|
+
for lst in search_lists:
|
|
1132
1175
|
for word in lst:
|
|
1133
1176
|
if word[:n] == text and word != "__builtins__":
|
|
1134
1177
|
match_append(word)
|
|
@@ -1143,6 +1186,7 @@ class Completer(Configurable):
|
|
|
1143
1186
|
for word in shortened.keys():
|
|
1144
1187
|
if word[:n] == text and word != "__builtins__":
|
|
1145
1188
|
match_append(shortened[word])
|
|
1189
|
+
|
|
1146
1190
|
return matches
|
|
1147
1191
|
|
|
1148
1192
|
def attr_matches(self, text):
|
|
@@ -1205,8 +1249,15 @@ class Completer(Configurable):
|
|
|
1205
1249
|
else:
|
|
1206
1250
|
return code
|
|
1207
1251
|
|
|
1252
|
+
def _extract_code(self, line: str):
|
|
1253
|
+
"""No-op in Completer, but can be used in subclasses to customise behaviour"""
|
|
1254
|
+
return line
|
|
1255
|
+
|
|
1208
1256
|
def _attr_matches(
|
|
1209
|
-
self,
|
|
1257
|
+
self,
|
|
1258
|
+
text: str,
|
|
1259
|
+
include_prefix: bool = True,
|
|
1260
|
+
context: Optional[CompletionContext] = None,
|
|
1210
1261
|
) -> tuple[Sequence[str], str]:
|
|
1211
1262
|
m2 = self._ATTR_MATCH_RE.match(text)
|
|
1212
1263
|
if not m2:
|
|
@@ -1219,7 +1270,19 @@ class Completer(Configurable):
|
|
|
1219
1270
|
|
|
1220
1271
|
obj = self._evaluate_expr(expr)
|
|
1221
1272
|
if obj is not_found:
|
|
1222
|
-
|
|
1273
|
+
if context:
|
|
1274
|
+
# try to evaluate on full buffer
|
|
1275
|
+
previous_lines = "\n".join(
|
|
1276
|
+
context.full_text.split("\n")[: context.cursor_line]
|
|
1277
|
+
)
|
|
1278
|
+
if previous_lines:
|
|
1279
|
+
all_code_lines_before_cursor = (
|
|
1280
|
+
self._extract_code(previous_lines) + "\n" + expr
|
|
1281
|
+
)
|
|
1282
|
+
obj = self._evaluate_expr(all_code_lines_before_cursor)
|
|
1283
|
+
|
|
1284
|
+
if obj is not_found:
|
|
1285
|
+
return [], ""
|
|
1223
1286
|
|
|
1224
1287
|
if self.limit_to__all__ and hasattr(obj, '__all__'):
|
|
1225
1288
|
words = get__all__entries(obj)
|
|
@@ -1313,14 +1376,23 @@ class Completer(Configurable):
|
|
|
1313
1376
|
),
|
|
1314
1377
|
)
|
|
1315
1378
|
done = True
|
|
1316
|
-
except
|
|
1379
|
+
except (SyntaxError, TypeError) as e:
|
|
1317
1380
|
if self.debug:
|
|
1318
|
-
|
|
1381
|
+
warnings.warn(f"Trimming because of {e}")
|
|
1382
|
+
# TypeError can show up with something like `+ d`
|
|
1383
|
+
# where `d` is a dictionary.
|
|
1384
|
+
|
|
1319
1385
|
# trim the expression to remove any invalid prefix
|
|
1320
1386
|
# e.g. user starts `(d[`, so we get `expr = '(d'`,
|
|
1321
1387
|
# where parenthesis is not closed.
|
|
1322
1388
|
# TODO: make this faster by reusing parts of the computation?
|
|
1323
1389
|
expr = self._trim_expr(expr)
|
|
1390
|
+
except Exception as e:
|
|
1391
|
+
if self.debug:
|
|
1392
|
+
warnings.warn(f"Evaluation exception {e}")
|
|
1393
|
+
done = True
|
|
1394
|
+
if self.debug:
|
|
1395
|
+
warnings.warn(f"Resolved to {obj}")
|
|
1324
1396
|
return obj
|
|
1325
1397
|
|
|
1326
1398
|
@property
|
|
@@ -1331,6 +1403,7 @@ class Completer(Configurable):
|
|
|
1331
1403
|
self._auto_import_func = import_item(self.auto_import_method)
|
|
1332
1404
|
return self._auto_import_func
|
|
1333
1405
|
|
|
1406
|
+
|
|
1334
1407
|
def get__all__entries(obj):
|
|
1335
1408
|
"""returns the strings in the __all__ attribute"""
|
|
1336
1409
|
try:
|
|
@@ -2224,6 +2297,57 @@ class IPCompleter(Completer):
|
|
|
2224
2297
|
"suppress": False,
|
|
2225
2298
|
}
|
|
2226
2299
|
|
|
2300
|
+
def _extract_code(self, line: str) -> str:
|
|
2301
|
+
"""Extract code from magics if any."""
|
|
2302
|
+
|
|
2303
|
+
if not line:
|
|
2304
|
+
return line
|
|
2305
|
+
maybe_magic, *rest = line.split(maxsplit=1)
|
|
2306
|
+
if not rest:
|
|
2307
|
+
return line
|
|
2308
|
+
args = rest[0]
|
|
2309
|
+
known_magics = self.shell.magics_manager.lsmagic()
|
|
2310
|
+
line_magics = known_magics["line"]
|
|
2311
|
+
magic_name = maybe_magic.lstrip(self.magic_escape)
|
|
2312
|
+
if magic_name not in line_magics:
|
|
2313
|
+
return line
|
|
2314
|
+
|
|
2315
|
+
if not maybe_magic.startswith(self.magic_escape):
|
|
2316
|
+
all_variables = [*self.namespace.keys(), *self.global_namespace.keys()]
|
|
2317
|
+
if magic_name in all_variables:
|
|
2318
|
+
# short circuit if we see a line starting with say `time`
|
|
2319
|
+
# but time is defined as a variable (in addition to being
|
|
2320
|
+
# a magic). In these cases users need to use explicit `%time`.
|
|
2321
|
+
return line
|
|
2322
|
+
|
|
2323
|
+
magic_method = line_magics[magic_name]
|
|
2324
|
+
|
|
2325
|
+
try:
|
|
2326
|
+
if magic_name == "timeit":
|
|
2327
|
+
opts, stmt = magic_method.__self__.parse_options(
|
|
2328
|
+
args,
|
|
2329
|
+
"n:r:tcp:qov:",
|
|
2330
|
+
posix=False,
|
|
2331
|
+
strict=False,
|
|
2332
|
+
preserve_non_opts=True,
|
|
2333
|
+
)
|
|
2334
|
+
return stmt
|
|
2335
|
+
elif magic_name == "prun":
|
|
2336
|
+
opts, stmt = magic_method.__self__.parse_options(
|
|
2337
|
+
args, "D:l:rs:T:q", list_all=True, posix=False
|
|
2338
|
+
)
|
|
2339
|
+
return stmt
|
|
2340
|
+
elif hasattr(magic_method, "parser") and getattr(
|
|
2341
|
+
magic_method, "has_arguments", False
|
|
2342
|
+
):
|
|
2343
|
+
# e.g. %debug, %time
|
|
2344
|
+
args, extra = magic_method.parser.parse_argstring(args, partial=True)
|
|
2345
|
+
return " ".join(extra)
|
|
2346
|
+
except UsageError:
|
|
2347
|
+
return line
|
|
2348
|
+
|
|
2349
|
+
return line
|
|
2350
|
+
|
|
2227
2351
|
@context_matcher()
|
|
2228
2352
|
def magic_matcher(self, context: CompletionContext) -> SimpleMatcherResult:
|
|
2229
2353
|
"""Match magics."""
|
|
@@ -2235,7 +2359,7 @@ class IPCompleter(Completer):
|
|
|
2235
2359
|
line_magics = lsm['line']
|
|
2236
2360
|
cell_magics = lsm['cell']
|
|
2237
2361
|
pre = self.magic_escape
|
|
2238
|
-
pre2 = pre+pre
|
|
2362
|
+
pre2 = pre + pre
|
|
2239
2363
|
|
|
2240
2364
|
explicit_magic = text.startswith(pre)
|
|
2241
2365
|
|
|
@@ -2599,10 +2723,13 @@ class IPCompleter(Completer):
|
|
|
2599
2723
|
def python_matcher(self, context: CompletionContext) -> SimpleMatcherResult:
|
|
2600
2724
|
"""Match attributes or global python names"""
|
|
2601
2725
|
text = context.text_until_cursor
|
|
2726
|
+
text = self._extract_code(text)
|
|
2602
2727
|
completion_type = self._determine_completion_context(text)
|
|
2603
2728
|
if completion_type == self._CompletionContextType.ATTRIBUTE:
|
|
2604
2729
|
try:
|
|
2605
|
-
matches, fragment = self._attr_matches(
|
|
2730
|
+
matches, fragment = self._attr_matches(
|
|
2731
|
+
text, include_prefix=False, context=context
|
|
2732
|
+
)
|
|
2606
2733
|
if text.endswith(".") and self.omit__names:
|
|
2607
2734
|
if self.omit__names == 1:
|
|
2608
2735
|
# true if txt is _not_ a __ name, false otherwise:
|
|
@@ -2621,7 +2748,10 @@ class IPCompleter(Completer):
|
|
|
2621
2748
|
# catches <undefined attributes>.<tab>
|
|
2622
2749
|
return SimpleMatcherResult(completions=[], suppress=False)
|
|
2623
2750
|
else:
|
|
2624
|
-
|
|
2751
|
+
try:
|
|
2752
|
+
matches = self.global_matches(context.token, context=context)
|
|
2753
|
+
except TypeError:
|
|
2754
|
+
matches = self.global_matches(context.token)
|
|
2625
2755
|
# TODO: maybe distinguish between functions, modules and just "variables"
|
|
2626
2756
|
return SimpleMatcherResult(
|
|
2627
2757
|
completions=[
|
|
@@ -3456,7 +3586,7 @@ class IPCompleter(Completer):
|
|
|
3456
3586
|
full_text=full_text,
|
|
3457
3587
|
cursor_position=cursor_pos,
|
|
3458
3588
|
cursor_line=cursor_line,
|
|
3459
|
-
token=text,
|
|
3589
|
+
token=self._extract_code(text),
|
|
3460
3590
|
limit=MATCHES_LIMIT,
|
|
3461
3591
|
)
|
|
3462
3592
|
|
|
@@ -353,6 +353,26 @@ class Pdb(OldPdb):
|
|
|
353
353
|
self.initial_frame = frame
|
|
354
354
|
return super().set_trace(frame)
|
|
355
355
|
|
|
356
|
+
def get_stack(self, *args, **kwargs):
|
|
357
|
+
stack, pos = super().get_stack(*args, **kwargs)
|
|
358
|
+
if len(stack) >= 0 and self._is_internal_frame(stack[0][0]):
|
|
359
|
+
stack.pop(0)
|
|
360
|
+
pos -= 1
|
|
361
|
+
return stack, pos
|
|
362
|
+
|
|
363
|
+
def _is_internal_frame(self, frame):
|
|
364
|
+
"""Determine if this frame should be skipped as internal"""
|
|
365
|
+
filename = frame.f_code.co_filename
|
|
366
|
+
|
|
367
|
+
# Skip bdb.py runcall and internal operations
|
|
368
|
+
if filename.endswith("bdb.py"):
|
|
369
|
+
func_name = frame.f_code.co_name
|
|
370
|
+
# Skip internal bdb operations but allow breakpoint hits
|
|
371
|
+
if func_name in ("runcall", "run", "runeval"):
|
|
372
|
+
return True
|
|
373
|
+
|
|
374
|
+
return False
|
|
375
|
+
|
|
356
376
|
def _hidden_predicate(self, frame):
|
|
357
377
|
"""
|
|
358
378
|
Given a frame return whether it it should be hidden or not by IPython.
|
|
@@ -754,7 +774,7 @@ class Pdb(OldPdb):
|
|
|
754
774
|
bp,
|
|
755
775
|
(Token.LinenoEm, num),
|
|
756
776
|
(Token, " "),
|
|
757
|
-
# TODO:
|
|
777
|
+
# TODO: investigate Token.Line here
|
|
758
778
|
(Token, colored_line),
|
|
759
779
|
]
|
|
760
780
|
)
|
|
@@ -1087,6 +1107,21 @@ class Pdb(OldPdb):
|
|
|
1087
1107
|
]
|
|
1088
1108
|
)
|
|
1089
1109
|
)
|
|
1110
|
+
if self.skip and self.is_skipped_module(frame.f_globals.get("__name__", "")):
|
|
1111
|
+
print(
|
|
1112
|
+
self.theme.format(
|
|
1113
|
+
[
|
|
1114
|
+
(
|
|
1115
|
+
Token.ExcName,
|
|
1116
|
+
" [... skipped 1 ignored module(s)]",
|
|
1117
|
+
),
|
|
1118
|
+
(Token, "\n"),
|
|
1119
|
+
]
|
|
1120
|
+
)
|
|
1121
|
+
)
|
|
1122
|
+
|
|
1123
|
+
return False
|
|
1124
|
+
|
|
1090
1125
|
return super().stop_here(frame)
|
|
1091
1126
|
|
|
1092
1127
|
def do_up(self, arg):
|
|
@@ -1094,10 +1129,10 @@ class Pdb(OldPdb):
|
|
|
1094
1129
|
Move the current frame count (default one) levels up in the
|
|
1095
1130
|
stack trace (to an older frame).
|
|
1096
1131
|
|
|
1097
|
-
Will skip hidden frames.
|
|
1132
|
+
Will skip hidden frames and ignored modules.
|
|
1098
1133
|
"""
|
|
1099
1134
|
# modified version of upstream that skips
|
|
1100
|
-
# frames with __tracebackhide__
|
|
1135
|
+
# frames with __tracebackhide__ and ignored modules
|
|
1101
1136
|
if self.curindex == 0:
|
|
1102
1137
|
self.error("Oldest frame")
|
|
1103
1138
|
return
|
|
@@ -1106,15 +1141,27 @@ class Pdb(OldPdb):
|
|
|
1106
1141
|
except ValueError:
|
|
1107
1142
|
self.error("Invalid frame count (%s)" % arg)
|
|
1108
1143
|
return
|
|
1109
|
-
|
|
1144
|
+
|
|
1145
|
+
hidden_skipped = 0
|
|
1146
|
+
module_skipped = 0
|
|
1147
|
+
|
|
1110
1148
|
if count < 0:
|
|
1111
1149
|
_newframe = 0
|
|
1112
1150
|
else:
|
|
1113
1151
|
counter = 0
|
|
1114
1152
|
hidden_frames = self.hidden_frames(self.stack)
|
|
1153
|
+
|
|
1115
1154
|
for i in range(self.curindex - 1, -1, -1):
|
|
1116
|
-
|
|
1117
|
-
|
|
1155
|
+
should_skip_hidden = hidden_frames[i] and self.skip_hidden
|
|
1156
|
+
should_skip_module = self.skip and self.is_skipped_module(
|
|
1157
|
+
self.stack[i][0].f_globals.get("__name__", "")
|
|
1158
|
+
)
|
|
1159
|
+
|
|
1160
|
+
if should_skip_hidden or should_skip_module:
|
|
1161
|
+
if should_skip_hidden:
|
|
1162
|
+
hidden_skipped += 1
|
|
1163
|
+
if should_skip_module:
|
|
1164
|
+
module_skipped += 1
|
|
1118
1165
|
continue
|
|
1119
1166
|
counter += 1
|
|
1120
1167
|
if counter >= count:
|
|
@@ -1122,19 +1169,21 @@ class Pdb(OldPdb):
|
|
|
1122
1169
|
else:
|
|
1123
1170
|
# if no break occurred.
|
|
1124
1171
|
self.error(
|
|
1125
|
-
"all frames above hidden
|
|
1172
|
+
"all frames above skipped (hidden frames and ignored modules). Use `skip_hidden False` for hidden frames or unignore_module for ignored modules."
|
|
1126
1173
|
)
|
|
1127
1174
|
return
|
|
1128
1175
|
|
|
1129
1176
|
_newframe = i
|
|
1130
1177
|
self._select_frame(_newframe)
|
|
1131
|
-
|
|
1178
|
+
|
|
1179
|
+
total_skipped = hidden_skipped + module_skipped
|
|
1180
|
+
if total_skipped:
|
|
1132
1181
|
print(
|
|
1133
1182
|
self.theme.format(
|
|
1134
1183
|
[
|
|
1135
1184
|
(
|
|
1136
1185
|
Token.ExcName,
|
|
1137
|
-
f" [... skipped {
|
|
1186
|
+
f" [... skipped {total_skipped} frame(s): {hidden_skipped} hidden frames + {module_skipped} ignored modules]",
|
|
1138
1187
|
),
|
|
1139
1188
|
(Token, "\n"),
|
|
1140
1189
|
]
|
|
@@ -1146,7 +1195,7 @@ class Pdb(OldPdb):
|
|
|
1146
1195
|
Move the current frame count (default one) levels down in the
|
|
1147
1196
|
stack trace (to a newer frame).
|
|
1148
1197
|
|
|
1149
|
-
Will skip hidden frames.
|
|
1198
|
+
Will skip hidden frames and ignored modules.
|
|
1150
1199
|
"""
|
|
1151
1200
|
if self.curindex + 1 == len(self.stack):
|
|
1152
1201
|
self.error("Newest frame")
|
|
@@ -1160,28 +1209,39 @@ class Pdb(OldPdb):
|
|
|
1160
1209
|
_newframe = len(self.stack) - 1
|
|
1161
1210
|
else:
|
|
1162
1211
|
counter = 0
|
|
1163
|
-
|
|
1212
|
+
hidden_skipped = 0
|
|
1213
|
+
module_skipped = 0
|
|
1164
1214
|
hidden_frames = self.hidden_frames(self.stack)
|
|
1215
|
+
|
|
1165
1216
|
for i in range(self.curindex + 1, len(self.stack)):
|
|
1166
|
-
|
|
1167
|
-
|
|
1217
|
+
should_skip_hidden = hidden_frames[i] and self.skip_hidden
|
|
1218
|
+
should_skip_module = self.skip and self.is_skipped_module(
|
|
1219
|
+
self.stack[i][0].f_globals.get("__name__", "")
|
|
1220
|
+
)
|
|
1221
|
+
|
|
1222
|
+
if should_skip_hidden or should_skip_module:
|
|
1223
|
+
if should_skip_hidden:
|
|
1224
|
+
hidden_skipped += 1
|
|
1225
|
+
if should_skip_module:
|
|
1226
|
+
module_skipped += 1
|
|
1168
1227
|
continue
|
|
1169
1228
|
counter += 1
|
|
1170
1229
|
if counter >= count:
|
|
1171
1230
|
break
|
|
1172
1231
|
else:
|
|
1173
1232
|
self.error(
|
|
1174
|
-
"all frames below hidden
|
|
1233
|
+
"all frames below skipped (hidden frames and ignored modules). Use `skip_hidden False` for hidden frames or unignore_module for ignored modules."
|
|
1175
1234
|
)
|
|
1176
1235
|
return
|
|
1177
1236
|
|
|
1178
|
-
|
|
1237
|
+
total_skipped = hidden_skipped + module_skipped
|
|
1238
|
+
if total_skipped:
|
|
1179
1239
|
print(
|
|
1180
1240
|
self.theme.format(
|
|
1181
1241
|
[
|
|
1182
1242
|
(
|
|
1183
1243
|
Token.ExcName,
|
|
1184
|
-
f" [... skipped {
|
|
1244
|
+
f" [... skipped {total_skipped} frame(s): {hidden_skipped} hidden frames + {module_skipped} ignored modules]",
|
|
1185
1245
|
),
|
|
1186
1246
|
(Token, "\n"),
|
|
1187
1247
|
]
|
|
@@ -1194,6 +1254,67 @@ class Pdb(OldPdb):
|
|
|
1194
1254
|
do_d = do_down
|
|
1195
1255
|
do_u = do_up
|
|
1196
1256
|
|
|
1257
|
+
def _show_ignored_modules(self):
|
|
1258
|
+
"""Display currently ignored modules."""
|
|
1259
|
+
if self.skip:
|
|
1260
|
+
print(f"Currently ignored modules: {sorted(self.skip)}")
|
|
1261
|
+
else:
|
|
1262
|
+
print("No modules are currently ignored.")
|
|
1263
|
+
|
|
1264
|
+
def do_ignore_module(self, arg):
|
|
1265
|
+
"""ignore_module <module_name>
|
|
1266
|
+
|
|
1267
|
+
Add a module to the list of modules to skip when navigating frames.
|
|
1268
|
+
When a module is ignored, the debugger will automatically skip over
|
|
1269
|
+
frames from that module.
|
|
1270
|
+
|
|
1271
|
+
Supports wildcard patterns using fnmatch syntax:
|
|
1272
|
+
|
|
1273
|
+
Usage:
|
|
1274
|
+
ignore_module threading # Skip threading module frames
|
|
1275
|
+
ignore_module asyncio.\\* # Skip all asyncio submodules
|
|
1276
|
+
ignore_module \\*.tests # Skip all test modules
|
|
1277
|
+
ignore_module # List currently ignored modules
|
|
1278
|
+
"""
|
|
1279
|
+
|
|
1280
|
+
if self.skip is None:
|
|
1281
|
+
self.skip = set()
|
|
1282
|
+
|
|
1283
|
+
module_name = arg.strip()
|
|
1284
|
+
|
|
1285
|
+
if not module_name:
|
|
1286
|
+
self._show_ignored_modules()
|
|
1287
|
+
return
|
|
1288
|
+
|
|
1289
|
+
self.skip.add(module_name)
|
|
1290
|
+
|
|
1291
|
+
def do_unignore_module(self, arg):
|
|
1292
|
+
"""unignore_module <module_name>
|
|
1293
|
+
|
|
1294
|
+
Remove a module from the list of modules to skip when navigating frames.
|
|
1295
|
+
This will allow the debugger to step into frames from the specified module.
|
|
1296
|
+
|
|
1297
|
+
Usage:
|
|
1298
|
+
unignore_module threading # Stop ignoring threading module frames
|
|
1299
|
+
unignore_module asyncio.\\* # Remove asyncio.* pattern
|
|
1300
|
+
unignore_module # List currently ignored modules
|
|
1301
|
+
"""
|
|
1302
|
+
|
|
1303
|
+
if self.skip is None:
|
|
1304
|
+
self.skip = set()
|
|
1305
|
+
|
|
1306
|
+
module_name = arg.strip()
|
|
1307
|
+
|
|
1308
|
+
if not module_name:
|
|
1309
|
+
self._show_ignored_modules()
|
|
1310
|
+
return
|
|
1311
|
+
|
|
1312
|
+
try:
|
|
1313
|
+
self.skip.remove(module_name)
|
|
1314
|
+
except KeyError:
|
|
1315
|
+
print(f"Module {module_name} is not currently ignored")
|
|
1316
|
+
self._show_ignored_modules()
|
|
1317
|
+
|
|
1197
1318
|
def do_context(self, context: str):
|
|
1198
1319
|
"""context number_of_lines
|
|
1199
1320
|
Set the number of lines of source code to show when displaying
|
|
@@ -43,6 +43,9 @@ class DisplayPublisher(Configurable):
|
|
|
43
43
|
def __init__(self, shell=None, *args, **kwargs):
|
|
44
44
|
self.shell = shell
|
|
45
45
|
self._is_publishing = False
|
|
46
|
+
self._in_post_execute = False
|
|
47
|
+
if self.shell:
|
|
48
|
+
self._setup_execution_tracking()
|
|
46
49
|
super().__init__(*args, **kwargs)
|
|
47
50
|
|
|
48
51
|
def _validate_data(self, data, metadata=None):
|
|
@@ -62,6 +65,19 @@ class DisplayPublisher(Configurable):
|
|
|
62
65
|
if not isinstance(metadata, dict):
|
|
63
66
|
raise TypeError("metadata must be a dict, got: %r" % data)
|
|
64
67
|
|
|
68
|
+
def _setup_execution_tracking(self):
|
|
69
|
+
"""Set up hooks to track execution state"""
|
|
70
|
+
self.shell.events.register("post_execute", self._on_post_execute)
|
|
71
|
+
self.shell.events.register("pre_execute", self._on_pre_execute)
|
|
72
|
+
|
|
73
|
+
def _on_post_execute(self):
|
|
74
|
+
"""Called at start of post_execute phase"""
|
|
75
|
+
self._in_post_execute = True
|
|
76
|
+
|
|
77
|
+
def _on_pre_execute(self):
|
|
78
|
+
"""Called at start of pre_execute phase"""
|
|
79
|
+
self._in_post_execute = False
|
|
80
|
+
|
|
65
81
|
# use * to indicate transient, update are keyword-only
|
|
66
82
|
def publish(
|
|
67
83
|
self,
|
|
@@ -133,7 +149,13 @@ class DisplayPublisher(Configurable):
|
|
|
133
149
|
|
|
134
150
|
outputs = self.shell.history_manager.outputs
|
|
135
151
|
|
|
136
|
-
|
|
152
|
+
target_execution_count = self.shell.execution_count
|
|
153
|
+
if self._in_post_execute:
|
|
154
|
+
# We're in post_execute, so this is likely a matplotlib flush
|
|
155
|
+
# Use execution_count - 1 to associate with the cell that created the plot
|
|
156
|
+
target_execution_count = self.shell.execution_count - 1
|
|
157
|
+
|
|
158
|
+
outputs[target_execution_count].append(
|
|
137
159
|
HistoryOutput(output_type="display_data", bundle=data)
|
|
138
160
|
)
|
|
139
161
|
|