##// END OF EJS Templates
docs
Matthias Bussonnier -
Show More
@@ -1,99 +1,113 b''
1 1 .. _events:
2 2 .. _callbacks:
3 3
4 4 ==============
5 5 IPython Events
6 6 ==============
7 7
8 8 Extension code can register callbacks functions which will be called on specific
9 9 events within the IPython code. You can see the current list of available
10 10 callbacks, and the parameters that will be passed with each, in the callback
11 11 prototype functions defined in :mod:`IPython.core.events`.
12 12
13 13 To register callbacks, use :meth:`IPython.core.events.EventManager.register`.
14 14 For example::
15 15
16 16 class VarWatcher(object):
17 17 def __init__(self, ip):
18 18 self.shell = ip
19 19 self.last_x = None
20
20
21 21 def pre_execute(self):
22 22 self.last_x = self.shell.user_ns.get('x', None)
23
23
24 24 def pre_run_cell(self, info):
25 print('Cell code: "%s"' % info.raw_cell)
26
25 print('info.raw_cell =', info.raw_cell)
26 print('info.store_history =', info.store_history)
27 print('info.silent =', info.silent)
28 print('info.shell_futures =', info.shell_futures)
29 print('info.cell_id =', info.cell_id)
30 print(dir(info))
31
27 32 def post_execute(self):
28 33 if self.shell.user_ns.get('x', None) != self.last_x:
29 34 print("x changed!")
30
35
31 36 def post_run_cell(self, result):
32 print('Cell code: "%s"' % result.info.raw_cell)
33 if result.error_before_exec:
34 print('Error before execution: %s' % result.error_before_exec)
35
37 print('result.execution_count = ', result.execution_count)
38 print('result.error_before_exec = ', result.error_before_exec)
39 print('result.error_in_exec = ', result.error_in_exec)
40 print('result.info = ', result.info)
41 print('result.result = ', result.result)
42
36 43 def load_ipython_extension(ip):
37 44 vw = VarWatcher(ip)
38 45 ip.events.register('pre_execute', vw.pre_execute)
39 46 ip.events.register('pre_run_cell', vw.pre_run_cell)
40 47 ip.events.register('post_execute', vw.post_execute)
41 48 ip.events.register('post_run_cell', vw.post_run_cell)
42 49
50 .. versionadded:: 8.3
51
52 Since IPython 8.3 and ipykernel 6.12.1, the ``info`` objects in the callback
53 now have a the ``cell_id`` that will be set to the value sent by the
54 frontened, when those send it.
55
56
43 57
44 58 Events
45 59 ======
46 60
47 61 These are the events IPython will emit. Callbacks will be passed no arguments, unless otherwise specified.
48 62
49 63 shell_initialized
50 64 -----------------
51 65
52 66 .. code-block:: python
53 67
54 68 def shell_initialized(ipython):
55 69 ...
56 70
57 71 This event is triggered only once, at the end of setting up IPython.
58 72 Extensions registered to load by default as part of configuration can use this to execute code to finalize setup.
59 73 Callbacks will be passed the InteractiveShell instance.
60 74
61 75 pre_run_cell
62 76 ------------
63 77
64 78 ``pre_run_cell`` fires prior to interactive execution (e.g. a cell in a notebook).
65 79 It can be used to note the state prior to execution, and keep track of changes.
66 80 An object containing information used for the code execution is provided as an argument.
67 81
68 82 pre_execute
69 83 -----------
70 84
71 85 ``pre_execute`` is like ``pre_run_cell``, but is triggered prior to *any* execution.
72 86 Sometimes code can be executed by libraries, etc. which
73 87 skipping the history/display mechanisms, in which cases ``pre_run_cell`` will not fire.
74 88
75 89 post_run_cell
76 90 -------------
77 91
78 92 ``post_run_cell`` runs after interactive execution (e.g. a cell in a notebook).
79 93 It can be used to cleanup or notify or perform operations on any side effects produced during execution.
80 94 For instance, the inline matplotlib backend uses this event to display any figures created but not explicitly displayed during the course of the cell.
81 95 The object which will be returned as the execution result is provided as an
82 96 argument.
83 97
84 98 post_execute
85 99 ------------
86 100
87 101 The same as ``pre_execute``, ``post_execute`` is like ``post_run_cell``,
88 102 but fires for *all* executions, not just interactive ones.
89 103
90 104
91 105 .. seealso::
92 106
93 107 Module :mod:`IPython.core.hooks`
94 108 The older 'hooks' system allows end users to customise some parts of
95 109 IPython's behaviour.
96 110
97 111 :doc:`inputtransforms`
98 112 By registering input transformers that don't change code, you can monitor
99 113 what is being executed.
@@ -1,1051 +1,1059 b''
1 1 ============
2 2 8.x Series
3 3 ============
4 4
5 5
6 .. _version 8.3.0:
7
8 IPython 8.3.0
9 -------------
10
11 - :ghpull:`13600`, ``pre_run_*``-hooks will now have a ``cell_id`` attribute on
12 the info object when frontend provide it.
13
6 14 .. _version 8.2.0:
7 15
8 16 IPython 8.2.0
9 17 -------------
10 18
11 19 IPython 8.2 mostly bring bugfixes to IPython.
12 20
13 21 - Auto-suggestion can now be elected with the ``end`` key. :ghpull:`13566`
14 22 - Some traceback issues with ``assert etb is not None`` have been fixed. :ghpull:`13588`
15 23 - History is now pulled from the sqitel database and not from in-memory.
16 24 In particular when using the ``%paste`` magic, the content of the pasted text will
17 25 be part of the history and not the verbatim text ``%paste`` anymore. :ghpull:`13592`
18 26 - Fix ``Ctrl-\\`` exit cleanup :ghpull:`13603`
19 27 - Fixes to ``ultratb`` ipdb support when used outside of IPython. :ghpull:`13498`
20 28
21 29
22 30 I am still trying to fix and investigate :ghissue:`13598`, which seem to be
23 31 random, and would appreciate help if you find reproducible minimal case. I've
24 32 tried to make various changes to the codebase to mitigate it, but a proper fix
25 33 will be difficult without understanding the cause.
26 34
27 35
28 36 All the issues on pull-requests for this release can be found in the `8.2
29 37 milestone. <https://github.com/ipython/ipython/milestone/100>`__ . And some
30 38 documentation only PR can be found as part of the `7.33 milestone
31 39 <https://github.com/ipython/ipython/milestone/101>`__ (currently not released).
32 40
33 41 Thanks to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
34 42 work on IPython and related libraries.
35 43
36 44 .. _version 8.1.1:
37 45
38 46 IPython 8.1.1
39 47 -------------
40 48
41 49 Fix an issue with virtualenv and Python 3.8 introduced in 8.1
42 50
43 51 Revert :ghpull:`13537` (fix an issue with symlinks in virtualenv) that raises an
44 52 error in Python 3.8, and fixed in a different way in :ghpull:`13559`.
45 53
46 54 .. _version 8.1:
47 55
48 56 IPython 8.1.0
49 57 -------------
50 58
51 59 IPython 8.1 is the first minor release after 8.0 and fixes a number of bugs and
52 60 Update a few behavior that were problematic with the 8.0 as with many new major
53 61 release.
54 62
55 63 Note that beyond the changes listed here, IPython 8.1.0 also contains all the
56 64 features listed in :ref:`version 7.32`.
57 65
58 66 - Misc and multiple fixes around quotation auto-closing. It is now disabled by
59 67 default. Run with ``TerminalInteractiveShell.auto_match=True`` to re-enabled
60 68 - Require pygments>=2.4.0 :ghpull:`13459`, this was implicit in the code, but
61 69 is now explicit in ``setup.cfg``/``setup.py``
62 70 - Docs improvement of ``core.magic_arguments`` examples. :ghpull:`13433`
63 71 - Multi-line edit executes too early with await. :ghpull:`13424`
64 72
65 73 - ``black`` is back as an optional dependency, and autoformatting disabled by
66 74 default until some fixes are implemented (black improperly reformat magics).
67 75 :ghpull:`13471` Additionally the ability to use ``yapf`` as a code
68 76 reformatter has been added :ghpull:`13528` . You can use
69 77 ``TerminalInteractiveShell.autoformatter="black"``,
70 78 ``TerminalInteractiveShell.autoformatter="yapf"`` to re-enable auto formating
71 79 with black, or switch to yapf.
72 80
73 81 - Fix and issue where ``display`` was not defined.
74 82
75 83 - Auto suggestions are now configurable. Currently only
76 84 ``AutoSuggestFromHistory`` (default) and ``None``. new provider contribution
77 85 welcomed. :ghpull:`13475`
78 86
79 87 - multiple packaging/testing improvement to simplify downstream packaging
80 88 (xfail with reasons, try to not access network...).
81 89
82 90 - Update deprecation. ``InteractiveShell.magic`` internal method has been
83 91 deprecated for many years but did not emit a warning until now.
84 92
85 93 - internal ``appended_to_syspath`` context manager has been deprecated.
86 94
87 95 - fix an issue with symlinks in virtualenv :ghpull:`13537` (Reverted in 8.1.1)
88 96
89 97 - Fix an issue with vim mode, where cursor would not be reset on exit :ghpull:`13472`
90 98
91 99 - ipython directive now remove only known pseudo-decorators :ghpull:`13532`
92 100
93 101 - ``IPython/lib/security`` which used to be used for jupyter notebook has been
94 102 removed.
95 103
96 104 - Fix an issue where ``async with`` would execute on new lines. :ghpull:`13436`
97 105
98 106
99 107 We want to remind users that IPython is part of the Jupyter organisations, and
100 108 thus governed by a Code of Conduct. Some of the behavior we have seen on GitHub is not acceptable.
101 109 Abuse and non-respectful comments on discussion will not be tolerated.
102 110
103 111 Many thanks to all the contributors to this release, many of the above fixed issue and
104 112 new features where done by first time contributors, showing there is still
105 113 plenty of easy contribution possible in IPython
106 114 . You can find all individual contributions
107 115 to this milestone `on github <https://github.com/ipython/ipython/milestone/91>`__.
108 116
109 117 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
110 118 work on IPython and related libraries. In particular the Lazy autoloading of
111 119 magics that you will find described in the 7.32 release notes.
112 120
113 121
114 122 .. _version 8.0.1:
115 123
116 124 IPython 8.0.1 (CVE-2022-21699)
117 125 ------------------------------
118 126
119 127 IPython 8.0.1, 7.31.1 and 5.11 are security releases that change some default
120 128 values in order to prevent potential Execution with Unnecessary Privileges.
121 129
122 130 Almost all version of IPython looks for configuration and profiles in current
123 131 working directory. Since IPython was developed before pip and environments
124 132 existed it was used a convenient way to load code/packages in a project
125 133 dependant way.
126 134
127 135 In 2022, it is not necessary anymore, and can lead to confusing behavior where
128 136 for example cloning a repository and starting IPython or loading a notebook from
129 137 any Jupyter-Compatible interface that has ipython set as a kernel can lead to
130 138 code execution.
131 139
132 140
133 141 I did not find any standard way for packaged to advertise CVEs they fix, I'm
134 142 thus trying to add a ``__patched_cves__`` attribute to the IPython module that
135 143 list the CVEs that should have been fixed. This attribute is informational only
136 144 as if a executable has a flaw, this value can always be changed by an attacker.
137 145
138 146 .. code::
139 147
140 148 In [1]: import IPython
141 149
142 150 In [2]: IPython.__patched_cves__
143 151 Out[2]: {'CVE-2022-21699'}
144 152
145 153 In [3]: 'CVE-2022-21699' in IPython.__patched_cves__
146 154 Out[3]: True
147 155
148 156 Thus starting with this version:
149 157
150 158 - The current working directory is not searched anymore for profiles or
151 159 configurations files.
152 160 - Added a ``__patched_cves__`` attribute (set of strings) to IPython module that contain
153 161 the list of fixed CVE. This is informational only.
154 162
155 163 Further details can be read on the `GitHub Advisory <https://github.com/ipython/ipython/security/advisories/GHSA-pq7m-3gw7-gq5x>`__
156 164
157 165
158 166 .. _version 8.0:
159 167
160 168 IPython 8.0
161 169 -----------
162 170
163 171 IPython 8.0 is bringing a large number of new features and improvements to both the
164 172 user of the terminal and of the kernel via Jupyter. The removal of compatibility
165 173 with older version of Python is also the opportunity to do a couple of
166 174 performance improvements in particular with respect to startup time.
167 175 The 8.x branch started diverging from its predecessor around IPython 7.12
168 176 (January 2020).
169 177
170 178 This release contains 250+ pull requests, in addition to many of the features
171 179 and backports that have made it to the 7.x branch. Please see the
172 180 `8.0 milestone <https://github.com/ipython/ipython/milestone/73?closed=1>`__ for the full list of pull requests.
173 181
174 182 Please feel free to send pull requests to updates those notes after release,
175 183 I have likely forgotten a few things reviewing 250+ PRs.
176 184
177 185 Dependencies changes/downstream packaging
178 186 -----------------------------------------
179 187
180 188 Most of our building steps have been changed to be (mostly) declarative
181 189 and follow PEP 517. We are trying to completely remove ``setup.py`` (:ghpull:`13238`) and are
182 190 looking for help to do so.
183 191
184 192 - minimum supported ``traitlets`` version is now 5+
185 193 - we now require ``stack_data``
186 194 - minimal Python is now 3.8
187 195 - ``nose`` is not a testing requirement anymore
188 196 - ``pytest`` replaces nose.
189 197 - ``iptest``/``iptest3`` cli entrypoints do not exists anymore.
190 198 - minimum officially support ``numpy`` version has been bumped, but this should
191 199 not have much effect on packaging.
192 200
193 201
194 202 Deprecation and removal
195 203 -----------------------
196 204
197 205 We removed almost all features, arguments, functions, and modules that were
198 206 marked as deprecated between IPython 1.0 and 5.0. As a reminder, 5.0 was released
199 207 in 2016, and 1.0 in 2013. Last release of the 5 branch was 5.10.0, in May 2020.
200 208 The few remaining deprecated features we left have better deprecation warnings
201 209 or have been turned into explicit errors for better error messages.
202 210
203 211 I will use this occasion to add the following requests to anyone emitting a
204 212 deprecation warning:
205 213
206 214 - Please add at least ``stacklevel=2`` so that the warning is emitted into the
207 215 caller context, and not the callee one.
208 216 - Please add **since which version** something is deprecated.
209 217
210 218 As a side note, it is much easier to conditionally compare version
211 219 numbers rather than using ``try/except`` when functionality changes with a version.
212 220
213 221 I won't list all the removed features here, but modules like ``IPython.kernel``,
214 222 which was just a shim module around ``ipykernel`` for the past 8 years, have been
215 223 removed, and so many other similar things that pre-date the name **Jupyter**
216 224 itself.
217 225
218 226 We no longer need to add ``IPython.extensions`` to the PYTHONPATH because that is being
219 227 handled by ``load_extension``.
220 228
221 229 We are also removing ``Cythonmagic``, ``sympyprinting`` and ``rmagic`` as they are now in
222 230 other packages and no longer need to be inside IPython.
223 231
224 232
225 233 Documentation
226 234 -------------
227 235
228 236 The majority of our docstrings have now been reformatted and automatically fixed by
229 237 the experimental `VΓ©lin <https://pypi.org/project/velin/>`_ project to conform
230 238 to numpydoc.
231 239
232 240 Type annotations
233 241 ----------------
234 242
235 243 While IPython itself is highly dynamic and can't be completely typed, many of
236 244 the functions now have type annotations, and part of the codebase is now checked
237 245 by mypy.
238 246
239 247
240 248 Featured changes
241 249 ----------------
242 250
243 251 Here is a features list of changes in IPython 8.0. This is of course non-exhaustive.
244 252 Please note as well that many features have been added in the 7.x branch as well
245 253 (and hence why you want to read the 7.x what's new notes), in particular
246 254 features contributed by QuantStack (with respect to debugger protocol and Xeus
247 255 Python), as well as many debugger features that I was pleased to implement as
248 256 part of my work at QuanSight and sponsored by DE Shaw.
249 257
250 258 Traceback improvements
251 259 ~~~~~~~~~~~~~~~~~~~~~~
252 260
253 261 Previously, error tracebacks for errors happening in code cells were showing a
254 262 hash, the one used for compiling the Python AST::
255 263
256 264 In [1]: def foo():
257 265 ...: return 3 / 0
258 266 ...:
259 267
260 268 In [2]: foo()
261 269 ---------------------------------------------------------------------------
262 270 ZeroDivisionError Traceback (most recent call last)
263 271 <ipython-input-2-c19b6d9633cf> in <module>
264 272 ----> 1 foo()
265 273
266 274 <ipython-input-1-1595a74c32d5> in foo()
267 275 1 def foo():
268 276 ----> 2 return 3 / 0
269 277 3
270 278
271 279 ZeroDivisionError: division by zero
272 280
273 281 The error traceback is now correctly formatted, showing the cell number in which the error happened::
274 282
275 283 In [1]: def foo():
276 284 ...: return 3 / 0
277 285 ...:
278 286
279 287 Input In [2]: foo()
280 288 ---------------------------------------------------------------------------
281 289 ZeroDivisionError Traceback (most recent call last)
282 290 input In [2], in <module>
283 291 ----> 1 foo()
284 292
285 293 Input In [1], in foo()
286 294 1 def foo():
287 295 ----> 2 return 3 / 0
288 296
289 297 ZeroDivisionError: division by zero
290 298
291 299 The ``stack_data`` package has been integrated, which provides smarter information in the traceback;
292 300 in particular it will highlight the AST node where an error occurs which can help to quickly narrow down errors.
293 301
294 302 For example in the following snippet::
295 303
296 304 def foo(i):
297 305 x = [[[0]]]
298 306 return x[0][i][0]
299 307
300 308
301 309 def bar():
302 310 return foo(0) + foo(
303 311 1
304 312 ) + foo(2)
305 313
306 314
307 315 calling ``bar()`` would raise an ``IndexError`` on the return line of ``foo``,
308 316 and IPython 8.0 is capable of telling you where the index error occurs::
309 317
310 318
311 319 IndexError
312 320 Input In [2], in <module>
313 321 ----> 1 bar()
314 322 ^^^^^
315 323
316 324 Input In [1], in bar()
317 325 6 def bar():
318 326 ----> 7 return foo(0) + foo(
319 327 ^^^^
320 328 8 1
321 329 ^^^^^^^^
322 330 9 ) + foo(2)
323 331 ^^^^
324 332
325 333 Input In [1], in foo(i)
326 334 1 def foo(i):
327 335 2 x = [[[0]]]
328 336 ----> 3 return x[0][i][0]
329 337 ^^^^^^^
330 338
331 339 The corresponding locations marked here with ``^`` will show up highlighted in
332 340 the terminal and notebooks.
333 341
334 342 Finally, a colon ``::`` and line number is appended after a filename in
335 343 traceback::
336 344
337 345
338 346 ZeroDivisionError Traceback (most recent call last)
339 347 File ~/error.py:4, in <module>
340 348 1 def f():
341 349 2 1/0
342 350 ----> 4 f()
343 351
344 352 File ~/error.py:2, in f()
345 353 1 def f():
346 354 ----> 2 1/0
347 355
348 356 Many terminals and editors have integrations enabling you to directly jump to the
349 357 relevant file/line when this syntax is used, so this small addition may have a high
350 358 impact on productivity.
351 359
352 360
353 361 Autosuggestions
354 362 ~~~~~~~~~~~~~~~
355 363
356 364 Autosuggestion is a very useful feature available in `fish <https://fishshell.com/>`__, `zsh <https://en.wikipedia.org/wiki/Z_shell>`__, and `prompt-toolkit <https://python-prompt-toolkit.readthedocs.io/en/master/pages/asking_for_input.html#auto-suggestion>`__.
357 365
358 366 `Ptpython <https://github.com/prompt-toolkit/ptpython#ptpython>`__ allows users to enable this feature in
359 367 `ptpython/config.py <https://github.com/prompt-toolkit/ptpython/blob/master/examples/ptpython_config/config.py#L90>`__.
360 368
361 369 This feature allows users to accept autosuggestions with ctrl e, ctrl f,
362 370 or right arrow as described below.
363 371
364 372 1. Start ipython
365 373
366 374 .. image:: ../_images/8.0/auto_suggest_1_prompt_no_text.png
367 375
368 376 2. Run ``print("hello")``
369 377
370 378 .. image:: ../_images/8.0/auto_suggest_2_print_hello_suggest.png
371 379
372 380 3. start typing ``print`` again to see the autosuggestion
373 381
374 382 .. image:: ../_images/8.0/auto_suggest_3_print_hello_suggest.png
375 383
376 384 4. Press ``ctrl-f``, or ``ctrl-e``, or ``right-arrow`` to accept the suggestion
377 385
378 386 .. image:: ../_images/8.0/auto_suggest_4_print_hello.png
379 387
380 388 You can also complete word by word:
381 389
382 390 1. Run ``def say_hello(): print("hello")``
383 391
384 392 .. image:: ../_images/8.0/auto_suggest_second_prompt.png
385 393
386 394 2. Start typing the first letter if ``def`` to see the autosuggestion
387 395
388 396 .. image:: ../_images/8.0/auto_suggest_d_phantom.png
389 397
390 398 3. Press ``alt-f`` (or ``escape`` followed by ``f``), to accept the first word of the suggestion
391 399
392 400 .. image:: ../_images/8.0/auto_suggest_def_phantom.png
393 401
394 402 Importantly, this feature does not interfere with tab completion:
395 403
396 404 1. After running ``def say_hello(): print("hello")``, press d
397 405
398 406 .. image:: ../_images/8.0/auto_suggest_d_phantom.png
399 407
400 408 2. Press Tab to start tab completion
401 409
402 410 .. image:: ../_images/8.0/auto_suggest_d_completions.png
403 411
404 412 3A. Press Tab again to select the first option
405 413
406 414 .. image:: ../_images/8.0/auto_suggest_def_completions.png
407 415
408 416 3B. Press ``alt f`` (``escape``, ``f``) to accept to accept the first word of the suggestion
409 417
410 418 .. image:: ../_images/8.0/auto_suggest_def_phantom.png
411 419
412 420 3C. Press ``ctrl-f`` or ``ctrl-e`` to accept the entire suggestion
413 421
414 422 .. image:: ../_images/8.0/auto_suggest_match_parens.png
415 423
416 424
417 425 Currently, autosuggestions are only shown in the emacs or vi insert editing modes:
418 426
419 427 - The ctrl e, ctrl f, and alt f shortcuts work by default in emacs mode.
420 428 - To use these shortcuts in vi insert mode, you will have to create `custom keybindings in your config.py <https://github.com/mskar/setup/commit/2892fcee46f9f80ef7788f0749edc99daccc52f4/>`__.
421 429
422 430
423 431 Show pinfo information in ipdb using "?" and "??"
424 432 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
425 433
426 434 In IPDB, it is now possible to show the information about an object using "?"
427 435 and "??", in much the same way that it can be done when using the IPython prompt::
428 436
429 437 ipdb> partial?
430 438 Init signature: partial(self, /, *args, **kwargs)
431 439 Docstring:
432 440 partial(func, *args, **keywords) - new function with partial application
433 441 of the given arguments and keywords.
434 442 File: ~/.pyenv/versions/3.8.6/lib/python3.8/functools.py
435 443 Type: type
436 444 Subclasses:
437 445
438 446 Previously, ``pinfo`` or ``pinfo2`` command had to be used for this purpose.
439 447
440 448
441 449 Autoreload 3 feature
442 450 ~~~~~~~~~~~~~~~~~~~~
443 451
444 452 Example: When an IPython session is run with the 'autoreload' extension loaded,
445 453 you will now have the option '3' to select, which means the following:
446 454
447 455 1. replicate all functionality from option 2
448 456 2. autoload all new funcs/classes/enums/globals from the module when they are added
449 457 3. autoload all newly imported funcs/classes/enums/globals from external modules
450 458
451 459 Try ``%autoreload 3`` in an IPython session after running ``%load_ext autoreload``.
452 460
453 461 For more information please see the following unit test : ``extensions/tests/test_autoreload.py:test_autoload_newly_added_objects``
454 462
455 463 Auto formatting with black in the CLI
456 464 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
457 465
458 466 This feature was present in 7.x, but disabled by default.
459 467
460 468 In 8.0, input was automatically reformatted with Black when black was installed.
461 469 This feature has been reverted for the time being.
462 470 You can re-enable it by setting ``TerminalInteractiveShell.autoformatter`` to ``"black"``
463 471
464 472 History Range Glob feature
465 473 ~~~~~~~~~~~~~~~~~~~~~~~~~~
466 474
467 475 Previously, when using ``%history``, users could specify either
468 476 a range of sessions and lines, for example:
469 477
470 478 .. code-block:: python
471 479
472 480 ~8/1-~6/5 # see history from the first line of 8 sessions ago,
473 481 # to the fifth line of 6 sessions ago.``
474 482
475 483 Or users could specify a glob pattern:
476 484
477 485 .. code-block:: python
478 486
479 487 -g <pattern> # glob ALL history for the specified pattern.
480 488
481 489 However users could *not* specify both.
482 490
483 491 If a user *did* specify both a range and a glob pattern,
484 492 then the glob pattern would be used (globbing *all* history) *and the range would be ignored*.
485 493
486 494 With this enhancement, if a user specifies both a range and a glob pattern, then the glob pattern will be applied to the specified range of history.
487 495
488 496 Don't start a multi-line cell with sunken parenthesis
489 497 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
490 498
491 499 From now on, IPython will not ask for the next line of input when given a single
492 500 line with more closing than opening brackets. For example, this means that if
493 501 you (mis)type ``]]`` instead of ``[]``, a ``SyntaxError`` will show up, instead of
494 502 the ``...:`` prompt continuation.
495 503
496 504 IPython shell for ipdb interact
497 505 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
498 506
499 507 The ipdb ``interact`` starts an IPython shell instead of Python's built-in ``code.interact()``.
500 508
501 509 Automatic Vi prompt stripping
502 510 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
503 511
504 512 When pasting code into IPython, it will strip the leading prompt characters if
505 513 there are any. For example, you can paste the following code into the console -
506 514 it will still work, even though each line is prefixed with prompts (`In`,
507 515 `Out`)::
508 516
509 517 In [1]: 2 * 2 == 4
510 518 Out[1]: True
511 519
512 520 In [2]: print("This still works as pasted")
513 521
514 522
515 523 Previously, this was not the case for the Vi-mode prompts::
516 524
517 525 In [1]: [ins] In [13]: 2 * 2 == 4
518 526 ...: Out[13]: True
519 527 ...:
520 528 File "<ipython-input-1-727bb88eaf33>", line 1
521 529 [ins] In [13]: 2 * 2 == 4
522 530 ^
523 531 SyntaxError: invalid syntax
524 532
525 533 This is now fixed, and Vi prompt prefixes - ``[ins]`` and ``[nav]`` - are
526 534 skipped just as the normal ``In`` would be.
527 535
528 536 IPython shell can be started in the Vi mode using ``ipython --TerminalInteractiveShell.editing_mode=vi``,
529 537 You should be able to change mode dynamically with ``%config TerminalInteractiveShell.editing_mode='vi'``
530 538
531 539 Empty History Ranges
532 540 ~~~~~~~~~~~~~~~~~~~~
533 541
534 542 A number of magics that take history ranges can now be used with an empty
535 543 range. These magics are:
536 544
537 545 * ``%save``
538 546 * ``%load``
539 547 * ``%pastebin``
540 548 * ``%pycat``
541 549
542 550 Using them this way will make them take the history of the current session up
543 551 to the point of the magic call (such that the magic itself will not be
544 552 included).
545 553
546 554 Therefore it is now possible to save the whole history to a file using
547 555 ``%save <filename>``, load and edit it using ``%load`` (makes for a nice usage
548 556 when followed with :kbd:`F2`), send it to `dpaste.org <http://dpast.org>`_ using
549 557 ``%pastebin``, or view the whole thing syntax-highlighted with a single
550 558 ``%pycat``.
551 559
552 560
553 561 Windows timing implementation: Switch to process_time
554 562 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
555 563 Timing on Windows, for example with ``%%time``, was changed from being based on ``time.perf_counter``
556 564 (which counted time even when the process was sleeping) to being based on ``time.process_time`` instead
557 565 (which only counts CPU time). This brings it closer to the behavior on Linux. See :ghpull:`12984`.
558 566
559 567 Miscellaneous
560 568 ~~~~~~~~~~~~~
561 569 - Non-text formatters are not disabled in the terminal, which should simplify
562 570 writing extensions displaying images or other mimetypes in supporting terminals.
563 571 :ghpull:`12315`
564 572 - It is now possible to automatically insert matching brackets in Terminal IPython using the
565 573 ``TerminalInteractiveShell.auto_match=True`` option. :ghpull:`12586`
566 574 - We are thinking of deprecating the current ``%%javascript`` magic in favor of a better replacement. See :ghpull:`13376`.
567 575 - ``~`` is now expanded when part of a path in most magics :ghpull:`13385`
568 576 - ``%/%%timeit`` magic now adds a comma every thousands to make reading a long number easier :ghpull:`13379`
569 577 - ``"info"`` messages can now be customised to hide some fields :ghpull:`13343`
570 578 - ``collections.UserList`` now pretty-prints :ghpull:`13320`
571 579 - The debugger now has a persistent history, which should make it less
572 580 annoying to retype commands :ghpull:`13246`
573 581 - ``!pip`` ``!conda`` ``!cd`` or ``!ls`` are likely doing the wrong thing. We
574 582 now warn users if they use one of those commands. :ghpull:`12954`
575 583 - Make ``%precision`` work for ``numpy.float64`` type :ghpull:`12902`
576 584
577 585 Re-added support for XDG config directories
578 586 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
579 587
580 588 XDG support through the years comes and goes. There is a tension between having
581 589 an identical location for configuration in all platforms versus having simple instructions.
582 590 After initial failures a couple of years ago, IPython was modified to automatically migrate XDG
583 591 config files back into ``~/.ipython``. That migration code has now been removed.
584 592 IPython now checks the XDG locations, so if you _manually_ move your config
585 593 files to your preferred location, IPython will not move them back.
586 594
587 595
588 596 Preparing for Python 3.10
589 597 -------------------------
590 598
591 599 To prepare for Python 3.10, we have started working on removing reliance and
592 600 any dependency that is not compatible with Python 3.10. This includes migrating our
593 601 test suite to pytest and starting to remove nose. This also means that the
594 602 ``iptest`` command is now gone and all testing is via pytest.
595 603
596 604 This was in large part thanks to the NumFOCUS Small Developer grant, which enabled us to
597 605 allocate \$4000 to hire `Nikita Kniazev (@Kojoley) <https://github.com/Kojoley>`_,
598 606 who did a fantastic job at updating our code base, migrating to pytest, pushing
599 607 our coverage, and fixing a large number of bugs. I highly recommend contacting
600 608 them if you need help with C++ and Python projects.
601 609
602 610 You can find all relevant issues and PRs with the SDG 2021 tag `<https://github.com/ipython/ipython/issues?q=label%3A%22Numfocus+SDG+2021%22+>`__
603 611
604 612 Removing support for older Python versions
605 613 ------------------------------------------
606 614
607 615
608 616 We are removing support for Python up through 3.7, allowing internal code to use the more
609 617 efficient ``pathlib`` and to make better use of type annotations.
610 618
611 619 .. image:: ../_images/8.0/pathlib_pathlib_everywhere.jpg
612 620 :alt: "Meme image of Toy Story with Woody and Buzz, with the text 'pathlib, pathlib everywhere'"
613 621
614 622
615 623 We had about 34 PRs only to update some logic to update some functions from managing strings to
616 624 using Pathlib.
617 625
618 626 The completer has also seen significant updates and now makes use of newer Jedi APIs,
619 627 offering faster and more reliable tab completion.
620 628
621 629 Misc Statistics
622 630 ---------------
623 631
624 632 Here are some numbers::
625 633
626 634 7.x: 296 files, 12561 blank lines, 20282 comments, 35142 line of code.
627 635 8.0: 252 files, 12053 blank lines, 19232 comments, 34505 line of code.
628 636
629 637 $ git diff --stat 7.x...master | tail -1
630 638 340 files changed, 13399 insertions(+), 12421 deletions(-)
631 639
632 640 We have commits from 162 authors, who contributed 1916 commits in 23 month, excluding merges (to not bias toward
633 641 maintainers pushing buttons).::
634 642
635 643 $ git shortlog -s --no-merges 7.x...master | sort -nr
636 644 535 Matthias Bussonnier
637 645 86 Nikita Kniazev
638 646 69 Blazej Michalik
639 647 49 Samuel Gaist
640 648 27 Itamar Turner-Trauring
641 649 18 Spas Kalaydzhisyki
642 650 17 Thomas Kluyver
643 651 17 Quentin Peter
644 652 17 James Morris
645 653 17 Artur Svistunov
646 654 15 Bart Skowron
647 655 14 Alex Hall
648 656 13 rushabh-v
649 657 13 Terry Davis
650 658 13 Benjamin Ragan-Kelley
651 659 8 martinRenou
652 660 8 farisachugthai
653 661 7 dswij
654 662 7 Gal B
655 663 7 Corentin Cadiou
656 664 6 yuji96
657 665 6 Martin Skarzynski
658 666 6 Justin Palmer
659 667 6 Daniel Goldfarb
660 668 6 Ben Greiner
661 669 5 Sammy Al Hashemi
662 670 5 Paul Ivanov
663 671 5 Inception95
664 672 5 Eyenpi
665 673 5 Douglas Blank
666 674 5 Coco Mishra
667 675 5 Bibo Hao
668 676 5 AndrΓ© A. Gomes
669 677 5 Ahmed Fasih
670 678 4 takuya fujiwara
671 679 4 palewire
672 680 4 Thomas A Caswell
673 681 4 Talley Lambert
674 682 4 Scott Sanderson
675 683 4 Ram Rachum
676 684 4 Nick Muoh
677 685 4 Nathan Goldbaum
678 686 4 Mithil Poojary
679 687 4 Michael T
680 688 4 Jakub Klus
681 689 4 Ian Castleden
682 690 4 Eli Rykoff
683 691 4 Ashwin Vishnu
684 692 3 谭九鼎
685 693 3 sleeping
686 694 3 Sylvain Corlay
687 695 3 Peter Corke
688 696 3 Paul Bissex
689 697 3 Matthew Feickert
690 698 3 Fernando Perez
691 699 3 Eric Wieser
692 700 3 Daniel Mietchen
693 701 3 Aditya Sathe
694 702 3 007vedant
695 703 2 rchiodo
696 704 2 nicolaslazo
697 705 2 luttik
698 706 2 gorogoroumaru
699 707 2 foobarbyte
700 708 2 bar-hen
701 709 2 Theo Ouzhinski
702 710 2 Strawkage
703 711 2 Samreen Zarroug
704 712 2 Pete Blois
705 713 2 Meysam Azad
706 714 2 Matthieu Ancellin
707 715 2 Mark Schmitz
708 716 2 Maor Kleinberger
709 717 2 MRCWirtz
710 718 2 Lumir Balhar
711 719 2 Julien Rabinow
712 720 2 Juan Luis Cano RodrΓ­guez
713 721 2 Joyce Er
714 722 2 Jakub
715 723 2 Faris A Chugthai
716 724 2 Ethan Madden
717 725 2 Dimitri Papadopoulos
718 726 2 Diego Fernandez
719 727 2 Daniel Shimon
720 728 2 Coco Bennett
721 729 2 Carlos Cordoba
722 730 2 Boyuan Liu
723 731 2 BaoGiang HoangVu
724 732 2 Augusto
725 733 2 Arthur Svistunov
726 734 2 Arthur Moreira
727 735 2 Ali Nabipour
728 736 2 Adam Hackbarth
729 737 1 richard
730 738 1 linar-jether
731 739 1 lbennett
732 740 1 juacrumar
733 741 1 gpotter2
734 742 1 digitalvirtuoso
735 743 1 dalthviz
736 744 1 Yonatan Goldschmidt
737 745 1 Tomasz KΕ‚oczko
738 746 1 Tobias Bengfort
739 747 1 Timur Kushukov
740 748 1 Thomas
741 749 1 Snir Broshi
742 750 1 Shao Yang Hong
743 751 1 Sanjana-03
744 752 1 Romulo Filho
745 753 1 Rodolfo Carvalho
746 754 1 Richard Shadrach
747 755 1 Reilly Tucker Siemens
748 756 1 Rakessh Roshan
749 757 1 Piers Titus van der Torren
750 758 1 PhanatosZou
751 759 1 Pavel Safronov
752 760 1 Paulo S. Costa
753 761 1 Paul McCarthy
754 762 1 NotWearingPants
755 763 1 Naelson Douglas
756 764 1 Michael Tiemann
757 765 1 Matt Wozniski
758 766 1 Markus Wageringel
759 767 1 Marcus Wirtz
760 768 1 Marcio Mazza
761 769 1 LumΓ­r 'Frenzy' Balhar
762 770 1 Lightyagami1
763 771 1 Leon Anavi
764 772 1 LeafyLi
765 773 1 L0uisJ0shua
766 774 1 Kyle Cutler
767 775 1 Krzysztof Cybulski
768 776 1 Kevin Kirsche
769 777 1 KIU Shueng Chuan
770 778 1 Jonathan Slenders
771 779 1 Jay Qi
772 780 1 Jake VanderPlas
773 781 1 Iwan Briquemont
774 782 1 Hussaina Begum Nandyala
775 783 1 Gordon Ball
776 784 1 Gabriel Simonetto
777 785 1 Frank Tobia
778 786 1 Erik
779 787 1 Elliott Sales de Andrade
780 788 1 Daniel Hahler
781 789 1 Dan Green-Leipciger
782 790 1 Dan Green
783 791 1 Damian Yurzola
784 792 1 Coon, Ethan T
785 793 1 Carol Willing
786 794 1 Brian Lee
787 795 1 Brendan Gerrity
788 796 1 Blake Griffin
789 797 1 Bastian Ebeling
790 798 1 Bartosz Telenczuk
791 799 1 Ankitsingh6299
792 800 1 Andrew Port
793 801 1 Andrew J. Hesford
794 802 1 Albert Zhang
795 803 1 Adam Johnson
796 804
797 805 This does not, of course, represent non-code contributions, for which we are also grateful.
798 806
799 807
800 808 API Changes using Frappuccino
801 809 -----------------------------
802 810
803 811 This is an experimental exhaustive API difference using `Frappuccino <https://pypi.org/project/frappuccino/>`_
804 812
805 813
806 814 The following items are new in IPython 8.0 ::
807 815
808 816 + IPython.core.async_helpers.get_asyncio_loop()
809 817 + IPython.core.completer.Dict
810 818 + IPython.core.completer.Pattern
811 819 + IPython.core.completer.Sequence
812 820 + IPython.core.completer.__skip_doctest__
813 821 + IPython.core.debugger.Pdb.precmd(self, line)
814 822 + IPython.core.debugger.__skip_doctest__
815 823 + IPython.core.display.__getattr__(name)
816 824 + IPython.core.display.warn
817 825 + IPython.core.display_functions
818 826 + IPython.core.display_functions.DisplayHandle
819 827 + IPython.core.display_functions.DisplayHandle.display(self, obj, **kwargs)
820 828 + IPython.core.display_functions.DisplayHandle.update(self, obj, **kwargs)
821 829 + IPython.core.display_functions.__all__
822 830 + IPython.core.display_functions.__builtins__
823 831 + IPython.core.display_functions.__cached__
824 832 + IPython.core.display_functions.__doc__
825 833 + IPython.core.display_functions.__file__
826 834 + IPython.core.display_functions.__loader__
827 835 + IPython.core.display_functions.__name__
828 836 + IPython.core.display_functions.__package__
829 837 + IPython.core.display_functions.__spec__
830 838 + IPython.core.display_functions.b2a_hex
831 839 + IPython.core.display_functions.clear_output(wait=False)
832 840 + IPython.core.display_functions.display(*objs, include='None', exclude='None', metadata='None', transient='None', display_id='None', raw=False, clear=False, **kwargs)
833 841 + IPython.core.display_functions.publish_display_data(data, metadata='None', source='<deprecated>', *, transient='None', **kwargs)
834 842 + IPython.core.display_functions.update_display(obj, *, display_id, **kwargs)
835 843 + IPython.core.extensions.BUILTINS_EXTS
836 844 + IPython.core.inputtransformer2.has_sunken_brackets(tokens)
837 845 + IPython.core.interactiveshell.Callable
838 846 + IPython.core.interactiveshell.__annotations__
839 847 + IPython.core.ultratb.List
840 848 + IPython.core.ultratb.Tuple
841 849 + IPython.lib.pretty.CallExpression
842 850 + IPython.lib.pretty.CallExpression.factory(name)
843 851 + IPython.lib.pretty.RawStringLiteral
844 852 + IPython.lib.pretty.RawText
845 853 + IPython.terminal.debugger.TerminalPdb.do_interact(self, arg)
846 854 + IPython.terminal.embed.Set
847 855
848 856 The following items have been removed (or moved to superclass)::
849 857
850 858 - IPython.core.application.BaseIPythonApplication.initialize_subcommand
851 859 - IPython.core.completer.Sentinel
852 860 - IPython.core.completer.skip_doctest
853 861 - IPython.core.debugger.Tracer
854 862 - IPython.core.display.DisplayHandle
855 863 - IPython.core.display.DisplayHandle.display
856 864 - IPython.core.display.DisplayHandle.update
857 865 - IPython.core.display.b2a_hex
858 866 - IPython.core.display.clear_output
859 867 - IPython.core.display.display
860 868 - IPython.core.display.publish_display_data
861 869 - IPython.core.display.update_display
862 870 - IPython.core.excolors.Deprec
863 871 - IPython.core.excolors.ExceptionColors
864 872 - IPython.core.history.warn
865 873 - IPython.core.hooks.late_startup_hook
866 874 - IPython.core.hooks.pre_run_code_hook
867 875 - IPython.core.hooks.shutdown_hook
868 876 - IPython.core.interactiveshell.InteractiveShell.init_deprecation_warnings
869 877 - IPython.core.interactiveshell.InteractiveShell.init_readline
870 878 - IPython.core.interactiveshell.InteractiveShell.write
871 879 - IPython.core.interactiveshell.InteractiveShell.write_err
872 880 - IPython.core.interactiveshell.get_default_colors
873 881 - IPython.core.interactiveshell.removed_co_newlocals
874 882 - IPython.core.magics.execution.ExecutionMagics.profile_missing_notice
875 883 - IPython.core.magics.script.PIPE
876 884 - IPython.core.prefilter.PrefilterManager.init_transformers
877 885 - IPython.core.release.classifiers
878 886 - IPython.core.release.description
879 887 - IPython.core.release.keywords
880 888 - IPython.core.release.long_description
881 889 - IPython.core.release.name
882 890 - IPython.core.release.platforms
883 891 - IPython.core.release.url
884 892 - IPython.core.ultratb.VerboseTB.format_records
885 893 - IPython.core.ultratb.find_recursion
886 894 - IPython.core.ultratb.findsource
887 895 - IPython.core.ultratb.fix_frame_records_filenames
888 896 - IPython.core.ultratb.inspect_error
889 897 - IPython.core.ultratb.is_recursion_error
890 898 - IPython.core.ultratb.with_patch_inspect
891 899 - IPython.external.__all__
892 900 - IPython.external.__builtins__
893 901 - IPython.external.__cached__
894 902 - IPython.external.__doc__
895 903 - IPython.external.__file__
896 904 - IPython.external.__loader__
897 905 - IPython.external.__name__
898 906 - IPython.external.__package__
899 907 - IPython.external.__path__
900 908 - IPython.external.__spec__
901 909 - IPython.kernel.KernelConnectionInfo
902 910 - IPython.kernel.__builtins__
903 911 - IPython.kernel.__cached__
904 912 - IPython.kernel.__warningregistry__
905 913 - IPython.kernel.pkg
906 914 - IPython.kernel.protocol_version
907 915 - IPython.kernel.protocol_version_info
908 916 - IPython.kernel.src
909 917 - IPython.kernel.version_info
910 918 - IPython.kernel.warn
911 919 - IPython.lib.backgroundjobs
912 920 - IPython.lib.backgroundjobs.BackgroundJobBase
913 921 - IPython.lib.backgroundjobs.BackgroundJobBase.run
914 922 - IPython.lib.backgroundjobs.BackgroundJobBase.traceback
915 923 - IPython.lib.backgroundjobs.BackgroundJobExpr
916 924 - IPython.lib.backgroundjobs.BackgroundJobExpr.call
917 925 - IPython.lib.backgroundjobs.BackgroundJobFunc
918 926 - IPython.lib.backgroundjobs.BackgroundJobFunc.call
919 927 - IPython.lib.backgroundjobs.BackgroundJobManager
920 928 - IPython.lib.backgroundjobs.BackgroundJobManager.flush
921 929 - IPython.lib.backgroundjobs.BackgroundJobManager.new
922 930 - IPython.lib.backgroundjobs.BackgroundJobManager.remove
923 931 - IPython.lib.backgroundjobs.BackgroundJobManager.result
924 932 - IPython.lib.backgroundjobs.BackgroundJobManager.status
925 933 - IPython.lib.backgroundjobs.BackgroundJobManager.traceback
926 934 - IPython.lib.backgroundjobs.__builtins__
927 935 - IPython.lib.backgroundjobs.__cached__
928 936 - IPython.lib.backgroundjobs.__doc__
929 937 - IPython.lib.backgroundjobs.__file__
930 938 - IPython.lib.backgroundjobs.__loader__
931 939 - IPython.lib.backgroundjobs.__name__
932 940 - IPython.lib.backgroundjobs.__package__
933 941 - IPython.lib.backgroundjobs.__spec__
934 942 - IPython.lib.kernel.__builtins__
935 943 - IPython.lib.kernel.__cached__
936 944 - IPython.lib.kernel.__doc__
937 945 - IPython.lib.kernel.__file__
938 946 - IPython.lib.kernel.__loader__
939 947 - IPython.lib.kernel.__name__
940 948 - IPython.lib.kernel.__package__
941 949 - IPython.lib.kernel.__spec__
942 950 - IPython.lib.kernel.__warningregistry__
943 951 - IPython.paths.fs_encoding
944 952 - IPython.terminal.debugger.DEFAULT_BUFFER
945 953 - IPython.terminal.debugger.cursor_in_leading_ws
946 954 - IPython.terminal.debugger.emacs_insert_mode
947 955 - IPython.terminal.debugger.has_selection
948 956 - IPython.terminal.debugger.vi_insert_mode
949 957 - IPython.terminal.interactiveshell.DISPLAY_BANNER_DEPRECATED
950 958 - IPython.terminal.ipapp.TerminalIPythonApp.parse_command_line
951 959 - IPython.testing.test
952 960 - IPython.utils.contexts.NoOpContext
953 961 - IPython.utils.io.IOStream
954 962 - IPython.utils.io.IOStream.close
955 963 - IPython.utils.io.IOStream.write
956 964 - IPython.utils.io.IOStream.writelines
957 965 - IPython.utils.io.__warningregistry__
958 966 - IPython.utils.io.atomic_writing
959 967 - IPython.utils.io.stderr
960 968 - IPython.utils.io.stdin
961 969 - IPython.utils.io.stdout
962 970 - IPython.utils.io.unicode_std_stream
963 971 - IPython.utils.path.get_ipython_cache_dir
964 972 - IPython.utils.path.get_ipython_dir
965 973 - IPython.utils.path.get_ipython_module_path
966 974 - IPython.utils.path.get_ipython_package_dir
967 975 - IPython.utils.path.locate_profile
968 976 - IPython.utils.path.unquote_filename
969 977 - IPython.utils.py3compat.PY2
970 978 - IPython.utils.py3compat.PY3
971 979 - IPython.utils.py3compat.buffer_to_bytes
972 980 - IPython.utils.py3compat.builtin_mod_name
973 981 - IPython.utils.py3compat.cast_bytes
974 982 - IPython.utils.py3compat.getcwd
975 983 - IPython.utils.py3compat.isidentifier
976 984 - IPython.utils.py3compat.u_format
977 985
978 986 The following signatures differ between 7.x and 8.0::
979 987
980 988 - IPython.core.completer.IPCompleter.unicode_name_matches(self, text)
981 989 + IPython.core.completer.IPCompleter.unicode_name_matches(text)
982 990
983 991 - IPython.core.completer.match_dict_keys(keys, prefix, delims)
984 992 + IPython.core.completer.match_dict_keys(keys, prefix, delims, extra_prefix='None')
985 993
986 994 - IPython.core.interactiveshell.InteractiveShell.object_inspect_mime(self, oname, detail_level=0)
987 995 + IPython.core.interactiveshell.InteractiveShell.object_inspect_mime(self, oname, detail_level=0, omit_sections='()')
988 996
989 997 - IPython.core.interactiveshell.InteractiveShell.set_hook(self, name, hook, priority=50, str_key='None', re_key='None', _warn_deprecated=True)
990 998 + IPython.core.interactiveshell.InteractiveShell.set_hook(self, name, hook, priority=50, str_key='None', re_key='None')
991 999
992 1000 - IPython.core.oinspect.Inspector.info(self, obj, oname='', formatter='None', info='None', detail_level=0)
993 1001 + IPython.core.oinspect.Inspector.info(self, obj, oname='', info='None', detail_level=0)
994 1002
995 1003 - IPython.core.oinspect.Inspector.pinfo(self, obj, oname='', formatter='None', info='None', detail_level=0, enable_html_pager=True)
996 1004 + IPython.core.oinspect.Inspector.pinfo(self, obj, oname='', formatter='None', info='None', detail_level=0, enable_html_pager=True, omit_sections='()')
997 1005
998 1006 - IPython.core.profiledir.ProfileDir.copy_config_file(self, config_file, path='None', overwrite=False)
999 1007 + IPython.core.profiledir.ProfileDir.copy_config_file(self, config_file, path, overwrite=False)
1000 1008
1001 1009 - IPython.core.ultratb.VerboseTB.format_record(self, frame, file, lnum, func, lines, index)
1002 1010 + IPython.core.ultratb.VerboseTB.format_record(self, frame_info)
1003 1011
1004 1012 - IPython.terminal.embed.InteractiveShellEmbed.mainloop(self, local_ns='None', module='None', stack_depth=0, display_banner='None', global_ns='None', compile_flags='None')
1005 1013 + IPython.terminal.embed.InteractiveShellEmbed.mainloop(self, local_ns='None', module='None', stack_depth=0, compile_flags='None')
1006 1014
1007 1015 - IPython.terminal.embed.embed(**kwargs)
1008 1016 + IPython.terminal.embed.embed(*, header='', compile_flags='None', **kwargs)
1009 1017
1010 1018 - IPython.terminal.interactiveshell.TerminalInteractiveShell.interact(self, display_banner='<object object at 0xffffff>')
1011 1019 + IPython.terminal.interactiveshell.TerminalInteractiveShell.interact(self)
1012 1020
1013 1021 - IPython.terminal.interactiveshell.TerminalInteractiveShell.mainloop(self, display_banner='<object object at 0xffffff>')
1014 1022 + IPython.terminal.interactiveshell.TerminalInteractiveShell.mainloop(self)
1015 1023
1016 1024 - IPython.utils.path.get_py_filename(name, force_win32='None')
1017 1025 + IPython.utils.path.get_py_filename(name)
1018 1026
1019 1027 The following are new attributes (that might be inherited)::
1020 1028
1021 1029 + IPython.core.completer.IPCompleter.unicode_names
1022 1030 + IPython.core.debugger.InterruptiblePdb.precmd
1023 1031 + IPython.core.debugger.Pdb.precmd
1024 1032 + IPython.core.ultratb.AutoFormattedTB.has_colors
1025 1033 + IPython.core.ultratb.ColorTB.has_colors
1026 1034 + IPython.core.ultratb.FormattedTB.has_colors
1027 1035 + IPython.core.ultratb.ListTB.has_colors
1028 1036 + IPython.core.ultratb.SyntaxTB.has_colors
1029 1037 + IPython.core.ultratb.TBTools.has_colors
1030 1038 + IPython.core.ultratb.VerboseTB.has_colors
1031 1039 + IPython.terminal.debugger.TerminalPdb.do_interact
1032 1040 + IPython.terminal.debugger.TerminalPdb.precmd
1033 1041
1034 1042 The following attribute/methods have been removed::
1035 1043
1036 1044 - IPython.core.application.BaseIPythonApplication.deprecated_subcommands
1037 1045 - IPython.core.ultratb.AutoFormattedTB.format_records
1038 1046 - IPython.core.ultratb.ColorTB.format_records
1039 1047 - IPython.core.ultratb.FormattedTB.format_records
1040 1048 - IPython.terminal.embed.InteractiveShellEmbed.init_deprecation_warnings
1041 1049 - IPython.terminal.embed.InteractiveShellEmbed.init_readline
1042 1050 - IPython.terminal.embed.InteractiveShellEmbed.write
1043 1051 - IPython.terminal.embed.InteractiveShellEmbed.write_err
1044 1052 - IPython.terminal.interactiveshell.TerminalInteractiveShell.init_deprecation_warnings
1045 1053 - IPython.terminal.interactiveshell.TerminalInteractiveShell.init_readline
1046 1054 - IPython.terminal.interactiveshell.TerminalInteractiveShell.write
1047 1055 - IPython.terminal.interactiveshell.TerminalInteractiveShell.write_err
1048 1056 - IPython.terminal.ipapp.LocateIPythonApp.deprecated_subcommands
1049 1057 - IPython.terminal.ipapp.LocateIPythonApp.initialize_subcommand
1050 1058 - IPython.terminal.ipapp.TerminalIPythonApp.deprecated_subcommands
1051 1059 - IPython.terminal.ipapp.TerminalIPythonApp.initialize_subcommand
General Comments 0
You need to be logged in to leave comments. Login now