ipython 9.16.1__tar.gz → 9.17.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.
Files changed (481) hide show
  1. {ipython-9.16.1 → ipython-9.17.0}/IPython/__init__.py +71 -3
  2. ipython-9.17.0/IPython/core/_dunder_ops.py +65 -0
  3. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/alias.py +1 -1
  4. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/application.py +12 -4
  5. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/async_helpers.py +13 -1
  6. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/compilerop.py +1 -1
  7. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/completer.py +38 -8
  8. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/display.py +9 -4
  9. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/display_functions.py +3 -3
  10. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/displayhook.py +1 -1
  11. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/doctb.py +28 -5
  12. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/formatters.py +1 -1
  13. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/guarded_eval.py +6 -43
  14. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/history.py +68 -21
  15. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/hooks.py +1 -1
  16. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/interactiveshell.py +130 -78
  17. ipython-9.17.0/IPython/core/kitty.py +170 -0
  18. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/logger.py +0 -5
  19. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/magic.py +159 -13
  20. ipython-9.17.0/IPython/core/magics/__init__.py +71 -0
  21. ipython-9.17.0/IPython/core/magics/_table.py +205 -0
  22. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/magics/basic.py +15 -5
  23. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/magics/code.py +14 -3
  24. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/magics/config.py +3 -0
  25. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/magics/execution.py +14 -6
  26. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/magics/osm.py +2 -1
  27. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/magics/script.py +10 -21
  28. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/oinspect.py +9 -4
  29. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/page.py +4 -4
  30. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/profiledir.py +2 -1
  31. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/release.py +2 -2
  32. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/splitinput.py +4 -2
  33. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/tbtools.py +32 -8
  34. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/tips.py +7 -7
  35. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/ultratb.py +33 -5
  36. {ipython-9.16.1 → ipython-9.17.0}/IPython/extensions/autoreload.py +6 -2
  37. {ipython-9.16.1 → ipython-9.17.0}/IPython/lib/display.py +14 -2
  38. {ipython-9.16.1 → ipython-9.17.0}/IPython/lib/pretty.py +2 -1
  39. {ipython-9.16.1 → ipython-9.17.0}/IPython/paths.py +1 -1
  40. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/interactiveshell.py +38 -11
  41. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/ipapp.py +5 -4
  42. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/ptutils.py +41 -11
  43. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/shortcuts/filters.py +5 -1
  44. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/PyColorize.py +86 -6
  45. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/_process_common.py +14 -3
  46. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/_process_win32.py +4 -4
  47. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/_sysinfo.py +1 -1
  48. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/encoding.py +2 -1
  49. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/io.py +1 -1
  50. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/path.py +4 -5
  51. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/process.py +1 -1
  52. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/sysinfo.py +5 -3
  53. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/terminal.py +11 -6
  54. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/tokenutil.py +9 -0
  55. {ipython-9.16.1/ipython.egg-info → ipython-9.17.0}/PKG-INFO +1 -1
  56. {ipython-9.16.1 → ipython-9.17.0}/docs/autogen_magics.py +3 -0
  57. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/version9.rst +190 -39
  58. {ipython-9.16.1 → ipython-9.17.0/ipython.egg-info}/PKG-INFO +1 -1
  59. {ipython-9.16.1 → ipython-9.17.0}/ipython.egg-info/SOURCES.txt +3 -0
  60. {ipython-9.16.1 → ipython-9.17.0}/tests/test_application.py +20 -1
  61. {ipython-9.16.1 → ipython-9.17.0}/tests/test_inputtransformer2.py +11 -0
  62. ipython-9.17.0/tests/test_kitty.py +273 -0
  63. {ipython-9.16.1 → ipython-9.17.0}/tests/test_magic.py +11 -2
  64. ipython-9.17.0/tests/test_magic_table.py +296 -0
  65. {ipython-9.16.1 → ipython-9.17.0}/tests/test_page.py +20 -6
  66. {ipython-9.16.1 → ipython-9.17.0}/tests/test_path.py +7 -19
  67. {ipython-9.16.1 → ipython-9.17.0}/tests/test_terminal_utils.py +2 -1
  68. {ipython-9.16.1 → ipython-9.17.0}/tests/test_tips.py +30 -2
  69. {ipython-9.16.1 → ipython-9.17.0}/tests/test_tokenutil.py +40 -2
  70. {ipython-9.16.1 → ipython-9.17.0}/tests/test_utils_misc.py +4 -5
  71. {ipython-9.16.1 → ipython-9.17.0}/tests/test_utils_terminal.py +13 -2
  72. {ipython-9.16.1 → ipython-9.17.0}/tests/test_zzz_autoreload.py +11 -0
  73. ipython-9.16.1/IPython/core/kitty.py +0 -82
  74. ipython-9.16.1/IPython/core/magics/__init__.py +0 -42
  75. ipython-9.16.1/tests/test_kitty.py +0 -84
  76. {ipython-9.16.1 → ipython-9.17.0}/.flake8 +0 -0
  77. {ipython-9.16.1 → ipython-9.17.0}/.mailmap +0 -0
  78. {ipython-9.16.1 → ipython-9.17.0}/.pre-commit-config.yaml +0 -0
  79. {ipython-9.16.1 → ipython-9.17.0}/COPYING.rst +0 -0
  80. {ipython-9.16.1 → ipython-9.17.0}/IPython/__main__.py +0 -0
  81. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/__init__.py +0 -0
  82. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/autocall.py +0 -0
  83. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/builtin_trap.py +0 -0
  84. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/completerlib.py +0 -0
  85. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/crashhandler.py +0 -0
  86. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/debugger.py +0 -0
  87. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/debugger_backport.py +0 -0
  88. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/display_trap.py +0 -0
  89. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/displaypub.py +0 -0
  90. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/error.py +0 -0
  91. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/events.py +0 -0
  92. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/extensions.py +0 -0
  93. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/getipython.py +0 -0
  94. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/historyapp.py +0 -0
  95. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/inputtransformer2.py +0 -0
  96. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/latex_symbols.py +0 -0
  97. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/macro.py +0 -0
  98. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/magic_arguments.py +0 -0
  99. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/magics/ast_mod.py +0 -0
  100. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/magics/auto.py +0 -0
  101. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/magics/display.py +0 -0
  102. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/magics/extension.py +0 -0
  103. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/magics/history.py +0 -0
  104. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/magics/logging.py +0 -0
  105. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/magics/namespace.py +0 -0
  106. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/magics/packaging.py +0 -0
  107. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/magics/pylab.py +0 -0
  108. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/payload.py +0 -0
  109. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/payloadpage.py +0 -0
  110. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/prefilter.py +0 -0
  111. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/profile/README_STARTUP +0 -0
  112. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/profileapp.py +0 -0
  113. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/pylabtools.py +0 -0
  114. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/shellapp.py +0 -0
  115. {ipython-9.16.1 → ipython-9.17.0}/IPython/core/usage.py +0 -0
  116. {ipython-9.16.1 → ipython-9.17.0}/IPython/display.py +0 -0
  117. {ipython-9.16.1 → ipython-9.17.0}/IPython/extensions/__init__.py +0 -0
  118. {ipython-9.16.1 → ipython-9.17.0}/IPython/extensions/deduperreload/__init__.py +0 -0
  119. {ipython-9.16.1 → ipython-9.17.0}/IPython/extensions/deduperreload/deduperreload.py +0 -0
  120. {ipython-9.16.1 → ipython-9.17.0}/IPython/extensions/deduperreload/deduperreload_patching.py +0 -0
  121. {ipython-9.16.1 → ipython-9.17.0}/IPython/extensions/storemagic.py +0 -0
  122. {ipython-9.16.1 → ipython-9.17.0}/IPython/extensions/tests/test_deduperreload.py +0 -0
  123. {ipython-9.16.1 → ipython-9.17.0}/IPython/external/__init__.py +0 -0
  124. {ipython-9.16.1 → ipython-9.17.0}/IPython/external/pickleshare.py +0 -0
  125. {ipython-9.16.1 → ipython-9.17.0}/IPython/external/qt_for_kernel.py +0 -0
  126. {ipython-9.16.1 → ipython-9.17.0}/IPython/external/qt_loaders.py +0 -0
  127. {ipython-9.16.1 → ipython-9.17.0}/IPython/lib/__init__.py +0 -0
  128. {ipython-9.16.1 → ipython-9.17.0}/IPython/lib/backgroundjobs.py +0 -0
  129. {ipython-9.16.1 → ipython-9.17.0}/IPython/lib/clipboard.py +0 -0
  130. {ipython-9.16.1 → ipython-9.17.0}/IPython/lib/deepreload.py +0 -0
  131. {ipython-9.16.1 → ipython-9.17.0}/IPython/lib/demo.py +0 -0
  132. {ipython-9.16.1 → ipython-9.17.0}/IPython/lib/editorhooks.py +0 -0
  133. {ipython-9.16.1 → ipython-9.17.0}/IPython/lib/guisupport.py +0 -0
  134. {ipython-9.16.1 → ipython-9.17.0}/IPython/lib/latextools.py +0 -0
  135. {ipython-9.16.1 → ipython-9.17.0}/IPython/lib/lexers.py +0 -0
  136. {ipython-9.16.1 → ipython-9.17.0}/IPython/py.typed +0 -0
  137. {ipython-9.16.1 → ipython-9.17.0}/IPython/sphinxext/__init__.py +0 -0
  138. {ipython-9.16.1 → ipython-9.17.0}/IPython/sphinxext/custom_doctests.py +0 -0
  139. {ipython-9.16.1 → ipython-9.17.0}/IPython/sphinxext/ipython_console_highlighting.py +0 -0
  140. {ipython-9.16.1 → ipython-9.17.0}/IPython/sphinxext/ipython_directive.py +0 -0
  141. {ipython-9.16.1 → ipython-9.17.0}/IPython/sphinxext/tests/__init__.py +0 -0
  142. {ipython-9.16.1 → ipython-9.17.0}/IPython/sphinxext/tests/test_ansi_stripping.py +0 -0
  143. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/__init__.py +0 -0
  144. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/debugger.py +0 -0
  145. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/embed.py +0 -0
  146. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/magics.py +0 -0
  147. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/prompts.py +0 -0
  148. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/pt_inputhooks/__init__.py +0 -0
  149. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/pt_inputhooks/asyncio.py +0 -0
  150. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/pt_inputhooks/glut.py +0 -0
  151. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/pt_inputhooks/gtk.py +0 -0
  152. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/pt_inputhooks/gtk3.py +0 -0
  153. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/pt_inputhooks/gtk4.py +0 -0
  154. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/pt_inputhooks/osx.py +0 -0
  155. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/pt_inputhooks/pyglet.py +0 -0
  156. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/pt_inputhooks/qt.py +0 -0
  157. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/pt_inputhooks/tk.py +0 -0
  158. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/pt_inputhooks/wx.py +0 -0
  159. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/shortcuts/__init__.py +0 -0
  160. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/shortcuts/auto_match.py +0 -0
  161. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/shortcuts/auto_suggest.py +0 -0
  162. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/tests/__init__.py +0 -0
  163. {ipython-9.16.1 → ipython-9.17.0}/IPython/terminal/tests/test_ptutils.py +0 -0
  164. {ipython-9.16.1 → ipython-9.17.0}/IPython/testing/__init__.py +0 -0
  165. {ipython-9.16.1 → ipython-9.17.0}/IPython/testing/decorators.py +0 -0
  166. {ipython-9.16.1 → ipython-9.17.0}/IPython/testing/globalipapp.py +0 -0
  167. {ipython-9.16.1 → ipython-9.17.0}/IPython/testing/ipunittest.py +0 -0
  168. {ipython-9.16.1 → ipython-9.17.0}/IPython/testing/plugin/Makefile +0 -0
  169. {ipython-9.16.1 → ipython-9.17.0}/IPython/testing/plugin/__init__.py +0 -0
  170. {ipython-9.16.1 → ipython-9.17.0}/IPython/testing/plugin/dtexample.py +0 -0
  171. {ipython-9.16.1 → ipython-9.17.0}/IPython/testing/plugin/ipdoctest.py +0 -0
  172. {ipython-9.16.1 → ipython-9.17.0}/IPython/testing/plugin/pytest_ipdoctest.py +0 -0
  173. {ipython-9.16.1 → ipython-9.17.0}/IPython/testing/plugin/setup.py +0 -0
  174. {ipython-9.16.1 → ipython-9.17.0}/IPython/testing/plugin/simple.py +0 -0
  175. {ipython-9.16.1 → ipython-9.17.0}/IPython/testing/plugin/simplevars.py +0 -0
  176. {ipython-9.16.1 → ipython-9.17.0}/IPython/testing/plugin/test_combo.txt +0 -0
  177. {ipython-9.16.1 → ipython-9.17.0}/IPython/testing/plugin/test_example.txt +0 -0
  178. {ipython-9.16.1 → ipython-9.17.0}/IPython/testing/plugin/test_exampleip.txt +0 -0
  179. {ipython-9.16.1 → ipython-9.17.0}/IPython/testing/plugin/test_ipdoctest.py +0 -0
  180. {ipython-9.16.1 → ipython-9.17.0}/IPython/testing/plugin/test_refs.py +0 -0
  181. {ipython-9.16.1 → ipython-9.17.0}/IPython/testing/skipdoctest.py +0 -0
  182. {ipython-9.16.1 → ipython-9.17.0}/IPython/testing/tools.py +0 -0
  183. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/__init__.py +0 -0
  184. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/_process_emscripten.py +0 -0
  185. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/_process_posix.py +0 -0
  186. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/capture.py +0 -0
  187. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/coloransi.py +0 -0
  188. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/contexts.py +0 -0
  189. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/data.py +0 -0
  190. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/decorators.py +0 -0
  191. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/dir2.py +0 -0
  192. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/docs.py +0 -0
  193. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/frame.py +0 -0
  194. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/generics.py +0 -0
  195. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/importstring.py +0 -0
  196. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/ipstruct.py +0 -0
  197. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/module_paths.py +0 -0
  198. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/openpy.py +0 -0
  199. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/sentinel.py +0 -0
  200. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/strdispatch.py +0 -0
  201. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/syspathcontext.py +0 -0
  202. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/tempdir.py +0 -0
  203. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/text.py +0 -0
  204. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/timing.py +0 -0
  205. {ipython-9.16.1 → ipython-9.17.0}/IPython/utils/wildcard.py +0 -0
  206. {ipython-9.16.1 → ipython-9.17.0}/LICENSE +0 -0
  207. {ipython-9.16.1 → ipython-9.17.0}/MANIFEST.in +0 -0
  208. {ipython-9.16.1 → ipython-9.17.0}/README.rst +0 -0
  209. {ipython-9.16.1 → ipython-9.17.0}/_build_meta.py +0 -0
  210. {ipython-9.16.1 → ipython-9.17.0}/conftest.py +0 -0
  211. {ipython-9.16.1 → ipython-9.17.0}/docs/Makefile +0 -0
  212. {ipython-9.16.1 → ipython-9.17.0}/docs/README.rst +0 -0
  213. {ipython-9.16.1 → ipython-9.17.0}/docs/autogen_api.py +0 -0
  214. {ipython-9.16.1 → ipython-9.17.0}/docs/autogen_config.py +0 -0
  215. {ipython-9.16.1 → ipython-9.17.0}/docs/autogen_shortcuts.py +0 -0
  216. {ipython-9.16.1 → ipython-9.17.0}/docs/make.cmd +0 -0
  217. {ipython-9.16.1 → ipython-9.17.0}/docs/man/ipython.1 +0 -0
  218. {ipython-9.16.1 → ipython-9.17.0}/docs/modernization_triage_2026-07.md +0 -0
  219. {ipython-9.16.1 → ipython-9.17.0}/docs/requirements.txt +0 -0
  220. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/2.0/running-crop.png +0 -0
  221. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/2.0/running.png +0 -0
  222. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/2.0/treeview.png +0 -0
  223. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/2.0/user-interface.png +0 -0
  224. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/2.0/widgets.png +0 -0
  225. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/8.0/auto_suggest_1_prompt_no_text.png +0 -0
  226. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/8.0/auto_suggest_2_print_hello_suggest.png +0 -0
  227. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/8.0/auto_suggest_3_print_hello_suggest.png +0 -0
  228. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/8.0/auto_suggest_4_print_hello.png +0 -0
  229. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/8.0/auto_suggest_d_completions.png +0 -0
  230. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/8.0/auto_suggest_d_phantom.png +0 -0
  231. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/8.0/auto_suggest_def_completions.png +0 -0
  232. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/8.0/auto_suggest_def_phantom.png +0 -0
  233. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/8.0/auto_suggest_match_parens.png +0 -0
  234. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/8.0/auto_suggest_second_prompt.png +0 -0
  235. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/8.0/pathlib_pathlib_everywhere.jpg +0 -0
  236. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/autosuggest.gif +0 -0
  237. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/ipy_013_dashboard.png +0 -0
  238. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/ipy_013_dashboard_cluster.png +0 -0
  239. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/ipy_013_notebook_cythonmagic.png +0 -0
  240. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/ipy_013_notebook_long_out.png +0 -0
  241. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/ipy_013_notebook_octavemagic.png +0 -0
  242. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/ipy_013_notebook_rmagic.png +0 -0
  243. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/ipy_013_notebook_script_cells.png +0 -0
  244. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/ipy_013_notebook_spectrogram.png +0 -0
  245. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/ipy_013_notebook_tooltip.png +0 -0
  246. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/ipy_013_par_tb.png +0 -0
  247. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/ipy_013_qtconsole_baboon.png +0 -0
  248. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/ipy_013_qtconsole_completer.png +0 -0
  249. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/ipython-6-screenshot.png +0 -0
  250. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/jedi_type_inference_60.png +0 -0
  251. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/kernel_selector_screenshot.png +0 -0
  252. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/ms_visual_studio.png +0 -0
  253. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/notebook_specgram.png +0 -0
  254. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/ptshell_features.png +0 -0
  255. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/qtconsole.png +0 -0
  256. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/qtconsole_tabbed.png +0 -0
  257. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_images/unicode_completion.png +0 -0
  258. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_static/favicon.ico +0 -0
  259. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_static/logo.png +0 -0
  260. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_static/theme_overrides.css +0 -0
  261. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_templates/breadcrumbs.html +0 -0
  262. {ipython-9.16.1 → ipython-9.17.0}/docs/source/_templates/notebook_redirect.html +0 -0
  263. {ipython-9.16.1 → ipython-9.17.0}/docs/source/about/history.rst +0 -0
  264. {ipython-9.16.1 → ipython-9.17.0}/docs/source/about/index.rst +0 -0
  265. {ipython-9.16.1 → ipython-9.17.0}/docs/source/about/license_and_copyright.rst +0 -0
  266. {ipython-9.16.1 → ipython-9.17.0}/docs/source/api/index.rst +0 -0
  267. {ipython-9.16.1 → ipython-9.17.0}/docs/source/conf.py +0 -0
  268. {ipython-9.16.1 → ipython-9.17.0}/docs/source/config/callbacks.rst +0 -0
  269. {ipython-9.16.1 → ipython-9.17.0}/docs/source/config/custommagics.rst +0 -0
  270. {ipython-9.16.1 → ipython-9.17.0}/docs/source/config/details.rst +0 -0
  271. {ipython-9.16.1 → ipython-9.17.0}/docs/source/config/eventloops.rst +0 -0
  272. {ipython-9.16.1 → ipython-9.17.0}/docs/source/config/extensions/autoreload.rst +0 -0
  273. {ipython-9.16.1 → ipython-9.17.0}/docs/source/config/extensions/index.rst +0 -0
  274. {ipython-9.16.1 → ipython-9.17.0}/docs/source/config/extensions/storemagic.rst +0 -0
  275. {ipython-9.16.1 → ipython-9.17.0}/docs/source/config/index.rst +0 -0
  276. {ipython-9.16.1 → ipython-9.17.0}/docs/source/config/inputtransforms.rst +0 -0
  277. {ipython-9.16.1 → ipython-9.17.0}/docs/source/config/integrating.rst +0 -0
  278. {ipython-9.16.1 → ipython-9.17.0}/docs/source/config/intro.rst +0 -0
  279. {ipython-9.16.1 → ipython-9.17.0}/docs/source/config/options/index.rst +0 -0
  280. {ipython-9.16.1 → ipython-9.17.0}/docs/source/config/shell_mimerenderer.rst +0 -0
  281. {ipython-9.16.1 → ipython-9.17.0}/docs/source/config/shortcuts/index.rst +0 -0
  282. {ipython-9.16.1 → ipython-9.17.0}/docs/source/coredev/index.rst +0 -0
  283. {ipython-9.16.1 → ipython-9.17.0}/docs/source/development/config.rst +0 -0
  284. {ipython-9.16.1 → ipython-9.17.0}/docs/source/development/execution.rst +0 -0
  285. {ipython-9.16.1 → ipython-9.17.0}/docs/source/development/figs/ipy_kernel_and_terminal.png +0 -0
  286. {ipython-9.16.1 → ipython-9.17.0}/docs/source/development/figs/ipy_kernel_and_terminal.svg +0 -0
  287. {ipython-9.16.1 → ipython-9.17.0}/docs/source/development/figs/other_kernels.png +0 -0
  288. {ipython-9.16.1 → ipython-9.17.0}/docs/source/development/figs/other_kernels.svg +0 -0
  289. {ipython-9.16.1 → ipython-9.17.0}/docs/source/development/how_ipython_works.rst +0 -0
  290. {ipython-9.16.1 → ipython-9.17.0}/docs/source/development/index.rst +0 -0
  291. {ipython-9.16.1 → ipython-9.17.0}/docs/source/development/kernels.rst +0 -0
  292. {ipython-9.16.1 → ipython-9.17.0}/docs/source/development/messaging.rst +0 -0
  293. {ipython-9.16.1 → ipython-9.17.0}/docs/source/development/wrapperkernels.rst +0 -0
  294. {ipython-9.16.1 → ipython-9.17.0}/docs/source/index.rst +0 -0
  295. {ipython-9.16.1 → ipython-9.17.0}/docs/source/install/index.rst +0 -0
  296. {ipython-9.16.1 → ipython-9.17.0}/docs/source/install/install.rst +0 -0
  297. {ipython-9.16.1 → ipython-9.17.0}/docs/source/install/kernel_install.rst +0 -0
  298. {ipython-9.16.1 → ipython-9.17.0}/docs/source/interactive/autoawait.rst +0 -0
  299. {ipython-9.16.1 → ipython-9.17.0}/docs/source/interactive/index.rst +0 -0
  300. {ipython-9.16.1 → ipython-9.17.0}/docs/source/interactive/magics.rst +0 -0
  301. {ipython-9.16.1 → ipython-9.17.0}/docs/source/interactive/plotting.rst +0 -0
  302. {ipython-9.16.1 → ipython-9.17.0}/docs/source/interactive/python-ipython-diff.rst +0 -0
  303. {ipython-9.16.1 → ipython-9.17.0}/docs/source/interactive/reference.rst +0 -0
  304. {ipython-9.16.1 → ipython-9.17.0}/docs/source/interactive/shell.rst +0 -0
  305. {ipython-9.16.1 → ipython-9.17.0}/docs/source/interactive/tips.rst +0 -0
  306. {ipython-9.16.1 → ipython-9.17.0}/docs/source/interactive/tutorial.rst +0 -0
  307. {ipython-9.16.1 → ipython-9.17.0}/docs/source/links.txt +0 -0
  308. {ipython-9.16.1 → ipython-9.17.0}/docs/source/overview.rst +0 -0
  309. {ipython-9.16.1 → ipython-9.17.0}/docs/source/parallel/index.rst +0 -0
  310. {ipython-9.16.1 → ipython-9.17.0}/docs/source/sphinx.toml +0 -0
  311. {ipython-9.16.1 → ipython-9.17.0}/docs/source/sphinxext.rst +0 -0
  312. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/development.rst +0 -0
  313. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/github-stats-0.11.rst +0 -0
  314. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/github-stats-0.12.rst +0 -0
  315. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/github-stats-0.13.rst +0 -0
  316. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/github-stats-1.0.rst +0 -0
  317. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/github-stats-2.0.rst +0 -0
  318. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/github-stats-3.rst +0 -0
  319. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/github-stats-4.rst +0 -0
  320. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/github-stats-5.rst +0 -0
  321. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/github-stats-6.rst +0 -0
  322. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/github-stats-7.rst +0 -0
  323. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/github-stats-8.rst +0 -0
  324. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/index.rst +0 -0
  325. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/pr/README.md +0 -0
  326. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/pr/antigravity-feature.rst +0 -0
  327. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/pr/incompat-switching-to-perl.rst +0 -0
  328. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/version0.10.rst +0 -0
  329. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/version0.11.rst +0 -0
  330. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/version0.12.rst +0 -0
  331. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/version0.13.rst +0 -0
  332. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/version0.8.rst +0 -0
  333. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/version0.9.rst +0 -0
  334. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/version1.0.rst +0 -0
  335. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/version2.0.rst +0 -0
  336. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/version3.rst +0 -0
  337. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/version3_widget_migration.rst +0 -0
  338. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/version4.rst +0 -0
  339. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/version5.rst +0 -0
  340. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/version6.rst +0 -0
  341. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/version7.rst +0 -0
  342. {ipython-9.16.1 → ipython-9.17.0}/docs/source/whatsnew/version8.rst +0 -0
  343. {ipython-9.16.1 → ipython-9.17.0}/docs/sphinxext/apigen.py +0 -0
  344. {ipython-9.16.1 → ipython-9.17.0}/docs/sphinxext/configtraits.py +0 -0
  345. {ipython-9.16.1 → ipython-9.17.0}/docs/sphinxext/magics.py +0 -0
  346. {ipython-9.16.1 → ipython-9.17.0}/examples/Embedding/embed_class_long.py +0 -0
  347. {ipython-9.16.1 → ipython-9.17.0}/examples/Embedding/embed_class_short.py +0 -0
  348. {ipython-9.16.1 → ipython-9.17.0}/examples/Embedding/embed_function.py +0 -0
  349. {ipython-9.16.1 → ipython-9.17.0}/examples/Embedding/start_ipython_config.py +0 -0
  350. {ipython-9.16.1 → ipython-9.17.0}/examples/IPython Kernel/example-demo.py +0 -0
  351. {ipython-9.16.1 → ipython-9.17.0}/examples/IPython Kernel/gui/gui-glut.py +0 -0
  352. {ipython-9.16.1 → ipython-9.17.0}/examples/IPython Kernel/gui/gui-gtk4.py +0 -0
  353. {ipython-9.16.1 → ipython-9.17.0}/examples/IPython Kernel/gui/gui-qt.py +0 -0
  354. {ipython-9.16.1 → ipython-9.17.0}/examples/IPython Kernel/ipython-completion.bash +0 -0
  355. {ipython-9.16.1 → ipython-9.17.0}/examples/IPython Kernel/ipython-get-history.py +0 -0
  356. {ipython-9.16.1 → ipython-9.17.0}/examples/IPython Kernel/ipython.desktop +0 -0
  357. {ipython-9.16.1 → ipython-9.17.0}/examples/auto_suggest_llm.py +0 -0
  358. {ipython-9.16.1 → ipython-9.17.0}/examples/utils/cwd_prompt.py +0 -0
  359. {ipython-9.16.1 → ipython-9.17.0}/examples/utils/list_pyfiles.ipy +0 -0
  360. {ipython-9.16.1 → ipython-9.17.0}/examples/utils/list_subdirs.ipy +0 -0
  361. {ipython-9.16.1 → ipython-9.17.0}/ipython.egg-info/dependency_links.txt +0 -0
  362. {ipython-9.16.1 → ipython-9.17.0}/ipython.egg-info/entry_points.txt +0 -0
  363. {ipython-9.16.1 → ipython-9.17.0}/ipython.egg-info/not-zip-safe +0 -0
  364. {ipython-9.16.1 → ipython-9.17.0}/ipython.egg-info/requires.txt +0 -0
  365. {ipython-9.16.1 → ipython-9.17.0}/ipython.egg-info/top_level.txt +0 -0
  366. {ipython-9.16.1 → ipython-9.17.0}/long_description.rst +0 -0
  367. {ipython-9.16.1 → ipython-9.17.0}/pyproject.toml +0 -0
  368. {ipython-9.16.1 → ipython-9.17.0}/scripts/ipython.ico +0 -0
  369. {ipython-9.16.1 → ipython-9.17.0}/scripts/ipython_nb.ico +0 -0
  370. {ipython-9.16.1 → ipython-9.17.0}/setup.cfg +0 -0
  371. {ipython-9.16.1 → ipython-9.17.0}/setup.py +0 -0
  372. {ipython-9.16.1 → ipython-9.17.0}/setupbase.py +0 -0
  373. {ipython-9.16.1 → ipython-9.17.0}/tests/2x2.jpg +0 -0
  374. {ipython-9.16.1 → ipython-9.17.0}/tests/2x2.png +0 -0
  375. {ipython-9.16.1 → ipython-9.17.0}/tests/__init__.py +0 -0
  376. {ipython-9.16.1 → ipython-9.17.0}/tests/bad_all.py +0 -0
  377. {ipython-9.16.1 → ipython-9.17.0}/tests/conftest.py +0 -0
  378. {ipython-9.16.1 → ipython-9.17.0}/tests/fake_ext_dir/daft_extension.py +0 -0
  379. {ipython-9.16.1 → ipython-9.17.0}/tests/fake_llm.py +0 -0
  380. {ipython-9.16.1 → ipython-9.17.0}/tests/nonascii.py +0 -0
  381. {ipython-9.16.1 → ipython-9.17.0}/tests/nonascii2.py +0 -0
  382. {ipython-9.16.1 → ipython-9.17.0}/tests/print_argv.py +0 -0
  383. {ipython-9.16.1 → ipython-9.17.0}/tests/refbug.py +0 -0
  384. {ipython-9.16.1 → ipython-9.17.0}/tests/simpleerr.py +0 -0
  385. {ipython-9.16.1 → ipython-9.17.0}/tests/tclass.py +0 -0
  386. {ipython-9.16.1 → ipython-9.17.0}/tests/test.wav +0 -0
  387. {ipython-9.16.1 → ipython-9.17.0}/tests/test_alias.py +0 -0
  388. {ipython-9.16.1 → ipython-9.17.0}/tests/test_async_helpers.py +0 -0
  389. {ipython-9.16.1 → ipython-9.17.0}/tests/test_autocall.py +0 -0
  390. {ipython-9.16.1 → ipython-9.17.0}/tests/test_backgroundjobs.py +0 -0
  391. {ipython-9.16.1 → ipython-9.17.0}/tests/test_capture.py +0 -0
  392. {ipython-9.16.1 → ipython-9.17.0}/tests/test_clipboard.py +0 -0
  393. {ipython-9.16.1 → ipython-9.17.0}/tests/test_compilerop.py +0 -0
  394. {ipython-9.16.1 → ipython-9.17.0}/tests/test_completer.py +0 -0
  395. {ipython-9.16.1 → ipython-9.17.0}/tests/test_completerlib.py +0 -0
  396. {ipython-9.16.1 → ipython-9.17.0}/tests/test_contexts.py +0 -0
  397. {ipython-9.16.1 → ipython-9.17.0}/tests/test_crashhandler.py +0 -0
  398. {ipython-9.16.1 → ipython-9.17.0}/tests/test_cve.py +0 -0
  399. {ipython-9.16.1 → ipython-9.17.0}/tests/test_data.py +0 -0
  400. {ipython-9.16.1 → ipython-9.17.0}/tests/test_debug_magic.py +0 -0
  401. {ipython-9.16.1 → ipython-9.17.0}/tests/test_debugger.py +0 -0
  402. {ipython-9.16.1 → ipython-9.17.0}/tests/test_debugger_backport.py +0 -0
  403. {ipython-9.16.1 → ipython-9.17.0}/tests/test_decorators.py +0 -0
  404. {ipython-9.16.1 → ipython-9.17.0}/tests/test_decorators_2.py +0 -0
  405. {ipython-9.16.1 → ipython-9.17.0}/tests/test_deepreload.py +0 -0
  406. {ipython-9.16.1 → ipython-9.17.0}/tests/test_demo.py +0 -0
  407. {ipython-9.16.1 → ipython-9.17.0}/tests/test_dir2.py +0 -0
  408. {ipython-9.16.1 → ipython-9.17.0}/tests/test_display.py +0 -0
  409. {ipython-9.16.1 → ipython-9.17.0}/tests/test_display_2.py +0 -0
  410. {ipython-9.16.1 → ipython-9.17.0}/tests/test_display_functions.py +0 -0
  411. {ipython-9.16.1 → ipython-9.17.0}/tests/test_display_trap.py +0 -0
  412. {ipython-9.16.1 → ipython-9.17.0}/tests/test_displayhook.py +0 -0
  413. {ipython-9.16.1 → ipython-9.17.0}/tests/test_doctb.py +0 -0
  414. {ipython-9.16.1 → ipython-9.17.0}/tests/test_editorhooks.py +0 -0
  415. {ipython-9.16.1 → ipython-9.17.0}/tests/test_embed.py +0 -0
  416. {ipython-9.16.1 → ipython-9.17.0}/tests/test_encoding.py +0 -0
  417. {ipython-9.16.1 → ipython-9.17.0}/tests/test_error.py +0 -0
  418. {ipython-9.16.1 → ipython-9.17.0}/tests/test_events.py +0 -0
  419. {ipython-9.16.1 → ipython-9.17.0}/tests/test_exceptiongroup_tb.py +0 -0
  420. {ipython-9.16.1 → ipython-9.17.0}/tests/test_extension.py +0 -0
  421. {ipython-9.16.1 → ipython-9.17.0}/tests/test_formatters.py +0 -0
  422. {ipython-9.16.1 → ipython-9.17.0}/tests/test_frame.py +0 -0
  423. {ipython-9.16.1 → ipython-9.17.0}/tests/test_generics.py +0 -0
  424. {ipython-9.16.1 → ipython-9.17.0}/tests/test_guarded_eval.py +0 -0
  425. {ipython-9.16.1 → ipython-9.17.0}/tests/test_guisupport.py +0 -0
  426. {ipython-9.16.1 → ipython-9.17.0}/tests/test_handlers.py +0 -0
  427. {ipython-9.16.1 → ipython-9.17.0}/tests/test_help.py +0 -0
  428. {ipython-9.16.1 → ipython-9.17.0}/tests/test_history.py +0 -0
  429. {ipython-9.16.1 → ipython-9.17.0}/tests/test_historyapp.py +0 -0
  430. {ipython-9.16.1 → ipython-9.17.0}/tests/test_hooks.py +0 -0
  431. {ipython-9.16.1 → ipython-9.17.0}/tests/test_imports.py +0 -0
  432. {ipython-9.16.1 → ipython-9.17.0}/tests/test_importstring.py +0 -0
  433. {ipython-9.16.1 → ipython-9.17.0}/tests/test_inputtransformer2_line.py +0 -0
  434. {ipython-9.16.1 → ipython-9.17.0}/tests/test_interactiveshell.py +0 -0
  435. {ipython-9.16.1 → ipython-9.17.0}/tests/test_interactivshell.py +0 -0
  436. {ipython-9.16.1 → ipython-9.17.0}/tests/test_io.py +0 -0
  437. {ipython-9.16.1 → ipython-9.17.0}/tests/test_ipapp.py +0 -0
  438. {ipython-9.16.1 → ipython-9.17.0}/tests/test_iplib.py +0 -0
  439. {ipython-9.16.1 → ipython-9.17.0}/tests/test_ipstruct.py +0 -0
  440. {ipython-9.16.1 → ipython-9.17.0}/tests/test_ipunittest.py +0 -0
  441. {ipython-9.16.1 → ipython-9.17.0}/tests/test_ipython_directive.py +0 -0
  442. {ipython-9.16.1 → ipython-9.17.0}/tests/test_latextools.py +0 -0
  443. {ipython-9.16.1 → ipython-9.17.0}/tests/test_logger.py +0 -0
  444. {ipython-9.16.1 → ipython-9.17.0}/tests/test_logger_unit.py +0 -0
  445. {ipython-9.16.1 → ipython-9.17.0}/tests/test_macro.py +0 -0
  446. {ipython-9.16.1 → ipython-9.17.0}/tests/test_magic_arguments.py +0 -0
  447. {ipython-9.16.1 → ipython-9.17.0}/tests/test_magic_terminal.py +0 -0
  448. {ipython-9.16.1 → ipython-9.17.0}/tests/test_magics_code.py +0 -0
  449. {ipython-9.16.1 → ipython-9.17.0}/tests/test_magics_packaging.py +0 -0
  450. {ipython-9.16.1 → ipython-9.17.0}/tests/test_magics_pylab.py +0 -0
  451. {ipython-9.16.1 → ipython-9.17.0}/tests/test_module_paths.py +0 -0
  452. {ipython-9.16.1 → ipython-9.17.0}/tests/test_oinspect.py +0 -0
  453. {ipython-9.16.1 → ipython-9.17.0}/tests/test_openpy.py +0 -0
  454. {ipython-9.16.1 → ipython-9.17.0}/tests/test_paths.py +0 -0
  455. {ipython-9.16.1 → ipython-9.17.0}/tests/test_payload.py +0 -0
  456. {ipython-9.16.1 → ipython-9.17.0}/tests/test_pickleshare.py +0 -0
  457. {ipython-9.16.1 → ipython-9.17.0}/tests/test_prefilter.py +0 -0
  458. {ipython-9.16.1 → ipython-9.17.0}/tests/test_pretty.py +0 -0
  459. {ipython-9.16.1 → ipython-9.17.0}/tests/test_process.py +0 -0
  460. {ipython-9.16.1 → ipython-9.17.0}/tests/test_profile.py +0 -0
  461. {ipython-9.16.1 → ipython-9.17.0}/tests/test_pt_inputhooks.py +0 -0
  462. {ipython-9.16.1 → ipython-9.17.0}/tests/test_ptutils.py +0 -0
  463. {ipython-9.16.1 → ipython-9.17.0}/tests/test_pycolorize.py +0 -0
  464. {ipython-9.16.1 → ipython-9.17.0}/tests/test_pylabtools.py +0 -0
  465. {ipython-9.16.1 → ipython-9.17.0}/tests/test_qt_loaders.py +0 -0
  466. {ipython-9.16.1 → ipython-9.17.0}/tests/test_run.py +0 -0
  467. {ipython-9.16.1 → ipython-9.17.0}/tests/test_sentinel.py +0 -0
  468. {ipython-9.16.1 → ipython-9.17.0}/tests/test_shellapp.py +0 -0
  469. {ipython-9.16.1 → ipython-9.17.0}/tests/test_shortcuts.py +0 -0
  470. {ipython-9.16.1 → ipython-9.17.0}/tests/test_splitinput.py +0 -0
  471. {ipython-9.16.1 → ipython-9.17.0}/tests/test_storemagic.py +0 -0
  472. {ipython-9.16.1 → ipython-9.17.0}/tests/test_strdispatch.py +0 -0
  473. {ipython-9.16.1 → ipython-9.17.0}/tests/test_sysinfo.py +0 -0
  474. {ipython-9.16.1 → ipython-9.17.0}/tests/test_syspathcontext.py +0 -0
  475. {ipython-9.16.1 → ipython-9.17.0}/tests/test_tempdir.py +0 -0
  476. {ipython-9.16.1 → ipython-9.17.0}/tests/test_text.py +0 -0
  477. {ipython-9.16.1 → ipython-9.17.0}/tests/test_text_utils.py +0 -0
  478. {ipython-9.16.1 → ipython-9.17.0}/tests/test_timing.py +0 -0
  479. {ipython-9.16.1 → ipython-9.17.0}/tests/test_tools.py +0 -0
  480. {ipython-9.16.1 → ipython-9.17.0}/tests/test_ultratb.py +0 -0
  481. {ipython-9.16.1 → ipython-9.17.0}/tests/test_wildcard.py +0 -0
@@ -34,10 +34,32 @@ from typing import Any
34
34
  # rely on the transitive side effects: they do `import IPython` and then
35
35
  # access attribute chains like `IPython.terminal.ipapp.TerminalIPythonApp`,
36
36
  # which only resolve because the imports below load those submodules.
37
- from .core.getipython import get_ipython
37
+ #
38
+ # `embed`, `Application` and `get_ipython` are the exceptions, and are
39
+ # deferred via module `__getattr__` below:
40
+ #
41
+ # - `embed` drags in the whole terminal / prompt_toolkit stack, by far
42
+ # the most expensive of these imports, and is only needed by code that
43
+ # calls `IPython.embed()`;
44
+ # - `Application` is only a re-export of `traitlets.config.application
45
+ # .Application`, but importing it pulled in `IPython.core.application`
46
+ # and with it the crash handler; no known downstream imports it from
47
+ # here (ipykernel imports `BaseIPythonApplication` from
48
+ # `IPython.core.application` directly);
49
+ # - `get_ipython` costs nothing to defer -- `IPython.core.getipython`
50
+ # ends up imported anyway via `IPython.core.magic` -- but is kept
51
+ # alongside the others so all three top-level names resolve the same
52
+ # way.
53
+ #
54
+ # This does mean that code relying on `import IPython` to transitively
55
+ # populate `IPython.terminal.embed` / `IPython.core.application` (or
56
+ # submodules only reachable through them) as a side effect will need to
57
+ # import those submodules explicitly instead. `Application` raises a
58
+ # `DeprecationWarning` when accessed here, both because such code is worth
59
+ # spotting and because the name should be imported from traitlets;
60
+ # `embed` and `get_ipython` stay silent, being widely and legitimately
61
+ # used from here.
38
62
  from .core import release
39
- from .core.application import Application
40
- from .terminal.embed import embed
41
63
 
42
64
  from .core.interactiveshell import InteractiveShell
43
65
  from .utils.sysinfo import sys_info
@@ -45,6 +67,52 @@ from .utils.frame import extract_module_locals
45
67
 
46
68
  __all__ = ["start_ipython", "embed", "embed_kernel"]
47
69
 
70
+
71
+ # Nothing below is cached in `globals()`: the lookups stay lazy on every
72
+ # access, so that the `Application` warning keeps firing instead of only
73
+ # on the first access, and so that these names never silently turn into
74
+ # plain module attributes that later code could mistake for eagerly
75
+ # imported ones.
76
+ #
77
+ # `Application` is deliberately absent from `_lazy_attrs`, and hence from
78
+ # `__dir__`: anything that walks `dir(IPython)` and getattr()s the result
79
+ # -- our own module completer does, and so do other introspection tools --
80
+ # would otherwise trigger its `DeprecationWarning` without any code
81
+ # actually wanting the name. Explicit `IPython.Application` access still
82
+ # resolves, and still warns, which is the access we want to hear about.
83
+ _lazy_attrs = frozenset({"embed", "get_ipython"})
84
+
85
+
86
+ def __getattr__(name: str) -> Any:
87
+ if name == "embed":
88
+ from .terminal.embed import embed
89
+
90
+ return embed
91
+ if name == "get_ipython":
92
+ from .core.getipython import get_ipython
93
+
94
+ return get_ipython
95
+ if name == "Application":
96
+ warnings.warn(
97
+ "`IPython.Application` is only a re-export of"
98
+ " `traitlets.config.application.Application`; import it from"
99
+ " traitlets directly. Accessing it here triggers an import of"
100
+ " `IPython.core.application`, which is no longer imported when"
101
+ " IPython is -- import that module explicitly if you rely on"
102
+ " that import happening, in particular if you also rely on other"
103
+ " submodules being transitively imported as a side effect.",
104
+ DeprecationWarning,
105
+ stacklevel=2,
106
+ )
107
+ from .core.application import Application
108
+
109
+ return Application
110
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
111
+
112
+
113
+ def __dir__() -> list[str]:
114
+ return [*globals(), *_lazy_attrs]
115
+
48
116
  # Release data
49
117
  __author__ = '{} <{}>'.format(release.author, release.author_email)
50
118
  __license__ = release.license
@@ -0,0 +1,65 @@
1
+ """Mapping from AST operator nodes to the dunder methods that implement them.
2
+
3
+ This lives in its own module, rather than in `IPython.core.guarded_eval` where
4
+ it is mostly used, so that the terminal shortcut filters can resolve operators
5
+ in a filter expression without importing the whole of `guarded_eval` -- and
6
+ with it `typing_extensions`, `dataclasses` and `inspect` -- on every startup.
7
+
8
+ The names are re-exported from `IPython.core.guarded_eval`, which remains
9
+ their documented home.
10
+ """
11
+
12
+ import ast
13
+ from collections.abc import Mapping
14
+ from typing import Any
15
+
16
+ __all__ = [
17
+ "BINARY_OP_DUNDERS",
18
+ "COMP_OP_DUNDERS",
19
+ "UNARY_OP_DUNDERS",
20
+ ]
21
+
22
+ BINARY_OP_DUNDERS: dict[type[ast.operator], tuple[str]] = {
23
+ ast.Add: ("__add__",),
24
+ ast.Sub: ("__sub__",),
25
+ ast.Mult: ("__mul__",),
26
+ ast.Div: ("__truediv__",),
27
+ ast.FloorDiv: ("__floordiv__",),
28
+ ast.Mod: ("__mod__",),
29
+ ast.Pow: ("__pow__",),
30
+ ast.LShift: ("__lshift__",),
31
+ ast.RShift: ("__rshift__",),
32
+ ast.BitOr: ("__or__",),
33
+ ast.BitXor: ("__xor__",),
34
+ ast.BitAnd: ("__and__",),
35
+ ast.MatMult: ("__matmul__",),
36
+ }
37
+
38
+ COMP_OP_DUNDERS: dict[type[ast.cmpop], tuple[str, ...]] = {
39
+ ast.Eq: ("__eq__",),
40
+ ast.NotEq: ("__ne__", "__eq__"),
41
+ ast.Lt: ("__lt__", "__gt__"),
42
+ ast.LtE: ("__le__", "__ge__"),
43
+ ast.Gt: ("__gt__", "__lt__"),
44
+ ast.GtE: ("__ge__", "__le__"),
45
+ ast.In: ("__contains__",),
46
+ # Note: ast.Is, ast.IsNot, ast.NotIn are handled specially
47
+ }
48
+
49
+ UNARY_OP_DUNDERS: dict[type[ast.unaryop], tuple[str, ...]] = {
50
+ ast.USub: ("__neg__",),
51
+ ast.UAdd: ("__pos__",),
52
+ # we have to check both __inv__ and __invert__!
53
+ ast.Invert: ("__invert__", "__inv__"),
54
+ ast.Not: ("__not__",),
55
+ }
56
+
57
+
58
+ def _find_dunder(
59
+ node_op: ast.AST, dunders: Mapping[type[Any], tuple[str, ...]]
60
+ ) -> tuple[str, ...] | None:
61
+ dunder = None
62
+ for op, candidate_dunder in dunders.items():
63
+ if isinstance(node_op, op):
64
+ dunder = candidate_dunder
65
+ return dunder
@@ -28,7 +28,6 @@ from traitlets.config.configurable import Configurable
28
28
  from .error import UsageError
29
29
 
30
30
  from traitlets import List, Instance
31
- from logging import error
32
31
 
33
32
 
34
33
  #-----------------------------------------------------------------------------
@@ -226,6 +225,7 @@ class AliasManager(Configurable):
226
225
  try:
227
226
  self.define_alias(name, cmd)
228
227
  except AliasError as e:
228
+ from logging import error
229
229
  error("Invalid alias: %s" % e)
230
230
 
231
231
  def define_alias(self, name, cmd):
@@ -13,9 +13,7 @@ object and then create the configurable objects, passing the config to them.
13
13
 
14
14
  import atexit
15
15
  from copy import deepcopy
16
- import logging
17
16
  import os
18
- import shutil
19
17
  import sys
20
18
 
21
19
  from pathlib import Path
@@ -31,6 +29,15 @@ from traitlets import (
31
29
  default, observe,
32
30
  )
33
31
 
32
+ # Values of `logging.DEBUG` and `logging.CRITICAL`, inlined so that this
33
+ # module -- which is on the IPython startup path -- does not have to import
34
+ # `logging` just to spell two integers. The `logging` levels are part of its
35
+ # documented public API and cannot change; `tests/test_application.py`
36
+ # asserts these copies do not drift from it.
37
+ LOGGING_DEBUG = 10
38
+ LOGGING_CRITICAL = 50
39
+
40
+
34
41
  if os.name == "nt":
35
42
  # %PROGRAMDATA% is not safe by default, require opt-in to trust it
36
43
  programdata = os.environ.get("PROGRAMDATA", None)
@@ -86,11 +93,11 @@ if isinstance(Application.flags, dict):
86
93
  base_flags.update(
87
94
  dict(
88
95
  debug=(
89
- {"Application": {"log_level": logging.DEBUG}},
96
+ {"Application": {"log_level": LOGGING_DEBUG}},
90
97
  "set log level to logging.DEBUG (maximize logging output)",
91
98
  ),
92
99
  quiet=(
93
- {"Application": {"log_level": logging.CRITICAL}},
100
+ {"Application": {"log_level": LOGGING_CRITICAL}},
94
101
  "set log level to logging.CRITICAL (minimize logging output)",
95
102
  ),
96
103
  init=(
@@ -305,6 +312,7 @@ class BaseIPythonApplication(Application):
305
312
  get_ipython_package_dir(), "config", "profile", "README"
306
313
  )
307
314
  if not os.path.exists(readme) and os.path.exists(readme_src):
315
+ import shutil
308
316
  shutil.copy(readme_src, readme)
309
317
  for d in ("extensions", "nbextensions"):
310
318
  path = os.path.join(new, d)
@@ -10,10 +10,15 @@ explicitly to actually raise a SyntaxError and stay as close as possible to
10
10
  Python semantics.
11
11
  """
12
12
 
13
+ from __future__ import annotations
14
+
13
15
  import ast
14
- import asyncio
15
16
  import inspect
16
17
  from functools import wraps
18
+ from typing import TYPE_CHECKING
19
+
20
+ if TYPE_CHECKING:
21
+ import asyncio
17
22
 
18
23
  _asyncio_event_loop: asyncio.AbstractEventLoop | None = None
19
24
 
@@ -31,6 +36,11 @@ def get_asyncio_loop():
31
36
 
32
37
  .. versionadded:: 8.0
33
38
  """
39
+ # asyncio (and everything it drags in) is only imported the first
40
+ # time an event loop is actually needed, rather than on every
41
+ # IPython startup.
42
+ import asyncio
43
+
34
44
  try:
35
45
  return asyncio.get_running_loop()
36
46
  except RuntimeError:
@@ -81,6 +91,8 @@ class _AsyncIOProxy:
81
91
  # return a threadsafe wrapper onto the _current_ asyncio loop
82
92
  @wraps(attr)
83
93
  def _wrapped(*args, **kwargs):
94
+ import asyncio
95
+
84
96
  concurrent_future = asyncio.run_coroutine_threadsafe(
85
97
  attr(*args, **kwargs), self._event_loop
86
98
  )
@@ -35,7 +35,6 @@ import __future__
35
35
  from ast import PyCF_ONLY_AST
36
36
  import codeop
37
37
  import functools
38
- import hashlib
39
38
  import linecache
40
39
  import operator
41
40
  from contextlib import contextmanager
@@ -60,6 +59,7 @@ def code_name(code: str, number: int = 0) -> str:
60
59
 
61
60
  This now expects code to be unicode.
62
61
  """
62
+ import hashlib
63
63
  hash_digest = hashlib.sha1(code.encode("utf-8"), usedforsecurity=False).hexdigest()
64
64
  # Include the number and 12 characters of the hash in the name. It's
65
65
  # pretty much impossible that in a single session we'll have collisions
@@ -192,8 +192,6 @@ import string
192
192
  import sys
193
193
  import tokenize
194
194
  import time
195
- import unicodedata
196
- import uuid
197
195
  import warnings
198
196
  from ast import literal_eval
199
197
  from collections import defaultdict
@@ -210,18 +208,12 @@ from typing import (
210
208
  )
211
209
  from collections.abc import Iterable, Iterator, Sequence, Sized
212
210
 
213
- from IPython.core.guarded_eval import (
214
- guarded_eval,
215
- EvaluationContext,
216
- _validate_policy_overrides,
217
- )
218
211
  from IPython.core.error import TryNext, UsageError
219
212
  from IPython.core.inputtransformer2 import (
220
213
  ESC_MAGIC,
221
214
  SystemAssign,
222
215
  make_tokens_by_line,
223
216
  )
224
- from IPython.core.latex_symbols import latex_symbols, reverse_latex_symbol
225
217
  from IPython.testing.skipdoctest import skip_doctest
226
218
  from IPython.utils import generics
227
219
  from IPython.utils.PyColorize import theme_table
@@ -269,6 +261,19 @@ def _get_jedi() -> ModuleType:
269
261
  import jedi.api.helpers
270
262
 
271
263
  jedi.settings.case_insensitive_completion = False
264
+
265
+ # parso, which jedi parses with, logs copiously at DEBUG level; without
266
+ # this those records reach the user's session whenever IPython runs with
267
+ # a debug log level. This lived at the top of `IPython.core.logger` --
268
+ # a module about `%logstart` session transcripts, nothing to do with
269
+ # jedi -- where it worked only because that module happened to be
270
+ # imported eagerly at startup. Configure it where jedi itself is
271
+ # configured instead, which is still before any parso record can be
272
+ # emitted, since parso is only reached through jedi.
273
+ import logging
274
+
275
+ logging.getLogger("parso").setLevel(logging.WARNING)
276
+
272
277
  return jedi
273
278
 
274
279
 
@@ -1064,12 +1069,16 @@ class Completer(Configurable):
1064
1069
 
1065
1070
  @observe("evaluation")
1066
1071
  def _evaluation_changed(self, _change):
1072
+ from IPython.core.guarded_eval import _validate_policy_overrides
1073
+
1067
1074
  _validate_policy_overrides(
1068
1075
  policy_name=self.evaluation, policy_overrides=self.policy_overrides
1069
1076
  )
1070
1077
 
1071
1078
  @observe("policy_overrides")
1072
1079
  def _policy_overrides_changed(self, _change):
1080
+ from IPython.core.guarded_eval import _validate_policy_overrides
1081
+
1073
1082
  _validate_policy_overrides(
1074
1083
  policy_name=self.evaluation, policy_overrides=self.policy_overrides
1075
1084
  )
@@ -1149,6 +1158,8 @@ class Completer(Configurable):
1149
1158
  defined in self.namespace or self.global_namespace that match.
1150
1159
 
1151
1160
  """
1161
+ from IPython.core.guarded_eval import EvaluationContext, guarded_eval
1162
+
1152
1163
  matches = []
1153
1164
  match_append = matches.append
1154
1165
  n = len(text)
@@ -1374,6 +1385,8 @@ class Completer(Configurable):
1374
1385
  return ""
1375
1386
 
1376
1387
  def _evaluate_expr(self, expr):
1388
+ from IPython.core.guarded_eval import EvaluationContext, guarded_eval
1389
+
1377
1390
  obj = not_found
1378
1391
  done = False
1379
1392
  while not done and expr:
@@ -1766,6 +1779,8 @@ def back_unicode_name_matches(text: str) -> tuple[str, Sequence[str]]:
1766
1779
  - a sequence (of 1), name for the match Unicode character, preceded by
1767
1780
  backslash, or empty if no match.
1768
1781
  """
1782
+ import unicodedata
1783
+
1769
1784
  if len(text)<2:
1770
1785
  return '', ()
1771
1786
  maybe_slash = text[-2]
@@ -1791,6 +1806,8 @@ def back_latex_name_matcher(context: CompletionContext) -> SimpleMatcherResult:
1791
1806
 
1792
1807
  This does ``\\ℵ`` -> ``\\aleph``
1793
1808
  """
1809
+ from IPython.core.latex_symbols import reverse_latex_symbol
1810
+
1794
1811
 
1795
1812
  text = context.text_until_cursor
1796
1813
  no_match = {
@@ -2432,6 +2449,8 @@ class IPCompleter(Completer):
2432
2449
  texts = text.strip().split()
2433
2450
 
2434
2451
  if len(texts) > 0 and (texts[0] == 'config' or texts[0] == '%config'):
2452
+ # Only instantiated magics are configurable; load the lazy ones.
2453
+ self.shell.magics_manager.load_all_lazy_magics()
2435
2454
  # get all configuration classes
2436
2455
  classes = sorted({ c for c in self.shell.configurables
2437
2456
  if c.__class__.class_traits(config=True)
@@ -3025,6 +3044,7 @@ class IPCompleter(Completer):
3025
3044
  .. deprecated:: 8.6
3026
3045
  You can use :meth:`dict_key_matcher` instead.
3027
3046
  """
3047
+ from IPython.core.guarded_eval import EvaluationContext, guarded_eval
3028
3048
 
3029
3049
  # Short-circuit on closed dictionary (regular expression would
3030
3050
  # not match anyway, but would take quite a while).
@@ -3148,6 +3168,8 @@ class IPCompleter(Completer):
3148
3168
  Works only on valid python 3 identifier, or on combining characters that
3149
3169
  will combine to form a valid identifier.
3150
3170
  """
3171
+ import unicodedata
3172
+
3151
3173
 
3152
3174
  text = context.text_until_cursor
3153
3175
 
@@ -3189,6 +3211,8 @@ class IPCompleter(Completer):
3189
3211
  .. deprecated:: 8.6
3190
3212
  You can use :meth:`latex_name_matcher` instead.
3191
3213
  """
3214
+ from IPython.core.latex_symbols import latex_symbols
3215
+
3192
3216
  slashpos = text.rfind('\\')
3193
3217
  if slashpos > -1:
3194
3218
  s = text[slashpos:]
@@ -3316,6 +3340,8 @@ class IPCompleter(Completer):
3316
3340
  completions are coming from different sources this function does not
3317
3341
  ensure that each completion object will only be present once.
3318
3342
  """
3343
+ import uuid
3344
+
3319
3345
  warnings.warn("_complete is a provisional API (as of IPython 6.0). "
3320
3346
  "It may change without warnings. "
3321
3347
  "Use in corresponding context manager.",
@@ -3832,6 +3858,8 @@ class IPCompleter(Completer):
3832
3858
 
3833
3859
  The list is lazily initialized on first access.
3834
3860
  """
3861
+ import unicodedata
3862
+
3835
3863
  if self._unicode_names is None:
3836
3864
  names = []
3837
3865
  for c in range(0,0x10FFFF + 1):
@@ -3845,6 +3873,8 @@ class IPCompleter(Completer):
3845
3873
 
3846
3874
 
3847
3875
  def _unicode_name_compute(ranges: list[tuple[int, int]]) -> list[str]:
3876
+ import unicodedata
3877
+
3848
3878
  names = []
3849
3879
  for start,stop in ranges:
3850
3880
  for c in range(start, stop) :
@@ -8,11 +8,7 @@ from __future__ import annotations
8
8
  from enum import Enum
9
9
  from dataclasses import dataclass, KW_ONLY
10
10
  from binascii import b2a_base64, hexlify
11
- import html
12
- import json
13
- import mimetypes
14
11
  import os
15
- import struct
16
12
  import warnings
17
13
  from copy import deepcopy
18
14
  from os.path import splitext
@@ -639,6 +635,7 @@ class JSON(DisplayObject):
639
635
  if isinstance(data, str):
640
636
  if self.filename is None and self.url is None:
641
637
  warnings.warn("JSON expects JSONable dict or list, not JSON strings")
638
+ import json
642
639
  data = json.loads(data)
643
640
  self._data = data
644
641
 
@@ -800,6 +797,7 @@ def _pngxy(data):
800
797
  """read the (width, height) from a PNG header"""
801
798
  ihdr = data.index(b'IHDR')
802
799
  # next 8 bytes are width/height
800
+ import struct
803
801
  return struct.unpack('>ii', data[ihdr+4:ihdr+12])
804
802
 
805
803
 
@@ -807,6 +805,7 @@ def _jpegxy(data):
807
805
  """read the (width, height) from a JPEG header"""
808
806
  # adapted from http://www.64lines.com/jpeg-width-height
809
807
 
808
+ import struct
810
809
  idx = 4
811
810
  while True:
812
811
  block_size = struct.unpack('>H', data[idx:idx+2])[0]
@@ -825,11 +824,13 @@ def _jpegxy(data):
825
824
 
826
825
  def _gifxy(data):
827
826
  """read the (width, height) from a GIF header"""
827
+ import struct
828
828
  return struct.unpack('<HH', data[6:10])
829
829
 
830
830
 
831
831
  def _webpxy(data):
832
832
  """read the (width, height) from a WEBP header"""
833
+ import struct
833
834
  if data[12:16] == b"VP8 ":
834
835
  width, height = struct.unpack("<HH", data[24:30])
835
836
  width = width & 0x3FFF
@@ -1055,6 +1056,7 @@ class Image(DisplayObject):
1055
1056
 
1056
1057
  def _repr_html_(self):
1057
1058
  if not self.embed:
1059
+ import html
1058
1060
  width = height = klass = alt = ""
1059
1061
  if self.width:
1060
1062
  width = ' width="%d"' % self.width
@@ -1225,6 +1227,7 @@ class Video(DisplayObject):
1225
1227
  # External URLs and potentially local files are not embedded into the
1226
1228
  # notebook output.
1227
1229
  if not self.embed:
1230
+ import html
1228
1231
  url = self.url if self.url is not None else self.filename
1229
1232
  output = """<video src="{}" {} {} {}>
1230
1233
  Your browser does not support the <code>video</code> element.
@@ -1235,6 +1238,8 @@ class Video(DisplayObject):
1235
1238
  mimetype = self.mimetype
1236
1239
  if self.filename is not None:
1237
1240
  if not mimetype:
1241
+ import mimetypes
1242
+
1238
1243
  mimetype, _ = mimetypes.guess_type(self.filename)
1239
1244
 
1240
1245
  with open(self.filename, 'rb') as f:
@@ -208,10 +208,10 @@ def display(
208
208
  - `_repr_png_`: return raw PNG data, or a tuple (see below).
209
209
  - `_repr_svg_`: return raw SVG data as a string, or a tuple (see below).
210
210
  - `_repr_latex_`: return LaTeX commands in a string surrounded by "$",
211
- or a tuple (see below).
211
+ or a tuple (see below).
212
212
  - `_repr_mimebundle_`: return a full mimebundle containing the mapping
213
- from all mimetypes to data.
214
- Use this for any mime-type not listed above.
213
+ from all mimetypes to data.
214
+ Use this for any mime-type not listed above.
215
215
 
216
216
  The above functions may also return the object's metadata alonside the
217
217
  data. If the metadata is available, the functions will return a tuple
@@ -15,7 +15,6 @@ from traitlets.config.configurable import Configurable
15
15
  from traitlets import Instance, Float
16
16
  from warnings import warn
17
17
 
18
- from .history import HistoryOutput
19
18
 
20
19
  # TODO: Move the various attributes (cache_size, [others now moved]). Some
21
20
  # of these are also attributes of InteractiveShell. They should be on ONE object
@@ -248,6 +247,7 @@ class DisplayHook(Configurable):
248
247
 
249
248
  def log_output(self, format_dict):
250
249
  """Log the output."""
250
+ from .history import HistoryOutput
251
251
  self.shell.history_manager.outputs[self.prompt_count].append(
252
252
  HistoryOutput(output_type="execute_result", bundle=format_dict)
253
253
  )
@@ -1,16 +1,14 @@
1
- import inspect
1
+ from __future__ import annotations
2
+
2
3
  import linecache
3
4
  import sys
4
5
  from collections.abc import Sequence
5
6
  from types import TracebackType
6
- from typing import Any
7
+ from typing import TYPE_CHECKING, Any
7
8
  from collections.abc import Callable
8
9
 
9
- import stack_data
10
- from pygments.formatters.terminal256 import Terminal256Formatter
11
10
  from pygments.token import Token
12
11
 
13
- from IPython.utils.PyColorize import Theme, TokenStream, theme_table
14
12
  from IPython.utils.terminal import get_terminal_size
15
13
 
16
14
  from .tbtools import (
@@ -23,6 +21,11 @@ from .tbtools import (
23
21
  nullrepr,
24
22
  )
25
23
 
24
+ if TYPE_CHECKING:
25
+ import stack_data
26
+
27
+ from IPython.utils.PyColorize import Theme, TokenStream
28
+
26
29
  INDENT_SIZE = 8
27
30
 
28
31
 
@@ -41,6 +44,8 @@ def _format_traceback_lines(
41
44
  ----------
42
45
  lines : list[Line | LineGap]
43
46
  """
47
+ import stack_data
48
+
44
49
  numbers_width = INDENT_SIZE - 1
45
50
  tokens: TokenStream = [(Token, "\n")]
46
51
 
@@ -136,6 +141,10 @@ class DocTB(TBTools):
136
141
 
137
142
  def format_record(self, frame_info: FrameInfo) -> str:
138
143
  """Format a single stack frame"""
144
+ import stack_data
145
+
146
+ from IPython.utils.PyColorize import theme_table
147
+
139
148
  assert isinstance(frame_info, FrameInfo)
140
149
 
141
150
  if isinstance(frame_info._sd, stack_data.RepeatedFrames):
@@ -153,6 +162,7 @@ class DocTB(TBTools):
153
162
  indent: str = " " * INDENT_SIZE
154
163
 
155
164
  assert isinstance(frame_info.lineno, int)
165
+ import inspect
156
166
  args, varargs, varkw, locals_ = inspect.getargvalues(frame_info.frame)
157
167
  if frame_info.executing is not None:
158
168
  func = frame_info.executing.code_qualname()
@@ -238,6 +248,7 @@ class DocTB(TBTools):
238
248
  return result
239
249
 
240
250
  def prepare_header(self, etype: str) -> str:
251
+ from IPython.utils.PyColorize import theme_table
241
252
  width = min(75, get_terminal_size()[0])
242
253
  head = theme_table[self._theme_name].format(
243
254
  [
@@ -252,6 +263,7 @@ class DocTB(TBTools):
252
263
  return head
253
264
 
254
265
  def format_exception(self, etype: Any, evalue: Any) -> Any:
266
+ from IPython.utils.PyColorize import theme_table
255
267
  # Get (safely) a string form of the exception info
256
268
  try:
257
269
  etype_str, evalue_str = map(str, (etype, evalue))
@@ -289,6 +301,8 @@ class DocTB(TBTools):
289
301
  This may be called multiple times by Python 3 exception chaining
290
302
  (PEP 3134).
291
303
  """
304
+ from IPython.utils.PyColorize import theme_table
305
+
292
306
  # some locals
293
307
  orig_etype = etype
294
308
  try:
@@ -323,12 +337,18 @@ class DocTB(TBTools):
323
337
  return [[head] + frames + formatted_exception]
324
338
 
325
339
  def get_records(self, etb: TracebackType, context: int, tb_offset: int) -> Any:
340
+ import stack_data
341
+
342
+ from IPython.utils.PyColorize import theme_table
343
+
326
344
  assert context == 1, context
327
345
  assert etb is not None
328
346
  context = context - 1
329
347
  after = context // 2
330
348
  before = context - after
331
349
  if self.has_colors:
350
+ from pygments.formatters.terminal256 import Terminal256Formatter
351
+
332
352
  base_style = theme_table[self._theme_name].as_pygments_style()
333
353
  # stack_data ships without type annotations
334
354
  style = stack_data.style_with_executing_node( # type: ignore[no-untyped-call]
@@ -349,6 +369,7 @@ class DocTB(TBTools):
349
369
  tbs = []
350
370
  while cf is not None:
351
371
  try:
372
+ import inspect
352
373
  mod = inspect.getmodule(cf.tb_frame)
353
374
  if mod is not None:
354
375
  mod_name = mod.__name__
@@ -377,6 +398,8 @@ class DocTB(TBTools):
377
398
  context: int = 1,
378
399
  ) -> list[str]:
379
400
  """Return a nice text document describing the traceback."""
401
+ from IPython.utils.PyColorize import theme_table
402
+
380
403
  assert context > 0
381
404
  assert context == 1, context
382
405
  formatted_exceptions: list[list[str]] = self.format_exception_as_a_whole(
@@ -66,7 +66,6 @@ Inheritance diagram:
66
66
 
67
67
  import abc
68
68
  import sys
69
- import traceback
70
69
  import warnings
71
70
  from io import StringIO
72
71
 
@@ -286,6 +285,7 @@ def catch_format_error(method):
286
285
  if ip is not None:
287
286
  ip.showtraceback(exc_info)
288
287
  else:
288
+ import traceback
289
289
  traceback.print_exception(*exc_info)
290
290
  return self._check_return(None, args[0])
291
291
  return self._check_return(r, args[0])