ipython 9.17.1__tar.gz → 9.18.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.17.1 → ipython-9.18.0}/IPython/core/completer.py +170 -19
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/display.py +20 -11
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/displayhook.py +7 -2
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/formatters.py +9 -1
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/history.py +13 -7
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/hooks.py +19 -3
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/inputtransformer2.py +10 -4
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/kitty.py +26 -9
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/magic.py +65 -14
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/magics/code.py +3 -6
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/magics/execution.py +5 -1
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/magics/namespace.py +4 -1
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/magics/packaging.py +14 -11
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/release.py +2 -2
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/usage.py +2 -2
- {ipython-9.17.1 → ipython-9.18.0}/IPython/extensions/tests/test_deduperreload.py +9 -15
- {ipython-9.17.1 → ipython-9.18.0}/IPython/lib/display.py +3 -2
- {ipython-9.17.1 → ipython-9.18.0}/IPython/testing/plugin/pytest_ipdoctest.py +5 -1
- ipython-9.18.0/IPython/utils/PyColorize.py +742 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/_sysinfo.py +1 -1
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/text.py +2 -2
- ipython-9.18.0/IPython/utils/themes/gruvbox-dark.json +27 -0
- ipython-9.18.0/IPython/utils/themes/lightbg.json +29 -0
- ipython-9.18.0/IPython/utils/themes/linux.json +29 -0
- ipython-9.18.0/IPython/utils/themes/neutral-nt.json +36 -0
- ipython-9.18.0/IPython/utils/themes/neutral-posix.json +36 -0
- ipython-9.18.0/IPython/utils/themes/nocolor.json +5 -0
- ipython-9.18.0/IPython/utils/themes/pride-l.json +55 -0
- ipython-9.18.0/IPython/utils/themes/pride.json +40 -0
- {ipython-9.17.1 → ipython-9.18.0}/MANIFEST.in +1 -0
- {ipython-9.17.1 → ipython-9.18.0}/PKG-INFO +2 -3
- {ipython-9.17.1 → ipython-9.18.0}/README.rst +0 -3
- {ipython-9.17.1 → ipython-9.18.0}/docs/requirements.txt +0 -1
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/about/license_and_copyright.rst +2 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/config/details.rst +77 -6
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/interactive/autoawait.rst +11 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/interactive/reference.rst +8 -8
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/sphinx.toml +1 -1
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/whatsnew/index.rst +0 -11
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/whatsnew/version0.11.rst +1 -2
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/whatsnew/version0.12.rst +2 -5
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/whatsnew/version0.13.rst +2 -4
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/whatsnew/version1.0.rst +1 -3
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/whatsnew/version2.0.rst +1 -19
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/whatsnew/version3.rst +21 -28
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/whatsnew/version5.rst +1 -1
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/whatsnew/version9.rst +161 -6
- {ipython-9.17.1 → ipython-9.18.0}/docs/sphinxext/apigen.py +1 -1
- {ipython-9.17.1 → ipython-9.18.0}/ipython.egg-info/PKG-INFO +2 -3
- {ipython-9.17.1 → ipython-9.18.0}/ipython.egg-info/SOURCES.txt +13 -11
- {ipython-9.17.1 → ipython-9.18.0}/ipython.egg-info/requires.txt +1 -2
- {ipython-9.17.1 → ipython-9.18.0}/pyproject.toml +10 -2
- ipython-9.18.0/tests/hill-alpha.webp +0 -0
- ipython-9.18.0/tests/hill-animated.webp +0 -0
- ipython-9.18.0/tests/hill-lossless.webp +0 -0
- ipython-9.18.0/tests/hill-lossy.webp +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_async_helpers.py +1 -4
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_completer.py +118 -1
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_debugger.py +18 -10
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_demo.py +1 -1
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_display.py +11 -1
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_display_2.py +71 -4
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_exceptiongroup_tb.py +6 -24
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_formatters.py +19 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_help.py +3 -5
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_history.py +29 -1
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_hooks.py +75 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_inputtransformer2.py +15 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_interactiveshell.py +40 -10
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_kitty.py +44 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_magic.py +282 -12
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_magic_table.py +7 -5
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_magics_code.py +5 -6
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_magics_packaging.py +21 -2
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_run.py +23 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_text_utils.py +10 -0
- ipython-9.18.0/tests/test_themes.py +419 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_zzz_autoreload.py +13 -16
- ipython-9.17.1/IPython/utils/PyColorize.py +0 -665
- ipython-9.17.1/docs/source/whatsnew/github-stats-0.11.rst +0 -528
- ipython-9.17.1/docs/source/whatsnew/github-stats-0.12.rst +0 -621
- ipython-9.17.1/docs/source/whatsnew/github-stats-0.13.rst +0 -1203
- ipython-9.17.1/docs/source/whatsnew/github-stats-1.0.rst +0 -1883
- ipython-9.17.1/docs/source/whatsnew/github-stats-2.0.rst +0 -1607
- ipython-9.17.1/docs/source/whatsnew/github-stats-3.rst +0 -269
- ipython-9.17.1/docs/source/whatsnew/github-stats-4.rst +0 -178
- ipython-9.17.1/docs/source/whatsnew/github-stats-5.rst +0 -201
- ipython-9.17.1/docs/source/whatsnew/github-stats-6.rst +0 -184
- ipython-9.17.1/docs/source/whatsnew/github-stats-7.rst +0 -544
- ipython-9.17.1/docs/source/whatsnew/github-stats-8.rst +0 -111
- {ipython-9.17.1 → ipython-9.18.0}/.flake8 +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/.mailmap +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/.pre-commit-config.yaml +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/COPYING.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/__init__.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/__main__.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/__init__.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/_dunder_ops.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/alias.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/application.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/async_helpers.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/autocall.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/builtin_trap.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/compilerop.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/completerlib.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/crashhandler.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/debugger.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/debugger_backport.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/display_functions.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/display_trap.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/displaypub.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/doctb.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/error.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/events.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/extensions.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/getipython.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/guarded_eval.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/historyapp.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/interactiveshell.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/latex_symbols.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/logger.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/macro.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/magic_arguments.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/magics/__init__.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/magics/_table.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/magics/ast_mod.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/magics/auto.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/magics/basic.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/magics/config.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/magics/display.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/magics/extension.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/magics/history.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/magics/logging.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/magics/osm.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/magics/pylab.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/magics/script.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/oinspect.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/page.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/payload.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/payloadpage.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/prefilter.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/profile/README_STARTUP +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/profileapp.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/profiledir.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/pylabtools.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/shellapp.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/splitinput.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/tbtools.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/tips.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/core/ultratb.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/display.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/extensions/__init__.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/extensions/autoreload.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/extensions/deduperreload/__init__.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/extensions/deduperreload/deduperreload.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/extensions/deduperreload/deduperreload_patching.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/extensions/storemagic.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/external/__init__.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/external/pickleshare.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/external/qt_for_kernel.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/external/qt_loaders.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/lib/__init__.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/lib/backgroundjobs.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/lib/clipboard.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/lib/deepreload.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/lib/demo.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/lib/editorhooks.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/lib/guisupport.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/lib/latextools.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/lib/lexers.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/lib/pretty.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/paths.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/py.typed +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/sphinxext/__init__.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/sphinxext/custom_doctests.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/sphinxext/ipython_console_highlighting.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/sphinxext/ipython_directive.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/sphinxext/tests/__init__.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/sphinxext/tests/test_ansi_stripping.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/__init__.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/debugger.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/embed.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/interactiveshell.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/ipapp.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/magics.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/prompts.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/pt_inputhooks/__init__.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/pt_inputhooks/asyncio.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/pt_inputhooks/glut.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/pt_inputhooks/gtk.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/pt_inputhooks/gtk3.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/pt_inputhooks/gtk4.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/pt_inputhooks/osx.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/pt_inputhooks/pyglet.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/pt_inputhooks/qt.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/pt_inputhooks/tk.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/pt_inputhooks/wx.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/ptutils.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/shortcuts/__init__.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/shortcuts/auto_match.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/shortcuts/auto_suggest.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/shortcuts/filters.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/tests/__init__.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/terminal/tests/test_ptutils.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/testing/__init__.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/testing/decorators.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/testing/globalipapp.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/testing/ipunittest.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/testing/plugin/Makefile +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/testing/plugin/__init__.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/testing/plugin/dtexample.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/testing/plugin/ipdoctest.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/testing/plugin/setup.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/testing/plugin/simple.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/testing/plugin/simplevars.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/testing/plugin/test_combo.txt +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/testing/plugin/test_example.txt +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/testing/plugin/test_exampleip.txt +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/testing/plugin/test_ipdoctest.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/testing/plugin/test_refs.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/testing/skipdoctest.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/testing/tools.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/__init__.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/_process_common.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/_process_emscripten.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/_process_posix.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/_process_win32.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/capture.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/coloransi.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/contexts.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/data.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/decorators.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/dir2.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/docs.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/encoding.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/frame.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/generics.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/importstring.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/io.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/ipstruct.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/module_paths.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/openpy.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/path.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/process.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/sentinel.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/strdispatch.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/sysinfo.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/syspathcontext.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/tempdir.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/terminal.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/timing.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/tokenutil.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/IPython/utils/wildcard.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/LICENSE +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/_build_meta.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/conftest.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/Makefile +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/README.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/autogen_api.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/autogen_config.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/autogen_magics.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/autogen_shortcuts.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/make.cmd +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/man/ipython.1 +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/modernization_triage_2026-07.md +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/2.0/running-crop.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/2.0/running.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/2.0/treeview.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/2.0/user-interface.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/2.0/widgets.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/8.0/auto_suggest_1_prompt_no_text.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/8.0/auto_suggest_2_print_hello_suggest.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/8.0/auto_suggest_3_print_hello_suggest.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/8.0/auto_suggest_4_print_hello.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/8.0/auto_suggest_d_completions.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/8.0/auto_suggest_d_phantom.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/8.0/auto_suggest_def_completions.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/8.0/auto_suggest_def_phantom.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/8.0/auto_suggest_match_parens.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/8.0/auto_suggest_second_prompt.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/8.0/pathlib_pathlib_everywhere.jpg +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/autosuggest.gif +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/ipy_013_dashboard.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/ipy_013_dashboard_cluster.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/ipy_013_notebook_cythonmagic.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/ipy_013_notebook_long_out.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/ipy_013_notebook_octavemagic.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/ipy_013_notebook_rmagic.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/ipy_013_notebook_script_cells.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/ipy_013_notebook_spectrogram.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/ipy_013_notebook_tooltip.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/ipy_013_par_tb.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/ipy_013_qtconsole_baboon.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/ipy_013_qtconsole_completer.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/ipython-6-screenshot.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/jedi_type_inference_60.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/kernel_selector_screenshot.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/ms_visual_studio.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/notebook_specgram.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/ptshell_features.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/qtconsole.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/qtconsole_tabbed.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_images/unicode_completion.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_static/favicon.ico +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_static/logo.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_static/theme_overrides.css +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_templates/breadcrumbs.html +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/_templates/notebook_redirect.html +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/about/history.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/about/index.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/api/index.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/conf.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/config/callbacks.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/config/custommagics.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/config/eventloops.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/config/extensions/autoreload.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/config/extensions/index.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/config/extensions/storemagic.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/config/index.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/config/inputtransforms.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/config/integrating.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/config/intro.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/config/options/index.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/config/shell_mimerenderer.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/config/shortcuts/index.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/coredev/index.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/development/config.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/development/execution.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/development/figs/ipy_kernel_and_terminal.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/development/figs/ipy_kernel_and_terminal.svg +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/development/figs/other_kernels.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/development/figs/other_kernels.svg +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/development/how_ipython_works.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/development/index.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/development/kernels.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/development/messaging.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/development/wrapperkernels.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/index.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/install/index.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/install/install.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/install/kernel_install.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/interactive/index.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/interactive/magics.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/interactive/plotting.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/interactive/python-ipython-diff.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/interactive/shell.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/interactive/tips.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/interactive/tutorial.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/links.txt +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/overview.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/parallel/index.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/sphinxext.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/whatsnew/development.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/whatsnew/pr/README.md +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/whatsnew/pr/antigravity-feature.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/whatsnew/pr/incompat-switching-to-perl.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/whatsnew/version0.10.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/whatsnew/version0.8.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/whatsnew/version0.9.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/whatsnew/version3_widget_migration.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/whatsnew/version4.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/whatsnew/version6.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/whatsnew/version7.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/source/whatsnew/version8.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/sphinxext/configtraits.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/docs/sphinxext/magics.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/examples/Embedding/embed_class_long.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/examples/Embedding/embed_class_short.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/examples/Embedding/embed_function.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/examples/Embedding/start_ipython_config.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/examples/IPython Kernel/example-demo.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/examples/IPython Kernel/gui/gui-glut.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/examples/IPython Kernel/gui/gui-gtk4.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/examples/IPython Kernel/gui/gui-qt.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/examples/IPython Kernel/ipython-completion.bash +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/examples/IPython Kernel/ipython-get-history.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/examples/IPython Kernel/ipython.desktop +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/examples/auto_suggest_llm.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/examples/utils/cwd_prompt.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/examples/utils/list_pyfiles.ipy +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/examples/utils/list_subdirs.ipy +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/ipython.egg-info/dependency_links.txt +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/ipython.egg-info/entry_points.txt +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/ipython.egg-info/not-zip-safe +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/ipython.egg-info/top_level.txt +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/long_description.rst +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/scripts/ipython.ico +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/scripts/ipython_nb.ico +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/setup.cfg +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/setup.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/setupbase.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/2x2.jpg +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/2x2.png +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/__init__.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/bad_all.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/conftest.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/fake_ext_dir/daft_extension.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/fake_llm.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/nonascii.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/nonascii2.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/print_argv.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/refbug.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/simpleerr.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/tclass.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test.wav +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_alias.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_application.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_autocall.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_backgroundjobs.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_capture.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_clipboard.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_compilerop.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_completerlib.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_contexts.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_crashhandler.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_cve.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_data.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_debug_magic.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_debugger_backport.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_decorators.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_decorators_2.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_deepreload.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_dir2.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_display_functions.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_display_trap.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_displayhook.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_doctb.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_editorhooks.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_embed.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_encoding.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_error.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_events.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_extension.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_frame.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_generics.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_guarded_eval.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_guisupport.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_handlers.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_historyapp.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_imports.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_importstring.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_inputtransformer2_line.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_interactivshell.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_io.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_ipapp.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_iplib.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_ipstruct.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_ipunittest.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_ipython_directive.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_latextools.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_logger.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_logger_unit.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_macro.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_magic_arguments.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_magic_terminal.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_magics_pylab.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_module_paths.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_oinspect.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_openpy.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_page.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_path.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_paths.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_payload.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_pickleshare.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_prefilter.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_pretty.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_process.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_profile.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_pt_inputhooks.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_ptutils.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_pycolorize.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_pylabtools.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_qt_loaders.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_sentinel.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_shellapp.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_shortcuts.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_splitinput.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_storemagic.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_strdispatch.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_sysinfo.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_syspathcontext.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_tempdir.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_terminal_utils.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_text.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_timing.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_tips.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_tokenutil.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_tools.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_ultratb.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_utils_misc.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_utils_terminal.py +0 -0
- {ipython-9.17.1 → ipython-9.18.0}/tests/test_wildcard.py +0 -0
|
@@ -973,6 +973,11 @@ class CompletionSplitter:
|
|
|
973
973
|
return self._delim_re.split(cut_line)[-1]
|
|
974
974
|
|
|
975
975
|
|
|
976
|
+
# keywords which end the expression before them (`x if c else d`, `k in d`),
|
|
977
|
+
# as opposed to the constant keywords which are expressions (`None`, `True`)
|
|
978
|
+
_KEYWORDS_ENDING_EXPRESSION = frozenset(keyword.kwlist) - {"True", "False", "None"}
|
|
979
|
+
|
|
980
|
+
|
|
976
981
|
class Completer(Configurable):
|
|
977
982
|
|
|
978
983
|
greedy = Bool(
|
|
@@ -1265,6 +1270,16 @@ class Completer(Configurable):
|
|
|
1265
1270
|
encountered_operator = True
|
|
1266
1271
|
after_operator = []
|
|
1267
1272
|
continue
|
|
1273
|
+
elif (
|
|
1274
|
+
t.type == tokenize.NAME
|
|
1275
|
+
and nesting_level == 0
|
|
1276
|
+
and t.string in _KEYWORDS_ENDING_EXPRESSION
|
|
1277
|
+
):
|
|
1278
|
+
# a keyword (`in`, `else`, `lambda`, `not`, ...) ends the
|
|
1279
|
+
# expression before it just like an operator does
|
|
1280
|
+
encountered_operator = True
|
|
1281
|
+
after_operator = []
|
|
1282
|
+
continue
|
|
1268
1283
|
|
|
1269
1284
|
if encountered_operator:
|
|
1270
1285
|
after_operator.append(t.string)
|
|
@@ -1293,19 +1308,20 @@ class Completer(Configurable):
|
|
|
1293
1308
|
except tokenize.TokenError:
|
|
1294
1309
|
pass
|
|
1295
1310
|
|
|
1296
|
-
obj =
|
|
1297
|
-
if
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1311
|
+
obj = not_found
|
|
1312
|
+
if context:
|
|
1313
|
+
# try to evaluate on full buffer
|
|
1314
|
+
previous_lines = "\n".join(
|
|
1315
|
+
context.full_text.split("\n")[: context.cursor_line]
|
|
1316
|
+
)
|
|
1317
|
+
if previous_lines:
|
|
1318
|
+
all_code_lines_before_cursor = (
|
|
1319
|
+
self._extract_code(previous_lines) + "\n" + expr
|
|
1302
1320
|
)
|
|
1303
|
-
|
|
1304
|
-
all_code_lines_before_cursor = (
|
|
1305
|
-
self._extract_code(previous_lines) + "\n" + expr
|
|
1306
|
-
)
|
|
1307
|
-
obj = self._evaluate_expr(all_code_lines_before_cursor)
|
|
1321
|
+
obj = self._evaluate_expr(all_code_lines_before_cursor)
|
|
1308
1322
|
|
|
1323
|
+
if obj is not_found:
|
|
1324
|
+
obj = self._evaluate_expr(expr)
|
|
1309
1325
|
if obj is not_found:
|
|
1310
1326
|
return [], ""
|
|
1311
1327
|
|
|
@@ -2617,8 +2633,11 @@ class IPCompleter(Completer):
|
|
|
2617
2633
|
if is_string and not is_in_expression:
|
|
2618
2634
|
return self._CompletionContextType.GLOBAL
|
|
2619
2635
|
|
|
2620
|
-
# If we're in a template string expression, handle specially
|
|
2621
|
-
|
|
2636
|
+
# If we're in a template string expression, handle specially.
|
|
2637
|
+
# Note that ``is_string`` may be False here for nested template strings
|
|
2638
|
+
# (``f'{f'a.``) as the naive quote tracking sees the inner opening quote
|
|
2639
|
+
# as closing the outer one; the recursion below sorts this out.
|
|
2640
|
+
if is_in_expression:
|
|
2622
2641
|
# Extract the expression part - look for the last { that isn't closed
|
|
2623
2642
|
expr_start = line.rfind("{")
|
|
2624
2643
|
if expr_start >= 0:
|
|
@@ -2633,12 +2652,119 @@ class IPCompleter(Completer):
|
|
|
2633
2652
|
return self._CompletionContextType.GLOBAL
|
|
2634
2653
|
|
|
2635
2654
|
# Handle all other attribute matches np.ran, d[0].k, (a,b).count, obj._private
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2655
|
+
# A trailing dot is only an attribute access if what precedes it is a
|
|
2656
|
+
# valid Python expression; malformed input such as ``3a.`` or ``$).``
|
|
2657
|
+
# is not, and falls back to global completion.
|
|
2658
|
+
target = self._extract_attribute_target(line)
|
|
2659
|
+
if target is not None:
|
|
2660
|
+
try:
|
|
2661
|
+
ast.parse(target, mode="eval")
|
|
2662
|
+
except (SyntaxError, ValueError):
|
|
2663
|
+
pass
|
|
2664
|
+
else:
|
|
2665
|
+
return self._CompletionContextType.ATTRIBUTE
|
|
2639
2666
|
|
|
2640
2667
|
return self._CompletionContextType.GLOBAL
|
|
2641
2668
|
|
|
2669
|
+
def _extract_attribute_target(self, line: str) -> str | None:
|
|
2670
|
+
"""Extract the expression a trailing ``.attr`` would be looked up on.
|
|
2671
|
+
|
|
2672
|
+
Scan *line* backwards from the last dot (which must be followed by at
|
|
2673
|
+
most an identifier and nothing else) and return the primary expression
|
|
2674
|
+
preceding it, or ``None`` if there is no trailing attribute access or
|
|
2675
|
+
no plausible expression in front of it.
|
|
2676
|
+
"""
|
|
2677
|
+
match = re.search(r"\.(?:[a-zA-Z_]\w*)?$", line)
|
|
2678
|
+
if match is None:
|
|
2679
|
+
return None
|
|
2680
|
+
dot = match.start()
|
|
2681
|
+
i = dot - 1
|
|
2682
|
+
while i >= 0:
|
|
2683
|
+
char = line[i]
|
|
2684
|
+
if char in ")]":
|
|
2685
|
+
# A call or subscript trailer, or a parenthesized/list atom;
|
|
2686
|
+
# whatever precedes it may still be part of the expression.
|
|
2687
|
+
i = self._skip_backwards_over_brackets(line, i)
|
|
2688
|
+
if i is None:
|
|
2689
|
+
return None
|
|
2690
|
+
continue
|
|
2691
|
+
if char == "}":
|
|
2692
|
+
# A dict/set display; nothing may precede it.
|
|
2693
|
+
i = self._skip_backwards_over_brackets(line, i)
|
|
2694
|
+
if i is None:
|
|
2695
|
+
return None
|
|
2696
|
+
break
|
|
2697
|
+
if char in "\"'":
|
|
2698
|
+
# A string literal; nothing but its prefix may precede it.
|
|
2699
|
+
i = self._skip_backwards_over_string(line, i)
|
|
2700
|
+
if i is None:
|
|
2701
|
+
return None
|
|
2702
|
+
break
|
|
2703
|
+
if char.isalnum() or char == "_":
|
|
2704
|
+
while i >= 0 and (line[i].isalnum() or line[i] == "_"):
|
|
2705
|
+
i -= 1
|
|
2706
|
+
# a name or number may itself be an attribute of something else
|
|
2707
|
+
if i >= 0 and line[i] == ".":
|
|
2708
|
+
i -= 1
|
|
2709
|
+
continue
|
|
2710
|
+
break
|
|
2711
|
+
# anything else (operator, bracket, whitespace, ...) ends the
|
|
2712
|
+
# expression
|
|
2713
|
+
break
|
|
2714
|
+
return line[i + 1 : dot] or None
|
|
2715
|
+
|
|
2716
|
+
def _skip_backwards_over_brackets(self, line: str, i: int) -> int | None:
|
|
2717
|
+
"""Skip a bracketed group ending at index *i* (a closing bracket).
|
|
2718
|
+
|
|
2719
|
+
Return the index just before the matching opening bracket, or ``None``
|
|
2720
|
+
if the brackets are unbalanced.
|
|
2721
|
+
"""
|
|
2722
|
+
depth = 0
|
|
2723
|
+
while i >= 0:
|
|
2724
|
+
char = line[i]
|
|
2725
|
+
if char in "\"'":
|
|
2726
|
+
skipped = self._skip_backwards_over_string(line, i)
|
|
2727
|
+
if skipped is None:
|
|
2728
|
+
return None
|
|
2729
|
+
i = skipped
|
|
2730
|
+
continue
|
|
2731
|
+
if char in ")]}":
|
|
2732
|
+
depth += 1
|
|
2733
|
+
elif char in "([{":
|
|
2734
|
+
depth -= 1
|
|
2735
|
+
if depth == 0:
|
|
2736
|
+
return i - 1
|
|
2737
|
+
if depth < 0:
|
|
2738
|
+
return None
|
|
2739
|
+
i -= 1
|
|
2740
|
+
return None
|
|
2741
|
+
|
|
2742
|
+
def _skip_backwards_over_string(self, line: str, i: int) -> int | None:
|
|
2743
|
+
"""Skip a string literal ending at index *i* (its closing quote).
|
|
2744
|
+
|
|
2745
|
+
Return the index just before the opening quote (and any string prefix),
|
|
2746
|
+
or ``None`` if no opening quote was found.
|
|
2747
|
+
"""
|
|
2748
|
+
quote = line[i]
|
|
2749
|
+
j = i - 1
|
|
2750
|
+
while j >= 0:
|
|
2751
|
+
if line[j] == quote:
|
|
2752
|
+
backslashes = 0
|
|
2753
|
+
k = j - 1
|
|
2754
|
+
while k >= 0 and line[k] == "\\":
|
|
2755
|
+
backslashes += 1
|
|
2756
|
+
k -= 1
|
|
2757
|
+
if backslashes % 2 == 0:
|
|
2758
|
+
break
|
|
2759
|
+
j -= 1
|
|
2760
|
+
else:
|
|
2761
|
+
return None
|
|
2762
|
+
j -= 1
|
|
2763
|
+
# skip any string prefix (r, b, u, f, t and combinations thereof)
|
|
2764
|
+
while j >= 0 and line[j] in "bBrRuUfFtT":
|
|
2765
|
+
j -= 1
|
|
2766
|
+
return j
|
|
2767
|
+
|
|
2642
2768
|
def _is_completing_in_cli_context(self, text: str) -> bool:
|
|
2643
2769
|
"""
|
|
2644
2770
|
Determine if we are completing in a CLI alias, line magic, or bang expression context.
|
|
@@ -2991,11 +3117,23 @@ class IPCompleter(Completer):
|
|
|
2991
3117
|
|
|
2992
3118
|
usedNamedArgs.add(token)
|
|
2993
3119
|
|
|
3120
|
+
from IPython.core.guarded_eval import EvaluationContext, guarded_eval
|
|
3121
|
+
|
|
2994
3122
|
argMatches = []
|
|
2995
3123
|
try:
|
|
2996
3124
|
callableObj = '.'.join(ids[::-1])
|
|
2997
|
-
namedArgs = self._default_arguments(
|
|
2998
|
-
|
|
3125
|
+
namedArgs = self._default_arguments(
|
|
3126
|
+
guarded_eval(
|
|
3127
|
+
callableObj,
|
|
3128
|
+
EvaluationContext(
|
|
3129
|
+
globals=self.global_namespace,
|
|
3130
|
+
locals=self.namespace,
|
|
3131
|
+
evaluation=self.evaluation,
|
|
3132
|
+
auto_import=self._auto_import,
|
|
3133
|
+
policy_overrides=self.policy_overrides,
|
|
3134
|
+
),
|
|
3135
|
+
)
|
|
3136
|
+
)
|
|
2999
3137
|
|
|
3000
3138
|
# Remove used named arguments from the list, no need to show twice
|
|
3001
3139
|
for namedArg in set(namedArgs) - usedNamedArgs:
|
|
@@ -3058,7 +3196,20 @@ class IPCompleter(Completer):
|
|
|
3058
3196
|
|
|
3059
3197
|
expr, prior_tuple_keys, key_prefix = match.groups()
|
|
3060
3198
|
|
|
3061
|
-
|
|
3199
|
+
# the regular expression captures everything before the bracket.
|
|
3200
|
+
# Only the expression after the last operator or keyword is subscripted.
|
|
3201
|
+
try:
|
|
3202
|
+
stripped_expr = self._strip_code_before_operator(expr)
|
|
3203
|
+
except tokenize.TokenError:
|
|
3204
|
+
stripped_expr = expr
|
|
3205
|
+
|
|
3206
|
+
obj = self._evaluate_expr(stripped_expr)
|
|
3207
|
+
|
|
3208
|
+
if obj is not_found and stripped_expr != expr:
|
|
3209
|
+
# stripping joins tokens that were separated by whitespace, so
|
|
3210
|
+
# `%timeit d` becomes `timeitd`, which `_evaluate_expr` does not
|
|
3211
|
+
# trim because it is a valid name rather than a syntax error
|
|
3212
|
+
obj = self._evaluate_expr(expr)
|
|
3062
3213
|
|
|
3063
3214
|
if obj is not_found:
|
|
3064
3215
|
return []
|
|
@@ -540,7 +540,7 @@ class ProgressBar(DisplayObject):
|
|
|
540
540
|
self._display_id = hexlify(os.urandom(8)).decode('ascii')
|
|
541
541
|
|
|
542
542
|
def __repr__(self):
|
|
543
|
-
fraction = self.progress / self.total
|
|
543
|
+
fraction = self.progress / self.total if self.total else 0
|
|
544
544
|
filled = '=' * int(fraction * self.text_width)
|
|
545
545
|
rest = ' ' * (self.text_width - len(filled))
|
|
546
546
|
return '[{}{}] {}/{}'.format(
|
|
@@ -832,18 +832,21 @@ def _webpxy(data):
|
|
|
832
832
|
"""read the (width, height) from a WEBP header"""
|
|
833
833
|
import struct
|
|
834
834
|
if data[12:16] == b"VP8 ":
|
|
835
|
-
|
|
835
|
+
# lossy: 14 bits each, after the frame tag and the start code
|
|
836
|
+
width, height = struct.unpack("<HH", data[26:30])
|
|
836
837
|
width = width & 0x3FFF
|
|
837
838
|
height = height & 0x3FFF
|
|
838
839
|
return (width, height)
|
|
839
840
|
elif data[12:16] == b"VP8L":
|
|
841
|
+
# lossless: 14 bits each of (width - 1, height - 1), after the signature
|
|
840
842
|
size_info = struct.unpack("<I", data[21:25])[0]
|
|
841
|
-
width = 1 + (
|
|
842
|
-
height = 1 + (
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
)
|
|
843
|
+
width = 1 + (size_info & 0x3FFF)
|
|
844
|
+
height = 1 + ((size_info >> 14) & 0x3FFF)
|
|
845
|
+
return (width, height)
|
|
846
|
+
elif data[12:16] == b"VP8X":
|
|
847
|
+
# extended: 24 bits each of (canvas width - 1, canvas height - 1)
|
|
848
|
+
width = 1 + int.from_bytes(data[24:27], "little")
|
|
849
|
+
height = 1 + int.from_bytes(data[27:30], "little")
|
|
847
850
|
return (width, height)
|
|
848
851
|
else:
|
|
849
852
|
raise ValueError("Not a valid WEBP header")
|
|
@@ -863,7 +866,7 @@ class ImageFormat(_ImageFormat, Enum):
|
|
|
863
866
|
jpeg = (b"\xff\xd8",), _jpegxy
|
|
864
867
|
jpg = jpeg # alias, has `.name == "jpeg"`
|
|
865
868
|
gif = (b"GIF87a", b"GIF89a"), _gifxy
|
|
866
|
-
webp = (b"
|
|
869
|
+
webp = (b"RIFF",), _webpxy
|
|
867
870
|
|
|
868
871
|
@property
|
|
869
872
|
def mime_type(self):
|
|
@@ -874,6 +877,10 @@ class ImageFormat(_ImageFormat, Enum):
|
|
|
874
877
|
for fmt in cls:
|
|
875
878
|
for magic in fmt.magics:
|
|
876
879
|
if data.startswith(magic):
|
|
880
|
+
# RIFF is a generic container (WAV, AVI, ...), WEBP files
|
|
881
|
+
# are identified by the form type after the size field.
|
|
882
|
+
if fmt is cls.webp and data[8:12] != b"WEBP":
|
|
883
|
+
continue
|
|
877
884
|
return fmt
|
|
878
885
|
return None
|
|
879
886
|
|
|
@@ -914,7 +921,8 @@ class Image(DisplayObject):
|
|
|
914
921
|
|
|
915
922
|
filename : unicode
|
|
916
923
|
Path to a local file to load the data from.
|
|
917
|
-
Images from a file are
|
|
924
|
+
Images from a file are embedded unless you specify `embed=False`,
|
|
925
|
+
in which case the path is used as the image source.
|
|
918
926
|
|
|
919
927
|
format : unicode
|
|
920
928
|
The format of the image data (png/jpeg/jpg/gif/webp). If a filename or URL is given
|
|
@@ -1066,8 +1074,9 @@ class Image(DisplayObject):
|
|
|
1066
1074
|
klass = ' class="unconfined"'
|
|
1067
1075
|
if self.alt:
|
|
1068
1076
|
alt = ' alt="%s"' % html.escape(self.alt)
|
|
1077
|
+
url = self.url if self.url is not None else self.filename
|
|
1069
1078
|
return '<img src="{url}"{width}{height}{klass}{alt}/>'.format(
|
|
1070
|
-
url=html.escape(
|
|
1079
|
+
url=html.escape(url or ""),
|
|
1071
1080
|
width=width,
|
|
1072
1081
|
height=height,
|
|
1073
1082
|
klass=klass,
|
|
@@ -221,8 +221,13 @@ class DisplayHook(Configurable):
|
|
|
221
221
|
for unders in ['_'*i for i in range(1,4)]:
|
|
222
222
|
if unders not in self.shell.user_ns:
|
|
223
223
|
continue
|
|
224
|
-
|
|
225
|
-
|
|
224
|
+
user_value = self.shell.user_ns[unders]
|
|
225
|
+
if unders in self.shell.user_ns_hidden:
|
|
226
|
+
if self.shell.user_ns_hidden[unders] is user_value:
|
|
227
|
+
continue
|
|
228
|
+
elif getattr(self, unders) is user_value:
|
|
229
|
+
continue
|
|
230
|
+
update_unders = False
|
|
226
231
|
|
|
227
232
|
self.___ = self.__
|
|
228
233
|
self.__ = self._
|
|
@@ -29,7 +29,7 @@ We can now define our own formatter and register it:
|
|
|
29
29
|
|
|
30
30
|
>>> llm_formatter = LLMFormatter(parent=ip.display_formatter)
|
|
31
31
|
|
|
32
|
-
>>> ip.display_formatter.
|
|
32
|
+
>>> ip.display_formatter.register_formatter(llm_formatter)
|
|
33
33
|
|
|
34
34
|
Now any class that define `_repr_llm_` will return a x-vendor/llm as part of
|
|
35
35
|
it's display data:
|
|
@@ -144,6 +144,14 @@ class DisplayFormatter(Configurable):
|
|
|
144
144
|
d[f.format_type] = f
|
|
145
145
|
return d
|
|
146
146
|
|
|
147
|
+
def register_formatter(self, formatter):
|
|
148
|
+
if formatter.format_type in self.formatters:
|
|
149
|
+
warnings.warn(
|
|
150
|
+
f"Replacing formatter {type(self.formatters[formatter.format_type])} with {type(formatter)}",
|
|
151
|
+
FormatterWarning,
|
|
152
|
+
)
|
|
153
|
+
self.formatters[formatter.format_type] = formatter
|
|
154
|
+
|
|
147
155
|
def format(self, obj, include=None, exclude=None):
|
|
148
156
|
"""Return a format data dict for an object.
|
|
149
157
|
|
|
@@ -234,7 +234,7 @@ class HistoryAccessorBase(LoggingConfigurable):
|
|
|
234
234
|
|
|
235
235
|
def get_tail(
|
|
236
236
|
self,
|
|
237
|
-
n: int = 10,
|
|
237
|
+
n: int | None = 10,
|
|
238
238
|
raw: bool = True,
|
|
239
239
|
output: bool = False,
|
|
240
240
|
include_latest: bool = False,
|
|
@@ -541,7 +541,7 @@ class HistoryAccessor(HistoryAccessorBase):
|
|
|
541
541
|
@catch_corrupt_db
|
|
542
542
|
def get_tail(
|
|
543
543
|
self,
|
|
544
|
-
n: int = 10,
|
|
544
|
+
n: int | None = 10,
|
|
545
545
|
raw: bool = True,
|
|
546
546
|
output: bool = False,
|
|
547
547
|
include_latest: bool = False,
|
|
@@ -550,8 +550,9 @@ class HistoryAccessor(HistoryAccessorBase):
|
|
|
550
550
|
|
|
551
551
|
Parameters
|
|
552
552
|
----------
|
|
553
|
-
n : int
|
|
554
|
-
The number of lines to get
|
|
553
|
+
n : int or None
|
|
554
|
+
The number of lines to get. None gets the default of 10, which a
|
|
555
|
+
kernel ``history_request`` without ``n`` asks for.
|
|
555
556
|
raw, output : bool
|
|
556
557
|
See :meth:`get_range`
|
|
557
558
|
include_latest : bool
|
|
@@ -563,6 +564,8 @@ class HistoryAccessor(HistoryAccessorBase):
|
|
|
563
564
|
-------
|
|
564
565
|
Tuples as :meth:`get_range`
|
|
565
566
|
"""
|
|
567
|
+
if n is None:
|
|
568
|
+
n = 10
|
|
566
569
|
self.writeout_cache()
|
|
567
570
|
if not include_latest:
|
|
568
571
|
n += 1
|
|
@@ -966,7 +969,7 @@ class HistoryManager(HistoryAccessor):
|
|
|
966
969
|
@catch_corrupt_db
|
|
967
970
|
def get_tail(
|
|
968
971
|
self,
|
|
969
|
-
n: int = 10,
|
|
972
|
+
n: int | None = 10,
|
|
970
973
|
raw: bool = True,
|
|
971
974
|
output: bool = False,
|
|
972
975
|
include_latest: bool = False,
|
|
@@ -980,8 +983,9 @@ class HistoryManager(HistoryAccessor):
|
|
|
980
983
|
|
|
981
984
|
Parameters
|
|
982
985
|
----------
|
|
983
|
-
n : int
|
|
984
|
-
The number of lines to get
|
|
986
|
+
n : int or None
|
|
987
|
+
The number of lines to get. None gets the default of 10, which a
|
|
988
|
+
kernel ``history_request`` without ``n`` asks for.
|
|
985
989
|
raw, output : bool
|
|
986
990
|
See :meth:`get_range`
|
|
987
991
|
include_latest : bool
|
|
@@ -993,6 +997,8 @@ class HistoryManager(HistoryAccessor):
|
|
|
993
997
|
-------
|
|
994
998
|
Tuples as :meth:`get_range`
|
|
995
999
|
"""
|
|
1000
|
+
if n is None:
|
|
1001
|
+
n = 10
|
|
996
1002
|
self.writeout_cache()
|
|
997
1003
|
if not include_latest:
|
|
998
1004
|
n += 1
|
|
@@ -55,12 +55,27 @@ __all__ = [
|
|
|
55
55
|
"clipboard_get",
|
|
56
56
|
]
|
|
57
57
|
|
|
58
|
+
|
|
59
|
+
def _quote_if_needed(path):
|
|
60
|
+
"""Wrap path in double quotes if it contains spaces and isn't already quoted."""
|
|
61
|
+
if " " in path and not (path.startswith('"') and path.endswith('"')):
|
|
62
|
+
return '"%s"' % path
|
|
63
|
+
return path
|
|
64
|
+
|
|
65
|
+
|
|
58
66
|
def editor(self, filename, linenum=None, wait=True):
|
|
59
67
|
"""Open the default editor at the given filename and linenumber.
|
|
60
68
|
|
|
61
69
|
This is IPython's default editor hook, you can use it as an example to
|
|
62
70
|
write your own modified one. To set your own editor function as the
|
|
63
|
-
new editor hook, call ip.set_hook('editor',yourfunc).
|
|
71
|
+
new editor hook, call ip.set_hook('editor',yourfunc).
|
|
72
|
+
|
|
73
|
+
Notes
|
|
74
|
+
-----
|
|
75
|
+
`filename` is always passed in raw/unquoted form. Any quoting or
|
|
76
|
+
escaping needed to safely build a shell command is the responsibility
|
|
77
|
+
of the hook implementation, not the caller.
|
|
78
|
+
"""
|
|
64
79
|
|
|
65
80
|
# IPython configures a default editor at startup by reading $EDITOR from
|
|
66
81
|
# the environment, and falling back on vi (unix) or notepad (win32).
|
|
@@ -73,8 +88,9 @@ def editor(self, filename, linenum=None, wait=True):
|
|
|
73
88
|
linemark = '+%d' % int(linenum)
|
|
74
89
|
|
|
75
90
|
# Enclose in quotes if necessary and legal
|
|
76
|
-
if
|
|
77
|
-
editor =
|
|
91
|
+
if os.path.isfile(editor):
|
|
92
|
+
editor = _quote_if_needed(editor)
|
|
93
|
+
filename = _quote_if_needed(filename)
|
|
78
94
|
|
|
79
95
|
# Call the actual editor
|
|
80
96
|
import subprocess
|
|
@@ -663,9 +663,12 @@ def make_tokens_by_line(lines: list[str]):
|
|
|
663
663
|
tokens_by_line[-1].append(token)
|
|
664
664
|
if (token.type == NEWLINE) or ((token.type == NL) and (parenlev <= 0)):
|
|
665
665
|
tokens_by_line.append([])
|
|
666
|
-
elif token.string in {"(", "[", "{"}:
|
|
666
|
+
elif token.type == tokenize.OP and token.string in {"(", "[", "{"}:
|
|
667
|
+
# Only OP tokens are real brackets; e.g. on Python 3.12+
|
|
668
|
+
# FSTRING_MIDDLE tokens may contain bracket characters as
|
|
669
|
+
# literal text (refs #15436).
|
|
667
670
|
parenlev += 1
|
|
668
|
-
elif token.string in {")", "]", "}"}:
|
|
671
|
+
elif token.type == tokenize.OP and token.string in {")", "]", "}"}:
|
|
669
672
|
if parenlev > 0:
|
|
670
673
|
parenlev -= 1
|
|
671
674
|
except tokenize.TokenError:
|
|
@@ -682,9 +685,12 @@ def has_sunken_brackets(tokens: list[tokenize.TokenInfo]):
|
|
|
682
685
|
"""Check if the depth of brackets in the list of tokens drops below 0"""
|
|
683
686
|
parenlev = 0
|
|
684
687
|
for token in tokens:
|
|
685
|
-
|
|
688
|
+
# Only OP tokens are real brackets; e.g. on Python 3.12+
|
|
689
|
+
# FSTRING_MIDDLE tokens may contain bracket characters as
|
|
690
|
+
# literal text (refs #15436).
|
|
691
|
+
if token.type == tokenize.OP and token.string in {"(", "[", "{"}:
|
|
686
692
|
parenlev += 1
|
|
687
|
-
elif token.string in {")", "]", "}"}:
|
|
693
|
+
elif token.type == tokenize.OP and token.string in {")", "]", "}"}:
|
|
688
694
|
parenlev -= 1
|
|
689
695
|
if parenlev < 0:
|
|
690
696
|
return True
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
from base64 import b64encode, b64decode
|
|
4
4
|
from collections.abc import Iterator
|
|
5
|
+
import logging
|
|
5
6
|
import os
|
|
6
7
|
import sys
|
|
7
8
|
import warnings
|
|
8
9
|
|
|
10
|
+
#: Module logger ``IPython.core.kitty``
|
|
11
|
+
#: We don't have a global logger so let's use a module leveled one.
|
|
12
|
+
_log = logging.getLogger(__name__)
|
|
13
|
+
|
|
9
14
|
#: Set ``IPYTHON_KITTY_GRAPHICS`` to ``1``/``true`` or ``0``/``false`` to state
|
|
10
15
|
#: outright whether the terminal speaks the kitty graphics protocol. Unset (or
|
|
11
16
|
#: empty) autodetects. Forcing it also skips the detection itself, which walks
|
|
@@ -71,11 +76,18 @@ def _proc_ancestor_names() -> Iterator[str]:
|
|
|
71
76
|
|
|
72
77
|
def _psutil_ancestor_names() -> Iterator[str]:
|
|
73
78
|
"""Yield ancestor process names, nearest first, using psutil."""
|
|
74
|
-
|
|
79
|
+
try:
|
|
80
|
+
import psutil
|
|
81
|
+
except ImportError as exc_import:
|
|
82
|
+
_log.error(
|
|
83
|
+
"Cannot import `psutil`(%s). Image rendering is disabled.", exc_import
|
|
84
|
+
)
|
|
85
|
+
return
|
|
75
86
|
|
|
76
87
|
try:
|
|
77
88
|
process = psutil.Process()
|
|
78
|
-
while
|
|
89
|
+
while (parent := process.parent()) is not None:
|
|
90
|
+
process = parent
|
|
79
91
|
yield process.name()
|
|
80
92
|
except (psutil.Error, OSError):
|
|
81
93
|
# Walking the process tree can fail when /proc is mounted with
|
|
@@ -97,7 +109,7 @@ def _ancestor_process_names() -> Iterator[str]:
|
|
|
97
109
|
Everywhere else -- macOS, or a Linux without ``/proc`` -- fall back to
|
|
98
110
|
psutil, which IPython depends on anyway.
|
|
99
111
|
"""
|
|
100
|
-
if sys.platform
|
|
112
|
+
if sys.platform in ("linux", "android") and os.path.isdir("/proc/self"):
|
|
101
113
|
yield from _proc_ancestor_names()
|
|
102
114
|
else:
|
|
103
115
|
yield from _psutil_ancestor_names()
|
|
@@ -108,7 +120,13 @@ def _supports_kitty_graphics() -> bool:
|
|
|
108
120
|
if forced is not None:
|
|
109
121
|
return forced
|
|
110
122
|
|
|
111
|
-
|
|
123
|
+
# Platforms including "android" can actually run shells like kitty and
|
|
124
|
+
# render images. See also
|
|
125
|
+
# https://github.com/ipython/ipython/issues/15422 .
|
|
126
|
+
# Thus, instead of a whitelist, let's build a blacklist.
|
|
127
|
+
# Make the linter happy. A tuple includes platform names should be placed
|
|
128
|
+
# here.
|
|
129
|
+
if sys.platform == "win32":
|
|
112
130
|
return False
|
|
113
131
|
|
|
114
132
|
isatty = getattr(sys.stdout, "isatty", None)
|
|
@@ -130,9 +148,6 @@ def _supports_kitty_graphics() -> bool:
|
|
|
130
148
|
return any(name in supported_terminals for name in _ancestor_process_names())
|
|
131
149
|
|
|
132
150
|
|
|
133
|
-
supports_kitty_graphics = _supports_kitty_graphics()
|
|
134
|
-
|
|
135
|
-
|
|
136
151
|
def png_to_kitty_ansi(png: bytes) -> str:
|
|
137
152
|
if not png.startswith(b"\x89PNG\r\n\x1a\n"):
|
|
138
153
|
raise ValueError
|
|
@@ -162,9 +177,11 @@ def kitty_png_render(png: bytes | str, _md_dict: object) -> None:
|
|
|
162
177
|
|
|
163
178
|
display_formatter_default_active_types = [
|
|
164
179
|
"text/plain",
|
|
165
|
-
*(["image/png"] if supports_kitty_graphics else []),
|
|
166
180
|
]
|
|
167
181
|
|
|
168
182
|
terminal_default_mime_renderers = {
|
|
169
|
-
"image/png": kitty_png_render,
|
|
170
183
|
}
|
|
184
|
+
|
|
185
|
+
if _supports_kitty_graphics():
|
|
186
|
+
display_formatter_default_active_types.append("image/png")
|
|
187
|
+
terminal_default_mime_renderers["image/png"] = kitty_png_render
|