##// END OF EJS Templates
fix whatsnew
Matthias Bussonnier -
Show More
@@ -1,1830 +1,1895 b''
1 1 ============
2 2 8.x Series
3 3 ============
4 4
5 5 .. _version 8.15:
6 6
7 7 IPython 8.15
8 8 ------------
9 9
10 10 Medium release of IPython after a couple of month hiatus, and a bit
11 11 off-schedule.
12 12
13 13 Among other, IPython 8.15:
14 14
15 15 - Improve compatibility with future version of Python 3.12/3.13
16 16 :ghpull:`14107`, :ghpull:`14139`,
17 17 - Improve support for ``ExceptionGroups``, :ghpull:`14108`
18 18 - Fix hangs in ``%gui osx``, :ghpull:`14125`
19 19 - Fix memory lead with ``%reset``, :ghpull:`14133`
20 20 - Unstable config option to modify traceback highlighting that is sometime hard
21 21 to read :ghpull:`14138`
22 22 - Support ``.`` in ``ipdb`` as an argument to the ``list`` command
23 23 :ghpull:`14121`
24 24 - Workroud ``parso`` showing warning message when the default logger level is
25 25 changed :ghpull:`14119`
26 26 - Fix multiple issues with matplotlib interactive mode, qt5/qt6 :ghpull:`14128`
27 27
28 28 Support for PEP-678 Exception Notes
29 29 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 30
31 31 Ultratb now shows :pep:`678` notes, improving your debugging experience on
32 32 Python 3.11+ or with libraries such as Pytest and Hypothesis.
33 33
34 34 Native fallback for displaying ExceptionGroup
35 35 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36 36 ExceptionGroups are now displayed with ``traceback.print_exc``, as a temporary fix until UltraTB properly supports displaying child exceptions.
37 37
38 38
39 39 We have two larger features:
40 40
41 41 AST-based macros
42 42 ~~~~~~~~~~~~~~~~
43 43
44 44 :ghpull:`14100` introduce a new and efficient way to modify each execution block
45 45 (cell) using an template-ast-based transform. Unlike IPython pre and post code
46 46 execution hooks, this actually transform the code that is execute with as
47 47 minimal as possible overhead. While it was already technically possible to
48 48 register ast transformers for IPython this was far from evident.
49 49
50 50 This should make it trivial to hook into IPython to implement custom hooks, that
51 51 for example time or profile your code, catch exceptions to provide error
52 52 messages for students or do any other kind of transformations.
53 53
54 54 In addition to programmatic API there is also a magic to quickly register
55 55 hooks::
56 56
57 57 In [1]: %%code_wrap before_after
58 58 ...: print('before')
59 59 ...: __code__
60 60 ...: print('after')
61 61 ...: __ret__
62 62
63 63 This mean that for any subsequent execution code will be executed.
64 64 You can modify the above to print the date, compute the execution time,
65 65 retry the code in a for loop....
66 66
67 67
68 68 Allow IPdb/Pdb to move between chained exceptions
69 69 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70 70
71 71 The main change is the addition of the ability to move between chained
72 72 exceptions when using IPdb, this feature was also contributed to upstream Pdb
73 73 and is thus native to CPython in Python 3.13+ Though ipdb should support this
74 74 feature in older version of Python. I invite you to look at the `CPython changes
75 75 and docs <https://github.com/python/cpython/pull/106676>`__ for more details.
76 76
77 In short, once in post-mortem debuger (``%debug``), you can use the ipdb
78 ``exceptions`` command to switch exceptions, for example:
77 79
80 .. code-block:: ipython
81
82 In [1]: def foo(x):
83 ...: try:
84 ...: bar(x)
85 ...: except Exception as e:
86 ...: raise ValueError("foo (): bar failed") from e
87 ...:
88 ...: def bar(x):
89 ...: 1 / X
90 ...:
91
92 In [2]: foo(0)
93 ---------------------------------------------------------------------------
94 NameError Traceback (most recent call last)
95 Cell In[1], line 3, in foo(x)
96 2 try:
97 ----> 3 bar(x)
98 4 except Exception as e:
99
100 Cell In[1], line 9, in bar(x)
101 8 def bar(x):
102 ----> 9 1 / X
103
104 NameError: name 'X' is not defined
105
106 The above exception was the direct cause of the following exception:
107
108 ValueError Traceback (most recent call last)
109 Cell In[2], line 1
110 ----> 1 foo(0)
111
112 Cell In[1], line 5, in foo(x)
113 3 bar(x)
114 4 except Exception as e:
115 ----> 5 raise ValueError("foo (): bar failed") from e
116
117 ValueError: foo (): bar failed
118
119 In [3]: %debug
120 > <ipython-input-1-b0bbdc271ffb>(5)foo()
121 3 bar(x)
122 4 except Exception as e:
123 ----> 5 raise ValueError("foo (): bar failed") from e
124
125 In previous ipdb you could not go into the bar error, now from within pdb you
126 can use ``exceptions``:
127
128 .. code-block:: ipython
129
130 ipdb> exceptions
131 0 NameError("name 'X' is not defined")
132 > 1 ValueError('foo (): bar failed')
133
134 ipdb> exceptions 0
135 > <ipython-input-1-b0bbdc271ffb>(9)bar()
136 6
137 7
138 8 def bar(x):
139 ----> 9 1 / X
140 10
141
142 ipdb>
78 143
79 In particular I want to thank the `D.E. Shaw group
80 <https://www.deshaw.com/>`__ for suggesting and funding the two largest feature
81 as well as many bug fixes of this release.
144 In particular I want to thank the `D.E. Shaw group <https://www.deshaw.com/>`__
145 for suggesting and funding the two largest feature as well as many bug fixes of
146 this release.
82 147
83 148 As usual you can find the full list of PRs on GitHub under `the 8.15 milestone
84 149 <https://github.com/ipython/ipython/milestone/120?closed=1>`__.
85 150
86 151
87 152
88 153 .. _version 8.14:
89 154
90 155 IPython 8.14
91 156 ------------
92 157
93 158 Small release of IPython.
94 159
95 160 - :ghpull:`14080` fixes some shortcuts issues.
96 161 - :ghpull:`14056` Add option to ``%autoreload`` to hide errors when reloading code. This will be the default for spyder
97 162 user is my understanding.
98 163 - :ghpull:`14039` (and :ghpull:`14040`) to show exception notes in tracebacks.
99 164
100 165 - :ghpull:`14076` Add option to EventManager to prevent printing
101 166
102 167
103 168 SPEC 0 and SPEC 4
104 169 ~~~~~~~~~~~~~~~~~
105 170
106 171 You've heard about the NEPs, (NumPy enhancement Proposal), having a NEP for something non-numpy specific was sometime confusing.
107 172 Long live the `SPECs <https://scientific-python.org/specs/>`_.
108 173
109 174 We are now trying to follow SPEC 0 (aka old NEP 29) for of support of upstream libraries.
110 175
111 176 We also now try to follow SPEC 4 (test and publish nightly on a centralized nightly repository).
112 177 We encourage you to do so as well in order to report breakage, and contribute to the SPEC process !
113 178
114 179
115 180 Python 3.12 compatibility ?
116 181 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
117 182
118 183 Python 3.12 changed its tokenizer to have better support for f-strings and allow arbitrary expression.
119 184 This is a great new feature and performance improvement in python 3.12.
120 185
121 186 Unfortunately this means the new tokenizer does not support incomplete or invalid Python which will
122 187 break many features of IPython. Thus compatibility of IPython with Python 3.12 is not guarantied.
123 188 It is unclear to which extent IPython is affected, and whether we can/should try to still support magics, shell
124 189 escape (``! ....``), ..., as well as how to do it if we can.
125 190
126 191 In addition even if we there is technical feasibility to do so, it is no clear we have the resources to do it.
127 192 We are thus looking for your help if you can _test_ on Python 3.12 to see to which extent this affects users and which
128 193 features are critical.
129 194
130 195 We are not going to pin IPython to Python ``<3.12`` as otherwise on install pip would downgrade/resolve to IPython 8.13,
131 196 so if you plan to update to Python 3.12 after its release, we encourage for extra care.
132 197
133 198
134 199 .. _version 8.13.1:
135 200 .. _version 8.13.2:
136 201 .. _version 8.12.3:
137 202
138 203 IPython 8.13.1, 8.13.2 and 8.12.2
139 204 ---------------------------------
140 205
141 206 3 quick in succession patch release of IPython in addition to IPython 8.13.0
142 207 having been yanked.
143 208
144 209 IPython 8.13.0 was improperly tagged as still compatible with Python 3.8, and
145 210 still had some mention of compatibility with 3.8. IPython 8.13.1 is identical to
146 211 8.13 but with the exception of being correctly tagged. This release and yank was
147 212 mostly done to fix CI.
148 213
149 214 IPython 8.12.2 and 8.13.2 contain UI fixes, with respect to right arrow not
150 215 working in some case in the terminal, and 8.12.2 contain also a requested
151 216 backport of :ghpull:`14029` (Allow safe access to the ``__getattribute__``
152 217 method of modules) for tab completion.
153 218
154 219 .. _version 8.13:
155 220
156 221 IPython 8.13
157 222 ------------
158 223
159 224 As usual for the end of the month, minor release of IPython. This release is
160 225 significant in that it not only has a number of bugfixes, but also drop support
161 226 for Python 3.8 as per NEP 29 (:ghpull:`14023`).
162 227
163 228 All the critical bugfixes have been backported onto the 8.12.1 release (see
164 229 below). In addition to that went into 8.12.1 you'll find:
165 230
166 231 - Pretty reprensentation for ``Counter`` has been fixed to match the Python one
167 232 and be in decreasing order. :ghpull:`14032`
168 233 - Module completion is better when jedi is disabled :ghpull:`14029`.
169 234 - Improvment of ``%%bash`` magic that would get stuck :ghpull:`14019`
170 235
171 236
172 237 We hope you enjoy this release an will maybe see you at JupyterCon in less than
173 238 two weeks.
174 239
175 240 As usual you can find the full list of PRs on GitHub under `the 8.13 milestone
176 241 <https://github.com/ipython/ipython/milestone/115?closed=1>`__.
177 242
178 243 Thanks to the D.E. Shaw group for the request and sponsoring the work.
179 244
180 245
181 246 .. _version 8.12.1:
182 247
183 248 IPython 8.12.1
184 249 --------------
185 250
186 251 This is the twin release of IPython 8.13 that contain only critical UI and bug
187 252 fixes. The next minor version of IPython has dropped support for Python 3.8 – as
188 253 per Nep 29 and this IPython 8.12.x will now only receive bugfixes.
189 254
190 255
191 256 - :ghpull:`14004` Fix a bug introduced in IPython 8.12 that crash when
192 257 inspecting some docstrings.
193 258 - :ghpull:`14010` Fix fast traceback code that was not working in some case.
194 259 - :ghpull:`14014` Fix ``%page`` magic broken in some case.
195 260 - :ghpull:`14026`, :ghpull:`14027` Tweak default shortcut with respect to
196 261 autosuggestions.
197 262 - :ghpull:`14033` add back the ability to use ``.get()`` on OInfo object for
198 263 backward compatibility with h5py (this will be re-deprecated later, and h5py
199 264 will also get a fix).
200 265
201 266 As usual you can find the full list of PRs on GitHub under `the 8.12.1 milestone
202 267 <https://github.com/ipython/ipython/milestone/116?closed=1>`__.
203 268
204 269 Thanks to the D.E. Shaw group for the request and sponsoring the work.
205 270
206 271 .. _version 8.12.0:
207 272
208 273 IPython 8.12
209 274 ------------
210 275
211 276 Hopefully slightly early release for IPython 8.12. Last Thursday of the month,
212 277 even if I guess it's likely already Friday somewhere in the pacific ocean.
213 278
214 279 A number of PRs and bug fixes this month with close to 20 PRs merged !
215 280
216 281
217 282 The IPython repo reached :ghpull:`14000` !! Actually the PR that create those exact release
218 283 note is :ghpull:`14000`. Ok, more issues and PR is not always better, and I'd
219 284 love to have more time to close issues and Pull Requests.
220 285
221 286 Let's note that in less than 2 month JupyterCon is back, in Paris please visit
222 287 `jupytercon.com <https://jupytercon.com>`__, and looking forward to see you
223 288 there.
224 289
225 290 Packagers should take note that ``typing_extension`` is now a mandatory dependency
226 291 for Python versions ``<3.10``.
227 292
228 293
229 294
230 295 Let's note also that according to `NEP29
231 296 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`__, It is soon time to
232 297 stop support for Python 3.8 that will be release more than 3 and 1/2 years ago::
233 298
234 299 On Apr 14, 2023 drop support for Python 3.8 (initially released on Oct 14, 2019)
235 300
236 301 Thus I am likely to stop advertising support for Python 3.8 in the next
237 302 release at the end of April.
238 303
239 304
240 305 Here are some miscellaneous updates of interest:
241 306
242 307 - :ghpull:`13957` brings updates to the Qt integration, particularly for Qt6.
243 308 - :ghpull:`13960` fixes the %debug magic command to give access to the local
244 309 scope.
245 310 - :ghpull:`13964` fixes some crashes with the new fast traceback code. Note that
246 311 there are still some issues with the fast traceback code, and I a, likely
247 312 to fix and tweak behavior.
248 313 - :ghpull:`13973` We are slowly migrating IPython internals to use proper type
249 314 objects/dataclasses instead of dictionaries to allow static typing checks.
250 315 These are technically public API and could lead to breakage, so please let us
251 316 know if that's the case and I'll mitigate.
252 317 - :ghpull:`13990`, :ghpull:`13991`, :ghpull:`13994` all improve keybinding and
253 318 shortcut configurability.
254 319
255 320 As usual you can find the full list of PRs on GitHub under `the 8.12 milestone
256 321 <https://github.com/ipython/ipython/milestone/114?closed=1>`__.
257 322
258 323 We want to thank the D.E. Shaw group for requesting and sponsoring the work on
259 324 the following big feature. We had productive discussions on how to best expose
260 325 this feature
261 326
262 327 Dynamic documentation dispatch
263 328 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
264 329
265 330 We are experimenting with dynamic documentation dispatch for object attribute.
266 331 See :ghissue:`13860`. The goal is to allow object to define documentation for
267 332 their attributes, properties, even when those are dynamically defined with
268 333 `__getattr__`.
269 334
270 335 In particular when those objects are base types it can be useful to show the
271 336 documentation
272 337
273 338
274 339 .. code-block:: ipython
275 340
276 341
277 342 In [1]: class User:
278 343 ...:
279 344 ...: __custom_documentations__ = {
280 345 ...: "first": "The first name of the user.",
281 346 ...: "last": "The last name of the user.",
282 347 ...: }
283 348 ...:
284 349 ...: first:str
285 350 ...: last:str
286 351 ...:
287 352 ...: def __init__(self, first, last):
288 353 ...: self.first = first
289 354 ...: self.last = last
290 355 ...:
291 356 ...: @property
292 357 ...: def full(self):
293 358 ...: """`self.first` and `self.last` joined by a space."""
294 359 ...: return self.first + " " + self.last
295 360 ...:
296 361 ...:
297 362 ...: user = Person('Jane', 'Doe')
298 363
299 364 In [2]: user.first?
300 365 Type: str
301 366 String form: Jane
302 367 Length: 4
303 368 Docstring: the first name of a the person object, a str
304 369 Class docstring:
305 370 ....
306 371
307 372 In [3]: user.last?
308 373 Type: str
309 374 String form: Doe
310 375 Length: 3
311 376 Docstring: the last name, also a str
312 377 ...
313 378
314 379
315 380 We can see here the symmetry with IPython looking for the docstring on the
316 381 properties:
317 382
318 383 .. code-block:: ipython
319 384
320 385
321 386 In [4]: user.full?
322 387 HERE
323 388 Type: property
324 389 String form: <property object at 0x102bb15d0>
325 390 Docstring: first and last join by a space
326 391
327 392
328 393 Note that while in the above example we use a static dictionary, libraries may
329 394 decide to use a custom object that define ``__getitem__``, we caution against
330 395 using objects that would trigger computation to show documentation, but it is
331 396 sometime preferable for highly dynamic code that for example export ans API as
332 397 object.
333 398
334 399
335 400
336 401 .. _version 8.11.0:
337 402
338 403 IPython 8.11
339 404 ------------
340 405
341 406 Back on almost regular monthly schedule for IPython with end-of-month
342 407 really-late-Friday release to make sure some bugs are properly fixed.
343 408 Small addition of with a few new features, bugfix and UX improvements.
344 409
345 410 This is a non-exhaustive list, but among other you will find:
346 411
347 412 Faster Traceback Highlighting
348 413 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
349 414
350 415 Resurrection of pre-IPython-8 traceback highlighting code.
351 416
352 417 Really long and complicated files were slow to highlight in traceback with
353 418 IPython 8 despite upstream improvement that make many case better. Therefore
354 419 starting with IPython 8.11 when one of the highlighted file is more than 10 000
355 420 line long by default, we'll fallback to a faster path that does not have all the
356 421 features of highlighting failing AST nodes.
357 422
358 423 This can be configures by setting the value of
359 424 ``IPython.code.ultratb.FAST_THRESHOLD`` to an arbitrary low or large value.
360 425
361 426
362 427 Autoreload verbosity
363 428 ~~~~~~~~~~~~~~~~~~~~
364 429
365 430 We introduce more descriptive names for the ``%autoreload`` parameter:
366 431
367 432 - ``%autoreload now`` (also ``%autoreload``) - perform autoreload immediately.
368 433 - ``%autoreload off`` (also ``%autoreload 0``) - turn off autoreload.
369 434 - ``%autoreload explicit`` (also ``%autoreload 1``) - turn on autoreload only for modules
370 435 whitelisted by ``%aimport`` statements.
371 436 - ``%autoreload all`` (also ``%autoreload 2``) - turn on autoreload for all modules except those
372 437 blacklisted by ``%aimport`` statements.
373 438 - ``%autoreload complete`` (also ``%autoreload 3``) - all the fatures of ``all`` but also adding new
374 439 objects from the imported modules (see
375 440 IPython/extensions/tests/test_autoreload.py::test_autoload_newly_added_objects).
376 441
377 442 The original designations (e.g. "2") still work, and these new ones are case-insensitive.
378 443
379 444 Additionally, the option ``--print`` or ``-p`` can be added to the line to print the names of
380 445 modules being reloaded. Similarly, ``--log`` or ``-l`` will output the names to the logger at INFO
381 446 level. Both can be used simultaneously.
382 447
383 448 The parsing logic for ``%aimport`` is now improved such that modules can be whitelisted and
384 449 blacklisted in the same line, e.g. it's now possible to call ``%aimport os, -math`` to include
385 450 ``os`` for ``%autoreload explicit`` and exclude ``math`` for modes ``all`` and ``complete``.
386 451
387 452 Terminal shortcuts customization
388 453 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
389 454
390 455 Previously modifying shortcuts was only possible by hooking into startup files
391 456 and practically limited to adding new shortcuts or removing all shortcuts bound
392 457 to a specific key. This release enables users to override existing terminal
393 458 shortcuts, disable them or add new keybindings.
394 459
395 460 For example, to set the :kbd:`right` to accept a single character of auto-suggestion
396 461 you could use::
397 462
398 463 my_shortcuts = [
399 464 {
400 465 "command": "IPython:auto_suggest.accept_character",
401 466 "new_keys": ["right"]
402 467 }
403 468 ]
404 469 %config TerminalInteractiveShell.shortcuts = my_shortcuts
405 470
406 471 You can learn more in :std:configtrait:`TerminalInteractiveShell.shortcuts`
407 472 configuration reference.
408 473
409 474 Miscellaneous
410 475 ~~~~~~~~~~~~~
411 476
412 477 - ``%gui`` should now support PySide6. :ghpull:`13864`
413 478 - Cli shortcuts can now be configured :ghpull:`13928`, see above.
414 479 (note that there might be an issue with prompt_toolkit 3.0.37 and shortcut configuration).
415 480
416 481 - Capture output should now respect ``;`` semicolon to suppress output.
417 482 :ghpull:`13940`
418 483 - Base64 encoded images (in jupyter frontend), will not have trailing newlines.
419 484 :ghpull:`13941`
420 485
421 486 As usual you can find the full list of PRs on GitHub under `the 8.11 milestone
422 487 <https://github.com/ipython/ipython/milestone/113?closed=1>`__.
423 488
424 489 Thanks to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
425 490 work on IPython and related libraries.
426 491
427 492 .. _version 8.10.0:
428 493
429 494 IPython 8.10
430 495 ------------
431 496
432 497 Out of schedule release of IPython with minor fixes to patch a potential CVE-2023-24816.
433 498 This is a really low severity CVE that you most likely are not affected by unless:
434 499
435 500 - You are on windows.
436 501 - You have a custom build of Python without ``_ctypes``
437 502 - You cd or start IPython or Jupyter in untrusted directory which names may be
438 503 valid shell commands.
439 504
440 505 You can read more on `the advisory
441 506 <https://github.com/ipython/ipython/security/advisories/GHSA-29gw-9793-fvw7>`__.
442 507
443 508 In addition to fixing this CVE we also fix a couple of outstanding bugs and issues.
444 509
445 510 As usual you can find the full list of PRs on GitHub under `the 8.10 milestone
446 511 <https://github.com/ipython/ipython/milestone/112?closed=1>`__.
447 512
448 513 In Particular:
449 514
450 515 - bump minimum numpy to `>=1.21` version following NEP29. :ghpull:`13930`
451 516 - fix for compatibility with MyPy 1.0. :ghpull:`13933`
452 517 - fix nbgrader stalling when IPython's ``showtraceback`` function is
453 518 monkeypatched. :ghpull:`13934`
454 519
455 520
456 521
457 522 As this release also contains those minimal changes in addition to fixing the
458 523 CVE I decided to bump the minor version anyway.
459 524
460 525 This will not affect the normal release schedule, so IPython 8.11 is due in
461 526 about 2 weeks.
462 527
463 528 .. _version 8.9.0:
464 529
465 530 IPython 8.9.0
466 531 -------------
467 532
468 533 Second release of IPython in 2023, last Friday of the month, we are back on
469 534 track. This is a small release with a few bug-fixes, and improvements, mostly
470 535 with respect to terminal shortcuts.
471 536
472 537
473 538 The biggest improvement for 8.9 is a drastic amelioration of the
474 539 auto-suggestions sponsored by D.E. Shaw and implemented by the more and more
475 540 active contributor `@krassowski <https://github.com/krassowski>`.
476 541
477 542 - ``right`` accepts a single character from suggestion
478 543 - ``ctrl+right`` accepts a semantic token (macos default shortcuts take
479 544 precedence and need to be disabled to make this work)
480 545 - ``backspace`` deletes a character and resumes hinting autosuggestions
481 546 - ``ctrl-left`` accepts suggestion and moves cursor left one character.
482 547 - ``backspace`` deletes a character and resumes hinting autosuggestions
483 548 - ``down`` moves to suggestion to later in history when no lines are present below the cursors.
484 549 - ``up`` moves to suggestion from earlier in history when no lines are present above the cursor.
485 550
486 551 This is best described by the Gif posted by `@krassowski
487 552 <https://github.com/krassowski>`, and in the PR itself :ghpull:`13888`.
488 553
489 554 .. image:: ../_images/autosuggest.gif
490 555
491 556 Please report any feedback in order for us to improve the user experience.
492 557 In particular we are also working on making the shortcuts configurable.
493 558
494 559 If you are interested in better terminal shortcuts, I also invite you to
495 560 participate in issue `13879
496 561 <https://github.com/ipython/ipython/issues/13879>`__.
497 562
498 563
499 564 As we follow `NEP29
500 565 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`__, next version of
501 566 IPython will officially stop supporting numpy 1.20, and will stop supporting
502 567 Python 3.8 after April release.
503 568
504 569 As usual you can find the full list of PRs on GitHub under `the 8.9 milestone
505 570 <https://github.com/ipython/ipython/milestone/111?closed=1>`__.
506 571
507 572
508 573 Thanks to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
509 574 work on IPython and related libraries.
510 575
511 576 .. _version 8.8.0:
512 577
513 578 IPython 8.8.0
514 579 -------------
515 580
516 581 First release of IPython in 2023 as there was no release at the end of
517 582 December.
518 583
519 584 This is an unusually big release (relatively speaking) with more than 15 Pull
520 585 Requests merged.
521 586
522 587 Of particular interest are:
523 588
524 589 - :ghpull:`13852` that replaces the greedy completer and improves
525 590 completion, in particular for dictionary keys.
526 591 - :ghpull:`13858` that adds ``py.typed`` to ``setup.cfg`` to make sure it is
527 592 bundled in wheels.
528 593 - :ghpull:`13869` that implements tab completions for IPython options in the
529 594 shell when using `argcomplete <https://github.com/kislyuk/argcomplete>`. I
530 595 believe this also needs a recent version of Traitlets.
531 596 - :ghpull:`13865` makes the ``inspector`` class of `InteractiveShell`
532 597 configurable.
533 598 - :ghpull:`13880` that removes minor-version entrypoints as the minor version
534 599 entry points that would be included in the wheel would be the one of the
535 600 Python version that was used to build the ``whl`` file.
536 601
537 602 In no particular order, the rest of the changes update the test suite to be
538 603 compatible with Pygments 2.14, various docfixes, testing on more recent python
539 604 versions and various updates.
540 605
541 606 As usual you can find the full list of PRs on GitHub under `the 8.8 milestone
542 607 <https://github.com/ipython/ipython/milestone/110>`__.
543 608
544 609 Many thanks to @krassowski for the many PRs and @jasongrout for reviewing and
545 610 merging contributions.
546 611
547 612 Thanks to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
548 613 work on IPython and related libraries.
549 614
550 615 .. _version 8.7.0:
551 616
552 617 IPython 8.7.0
553 618 -------------
554 619
555 620
556 621 Small release of IPython with a couple of bug fixes and new features for this
557 622 month. Next month is the end of year, it is unclear if there will be a release
558 623 close to the new year's eve, or if the next release will be at the end of January.
559 624
560 625 Here are a few of the relevant fixes,
561 626 as usual you can find the full list of PRs on GitHub under `the 8.7 milestone
562 627 <https://github.com/ipython/ipython/pulls?q=milestone%3A8.7>`__.
563 628
564 629
565 630 - :ghpull:`13834` bump the minimum prompt toolkit to 3.0.11.
566 631 - IPython shipped with the ``py.typed`` marker now, and we are progressively
567 632 adding more types. :ghpull:`13831`
568 633 - :ghpull:`13817` add configuration of code blacks formatting.
569 634
570 635
571 636 Thanks to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
572 637 work on IPython and related libraries.
573 638
574 639
575 640 .. _version 8.6.0:
576 641
577 642 IPython 8.6.0
578 643 -------------
579 644
580 645 Back to a more regular release schedule (at least I try), as Friday is
581 646 already over by more than 24h hours. This is a slightly bigger release with a
582 647 few new features that contain no less than 25 PRs.
583 648
584 649 We'll notably found a couple of non negligible changes:
585 650
586 651 The ``install_ext`` and related functions have been removed after being
587 652 deprecated for years. You can use pip to install extensions. ``pip`` did not
588 653 exist when ``install_ext`` was introduced. You can still load local extensions
589 654 without installing them. Just set your ``sys.path`` for example. :ghpull:`13744`
590 655
591 656 IPython now has extra entry points that use the major *and minor* version of
592 657 python. For some of you this means that you can do a quick ``ipython3.10`` to
593 658 launch IPython from the Python 3.10 interpreter, while still using Python 3.11
594 659 as your main Python. :ghpull:`13743`
595 660
596 661 The completer matcher API has been improved. See :ghpull:`13745`. This should
597 662 improve the type inference and improve dict keys completions in many use case.
598 663 Thanks ``@krassowski`` for all the work, and the D.E. Shaw group for sponsoring
599 664 it.
600 665
601 666 The color of error nodes in tracebacks can now be customized. See
602 667 :ghpull:`13756`. This is a private attribute until someone finds the time to
603 668 properly add a configuration option. Note that with Python 3.11 that also shows
604 669 the relevant nodes in traceback, it would be good to leverage this information
605 670 (plus the "did you mean" info added on attribute errors). But that's likely work
606 671 I won't have time to do before long, so contributions welcome.
607 672
608 673 As we follow NEP 29, we removed support for numpy 1.19 :ghpull:`13760`.
609 674
610 675
611 676 The ``open()`` function present in the user namespace by default will now refuse
612 677 to open the file descriptors 0,1,2 (stdin, out, err), to avoid crashing IPython.
613 678 This mostly occurs in teaching context when incorrect values get passed around.
614 679
615 680
616 681 The ``?``, ``??``, and corresponding ``pinfo``, ``pinfo2`` magics can now find
617 682 objects inside arrays. That is to say, the following now works::
618 683
619 684
620 685 >>> def my_func(*arg, **kwargs):pass
621 686 >>> container = [my_func]
622 687 >>> container[0]?
623 688
624 689
625 690 If ``container`` define a custom ``getitem``, this __will__ trigger the custom
626 691 method. So don't put side effects in your ``getitems``. Thanks to the D.E. Shaw
627 692 group for the request and sponsoring the work.
628 693
629 694
630 695 As usual you can find the full list of PRs on GitHub under `the 8.6 milestone
631 696 <https://github.com/ipython/ipython/pulls?q=milestone%3A8.6>`__.
632 697
633 698 Thanks to all hacktoberfest contributors, please contribute to
634 699 `closember.org <https://closember.org/>`__.
635 700
636 701 Thanks to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
637 702 work on IPython and related libraries.
638 703
639 704 .. _version 8.5.0:
640 705
641 706 IPython 8.5.0
642 707 -------------
643 708
644 709 First release since a couple of month due to various reasons and timing preventing
645 710 me for sticking to the usual monthly release the last Friday of each month. This
646 711 is of non negligible size as it has more than two dozen PRs with various fixes
647 712 an bug fixes.
648 713
649 714 Many thanks to everybody who contributed PRs for your patience in review and
650 715 merges.
651 716
652 717 Here is a non-exhaustive list of changes that have been implemented for IPython
653 718 8.5.0. As usual you can find the full list of issues and PRs tagged with `the
654 719 8.5 milestone
655 720 <https://github.com/ipython/ipython/pulls?q=is%3Aclosed+milestone%3A8.5+>`__.
656 721
657 722 - Added a shortcut for accepting auto suggestion. The End key shortcut for
658 723 accepting auto-suggestion This binding works in Vi mode too, provided
659 724 ``TerminalInteractiveShell.emacs_bindings_in_vi_insert_mode`` is set to be
660 725 ``True`` :ghpull:`13566`.
661 726
662 727 - No popup in window for latex generation when generating latex (e.g. via
663 728 `_latex_repr_`) no popup window is shows under Windows. :ghpull:`13679`
664 729
665 730 - Fixed error raised when attempting to tab-complete an input string with
666 731 consecutive periods or forward slashes (such as "file:///var/log/...").
667 732 :ghpull:`13675`
668 733
669 734 - Relative filenames in Latex rendering :
670 735 The `latex_to_png_dvipng` command internally generates input and output file
671 736 arguments to `latex` and `dvipis`. These arguments are now generated as
672 737 relative files to the current working directory instead of absolute file
673 738 paths. This solves a problem where the current working directory contains
674 739 characters that are not handled properly by `latex` and `dvips`. There are
675 740 no changes to the user API. :ghpull:`13680`
676 741
677 742 - Stripping decorators bug: Fixed bug which meant that ipython code blocks in
678 743 restructured text documents executed with the ipython-sphinx extension
679 744 skipped any lines of code containing python decorators. :ghpull:`13612`
680 745
681 746 - Allow some modules with frozen dataclasses to be reloaded. :ghpull:`13732`
682 747 - Fix paste magic on wayland. :ghpull:`13671`
683 748 - show maxlen in deque's repr. :ghpull:`13648`
684 749
685 750 Restore line numbers for Input
686 751 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
687 752
688 753 Line number information in tracebacks from input are restored.
689 754 Line numbers from input were removed during the transition to v8 enhanced traceback reporting.
690 755
691 756 So, instead of::
692 757
693 758 ---------------------------------------------------------------------------
694 759 ZeroDivisionError Traceback (most recent call last)
695 760 Input In [3], in <cell line: 1>()
696 761 ----> 1 myfunc(2)
697 762
698 763 Input In [2], in myfunc(z)
699 764 1 def myfunc(z):
700 765 ----> 2 foo.boo(z-1)
701 766
702 767 File ~/code/python/ipython/foo.py:3, in boo(x)
703 768 2 def boo(x):
704 769 ----> 3 return 1/(1-x)
705 770
706 771 ZeroDivisionError: division by zero
707 772
708 773 The error traceback now looks like::
709 774
710 775 ---------------------------------------------------------------------------
711 776 ZeroDivisionError Traceback (most recent call last)
712 777 Cell In [3], line 1
713 778 ----> 1 myfunc(2)
714 779
715 780 Cell In [2], line 2, in myfunc(z)
716 781 1 def myfunc(z):
717 782 ----> 2 foo.boo(z-1)
718 783
719 784 File ~/code/python/ipython/foo.py:3, in boo(x)
720 785 2 def boo(x):
721 786 ----> 3 return 1/(1-x)
722 787
723 788 ZeroDivisionError: division by zero
724 789
725 790 or, with xmode=Plain::
726 791
727 792 Traceback (most recent call last):
728 793 Cell In [12], line 1
729 794 myfunc(2)
730 795 Cell In [6], line 2 in myfunc
731 796 foo.boo(z-1)
732 797 File ~/code/python/ipython/foo.py:3 in boo
733 798 return 1/(1-x)
734 799 ZeroDivisionError: division by zero
735 800
736 801 :ghpull:`13560`
737 802
738 803 New setting to silence warning if working inside a virtual environment
739 804 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
740 805
741 806 Previously, when starting IPython in a virtual environment without IPython installed (so IPython from the global environment is used), the following warning was printed:
742 807
743 808 Attempting to work in a virtualenv. If you encounter problems, please install IPython inside the virtualenv.
744 809
745 810 This warning can be permanently silenced by setting ``c.InteractiveShell.warn_venv`` to ``False`` (the default is ``True``).
746 811
747 812 :ghpull:`13706`
748 813
749 814 -------
750 815
751 816 Thanks to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
752 817 work on IPython and related libraries.
753 818
754 819
755 820 .. _version 8.4.0:
756 821
757 822 IPython 8.4.0
758 823 -------------
759 824
760 825 As for 7.34, this version contains a single fix: fix uncaught BdbQuit exceptions on ipdb
761 826 exit :ghpull:`13668`, and a single typo fix in documentation: :ghpull:`13682`
762 827
763 828 Thanks to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
764 829 work on IPython and related libraries.
765 830
766 831
767 832 .. _version 8.3.0:
768 833
769 834 IPython 8.3.0
770 835 -------------
771 836
772 837 - :ghpull:`13625`, using ``?``, ``??``, ``*?`` will not call
773 838 ``set_next_input`` as most frontend allow proper multiline editing and it was
774 839 causing issues for many users of multi-cell frontends. This has been backported to 7.33
775 840
776 841
777 842 - :ghpull:`13600`, ``pre_run_*``-hooks will now have a ``cell_id`` attribute on
778 843 the info object when frontend provides it. This has been backported to 7.33
779 844
780 845 - :ghpull:`13624`, fixed :kbd:`End` key being broken after accepting an
781 846 auto-suggestion.
782 847
783 848 - :ghpull:`13657` fixed an issue where history from different sessions would be mixed.
784 849
785 850 .. _version 8.2.0:
786 851
787 852 IPython 8.2.0
788 853 -------------
789 854
790 855 IPython 8.2 mostly bring bugfixes to IPython.
791 856
792 857 - Auto-suggestion can now be elected with the ``end`` key. :ghpull:`13566`
793 858 - Some traceback issues with ``assert etb is not None`` have been fixed. :ghpull:`13588`
794 859 - History is now pulled from the sqitel database and not from in-memory.
795 860 In particular when using the ``%paste`` magic, the content of the pasted text will
796 861 be part of the history and not the verbatim text ``%paste`` anymore. :ghpull:`13592`
797 862 - Fix ``Ctrl-\\`` exit cleanup :ghpull:`13603`
798 863 - Fixes to ``ultratb`` ipdb support when used outside of IPython. :ghpull:`13498`
799 864
800 865
801 866 I am still trying to fix and investigate :ghissue:`13598`, which seems to be
802 867 random, and would appreciate help if you find a reproducible minimal case. I've
803 868 tried to make various changes to the codebase to mitigate it, but a proper fix
804 869 will be difficult without understanding the cause.
805 870
806 871
807 872 All the issues on pull-requests for this release can be found in the `8.2
808 873 milestone. <https://github.com/ipython/ipython/milestone/100>`__ . And some
809 874 documentation only PR can be found as part of the `7.33 milestone
810 875 <https://github.com/ipython/ipython/milestone/101>`__ (currently not released).
811 876
812 877 Thanks to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
813 878 work on IPython and related libraries.
814 879
815 880 .. _version 8.1.1:
816 881
817 882 IPython 8.1.1
818 883 -------------
819 884
820 885 Fix an issue with virtualenv and Python 3.8 introduced in 8.1
821 886
822 887 Revert :ghpull:`13537` (fix an issue with symlinks in virtualenv) that raises an
823 888 error in Python 3.8, and fixed in a different way in :ghpull:`13559`.
824 889
825 890 .. _version 8.1:
826 891
827 892 IPython 8.1.0
828 893 -------------
829 894
830 895 IPython 8.1 is the first minor release after 8.0 and fixes a number of bugs and
831 896 updates a few behaviors that were problematic with the 8.0 as with many new major
832 897 release.
833 898
834 899 Note that beyond the changes listed here, IPython 8.1.0 also contains all the
835 900 features listed in :ref:`version 7.32`.
836 901
837 902 - Misc and multiple fixes around quotation auto-closing. It is now disabled by
838 903 default. Run with ``TerminalInteractiveShell.auto_match=True`` to re-enabled
839 904 - Require pygments>=2.4.0 :ghpull:`13459`, this was implicit in the code, but
840 905 is now explicit in ``setup.cfg``/``setup.py``
841 906 - Docs improvement of ``core.magic_arguments`` examples. :ghpull:`13433`
842 907 - Multi-line edit executes too early with await. :ghpull:`13424`
843 908
844 909 - ``black`` is back as an optional dependency, and autoformatting disabled by
845 910 default until some fixes are implemented (black improperly reformat magics).
846 911 :ghpull:`13471` Additionally the ability to use ``yapf`` as a code
847 912 reformatter has been added :ghpull:`13528` . You can use
848 913 ``TerminalInteractiveShell.autoformatter="black"``,
849 914 ``TerminalInteractiveShell.autoformatter="yapf"`` to re-enable auto formating
850 915 with black, or switch to yapf.
851 916
852 917 - Fix and issue where ``display`` was not defined.
853 918
854 919 - Auto suggestions are now configurable. Currently only
855 920 ``AutoSuggestFromHistory`` (default) and ``None``. new provider contribution
856 921 welcomed. :ghpull:`13475`
857 922
858 923 - multiple packaging/testing improvement to simplify downstream packaging
859 924 (xfail with reasons, try to not access network...).
860 925
861 926 - Update deprecation. ``InteractiveShell.magic`` internal method has been
862 927 deprecated for many years but did not emit a warning until now.
863 928
864 929 - internal ``appended_to_syspath`` context manager has been deprecated.
865 930
866 931 - fix an issue with symlinks in virtualenv :ghpull:`13537` (Reverted in 8.1.1)
867 932
868 933 - Fix an issue with vim mode, where cursor would not be reset on exit :ghpull:`13472`
869 934
870 935 - ipython directive now remove only known pseudo-decorators :ghpull:`13532`
871 936
872 937 - ``IPython/lib/security`` which used to be used for jupyter notebook has been
873 938 removed.
874 939
875 940 - Fix an issue where ``async with`` would execute on new lines. :ghpull:`13436`
876 941
877 942
878 943 We want to remind users that IPython is part of the Jupyter organisations, and
879 944 thus governed by a Code of Conduct. Some of the behavior we have seen on GitHub is not acceptable.
880 945 Abuse and non-respectful comments on discussion will not be tolerated.
881 946
882 947 Many thanks to all the contributors to this release, many of the above fixed issues and
883 948 new features were done by first time contributors, showing there is still
884 949 plenty of easy contribution possible in IPython
885 950 . You can find all individual contributions
886 951 to this milestone `on github <https://github.com/ipython/ipython/milestone/91>`__.
887 952
888 953 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
889 954 work on IPython and related libraries. In particular the Lazy autoloading of
890 955 magics that you will find described in the 7.32 release notes.
891 956
892 957
893 958 .. _version 8.0.1:
894 959
895 960 IPython 8.0.1 (CVE-2022-21699)
896 961 ------------------------------
897 962
898 963 IPython 8.0.1, 7.31.1 and 5.11 are security releases that change some default
899 964 values in order to prevent potential Execution with Unnecessary Privileges.
900 965
901 966 Almost all version of IPython looks for configuration and profiles in current
902 967 working directory. Since IPython was developed before pip and environments
903 968 existed it was used a convenient way to load code/packages in a project
904 969 dependant way.
905 970
906 971 In 2022, it is not necessary anymore, and can lead to confusing behavior where
907 972 for example cloning a repository and starting IPython or loading a notebook from
908 973 any Jupyter-Compatible interface that has ipython set as a kernel can lead to
909 974 code execution.
910 975
911 976
912 977 I did not find any standard way for packaged to advertise CVEs they fix, I'm
913 978 thus trying to add a ``__patched_cves__`` attribute to the IPython module that
914 979 list the CVEs that should have been fixed. This attribute is informational only
915 980 as if a executable has a flaw, this value can always be changed by an attacker.
916 981
917 982 .. code::
918 983
919 984 In [1]: import IPython
920 985
921 986 In [2]: IPython.__patched_cves__
922 987 Out[2]: {'CVE-2022-21699'}
923 988
924 989 In [3]: 'CVE-2022-21699' in IPython.__patched_cves__
925 990 Out[3]: True
926 991
927 992 Thus starting with this version:
928 993
929 994 - The current working directory is not searched anymore for profiles or
930 995 configurations files.
931 996 - Added a ``__patched_cves__`` attribute (set of strings) to IPython module that contain
932 997 the list of fixed CVE. This is informational only.
933 998
934 999 Further details can be read on the `GitHub Advisory <https://github.com/ipython/ipython/security/advisories/GHSA-pq7m-3gw7-gq5x>`__
935 1000
936 1001
937 1002 .. _version 8.0:
938 1003
939 1004 IPython 8.0
940 1005 -----------
941 1006
942 1007 IPython 8.0 is bringing a large number of new features and improvements to both the
943 1008 user of the terminal and of the kernel via Jupyter. The removal of compatibility
944 1009 with an older version of Python is also the opportunity to do a couple of
945 1010 performance improvements in particular with respect to startup time.
946 1011 The 8.x branch started diverging from its predecessor around IPython 7.12
947 1012 (January 2020).
948 1013
949 1014 This release contains 250+ pull requests, in addition to many of the features
950 1015 and backports that have made it to the 7.x branch. Please see the
951 1016 `8.0 milestone <https://github.com/ipython/ipython/milestone/73?closed=1>`__ for the full list of pull requests.
952 1017
953 1018 Please feel free to send pull requests to update those notes after release,
954 1019 I have likely forgotten a few things reviewing 250+ PRs.
955 1020
956 1021 Dependencies changes/downstream packaging
957 1022 -----------------------------------------
958 1023
959 1024 Most of our building steps have been changed to be (mostly) declarative
960 1025 and follow PEP 517. We are trying to completely remove ``setup.py`` (:ghpull:`13238`) and are
961 1026 looking for help to do so.
962 1027
963 1028 - minimum supported ``traitlets`` version is now 5+
964 1029 - we now require ``stack_data``
965 1030 - minimal Python is now 3.8
966 1031 - ``nose`` is not a testing requirement anymore
967 1032 - ``pytest`` replaces nose.
968 1033 - ``iptest``/``iptest3`` cli entrypoints do not exist anymore.
969 1034 - the minimum officially ​supported ``numpy`` version has been bumped, but this should
970 1035 not have much effect on packaging.
971 1036
972 1037
973 1038 Deprecation and removal
974 1039 -----------------------
975 1040
976 1041 We removed almost all features, arguments, functions, and modules that were
977 1042 marked as deprecated between IPython 1.0 and 5.0. As a reminder, 5.0 was released
978 1043 in 2016, and 1.0 in 2013. Last release of the 5 branch was 5.10.0, in May 2020.
979 1044 The few remaining deprecated features we left have better deprecation warnings
980 1045 or have been turned into explicit errors for better error messages.
981 1046
982 1047 I will use this occasion to add the following requests to anyone emitting a
983 1048 deprecation warning:
984 1049
985 1050 - Please add at least ``stacklevel=2`` so that the warning is emitted into the
986 1051 caller context, and not the callee one.
987 1052 - Please add **since which version** something is deprecated.
988 1053
989 1054 As a side note, it is much easier to conditionally compare version
990 1055 numbers rather than using ``try/except`` when functionality changes with a version.
991 1056
992 1057 I won't list all the removed features here, but modules like ``IPython.kernel``,
993 1058 which was just a shim module around ``ipykernel`` for the past 8 years, have been
994 1059 removed, and so many other similar things that pre-date the name **Jupyter**
995 1060 itself.
996 1061
997 1062 We no longer need to add ``IPython.extensions`` to the PYTHONPATH because that is being
998 1063 handled by ``load_extension``.
999 1064
1000 1065 We are also removing ``Cythonmagic``, ``sympyprinting`` and ``rmagic`` as they are now in
1001 1066 other packages and no longer need to be inside IPython.
1002 1067
1003 1068
1004 1069 Documentation
1005 1070 -------------
1006 1071
1007 1072 The majority of our docstrings have now been reformatted and automatically fixed by
1008 1073 the experimental `VΓ©lin <https://pypi.org/project/velin/>`_ project to conform
1009 1074 to numpydoc.
1010 1075
1011 1076 Type annotations
1012 1077 ----------------
1013 1078
1014 1079 While IPython itself is highly dynamic and can't be completely typed, many of
1015 1080 the functions now have type annotations, and part of the codebase is now checked
1016 1081 by mypy.
1017 1082
1018 1083
1019 1084 Featured changes
1020 1085 ----------------
1021 1086
1022 1087 Here is a features list of changes in IPython 8.0. This is of course non-exhaustive.
1023 1088 Please note as well that many features have been added in the 7.x branch as well
1024 1089 (and hence why you want to read the 7.x what's new notes), in particular
1025 1090 features contributed by QuantStack (with respect to debugger protocol and Xeus
1026 1091 Python), as well as many debugger features that I was pleased to implement as
1027 1092 part of my work at QuanSight and sponsored by DE Shaw.
1028 1093
1029 1094 Traceback improvements
1030 1095 ~~~~~~~~~~~~~~~~~~~~~~
1031 1096
1032 1097 Previously, error tracebacks for errors happening in code cells were showing a
1033 1098 hash, the one used for compiling the Python AST::
1034 1099
1035 1100 In [1]: def foo():
1036 1101 ...: return 3 / 0
1037 1102 ...:
1038 1103
1039 1104 In [2]: foo()
1040 1105 ---------------------------------------------------------------------------
1041 1106 ZeroDivisionError Traceback (most recent call last)
1042 1107 <ipython-input-2-c19b6d9633cf> in <module>
1043 1108 ----> 1 foo()
1044 1109
1045 1110 <ipython-input-1-1595a74c32d5> in foo()
1046 1111 1 def foo():
1047 1112 ----> 2 return 3 / 0
1048 1113 3
1049 1114
1050 1115 ZeroDivisionError: division by zero
1051 1116
1052 1117 The error traceback is now correctly formatted, showing the cell number in which the error happened::
1053 1118
1054 1119 In [1]: def foo():
1055 1120 ...: return 3 / 0
1056 1121 ...:
1057 1122
1058 1123 Input In [2]: foo()
1059 1124 ---------------------------------------------------------------------------
1060 1125 ZeroDivisionError Traceback (most recent call last)
1061 1126 input In [2], in <module>
1062 1127 ----> 1 foo()
1063 1128
1064 1129 Input In [1], in foo()
1065 1130 1 def foo():
1066 1131 ----> 2 return 3 / 0
1067 1132
1068 1133 ZeroDivisionError: division by zero
1069 1134
1070 1135 The ``stack_data`` package has been integrated, which provides smarter information in the traceback;
1071 1136 in particular it will highlight the AST node where an error occurs which can help to quickly narrow down errors.
1072 1137
1073 1138 For example in the following snippet::
1074 1139
1075 1140 def foo(i):
1076 1141 x = [[[0]]]
1077 1142 return x[0][i][0]
1078 1143
1079 1144
1080 1145 def bar():
1081 1146 return foo(0) + foo(
1082 1147 1
1083 1148 ) + foo(2)
1084 1149
1085 1150
1086 1151 calling ``bar()`` would raise an ``IndexError`` on the return line of ``foo``,
1087 1152 and IPython 8.0 is capable of telling you where the index error occurs::
1088 1153
1089 1154
1090 1155 IndexError
1091 1156 Input In [2], in <module>
1092 1157 ----> 1 bar()
1093 1158 ^^^^^
1094 1159
1095 1160 Input In [1], in bar()
1096 1161 6 def bar():
1097 1162 ----> 7 return foo(0) + foo(
1098 1163 ^^^^
1099 1164 8 1
1100 1165 ^^^^^^^^
1101 1166 9 ) + foo(2)
1102 1167 ^^^^
1103 1168
1104 1169 Input In [1], in foo(i)
1105 1170 1 def foo(i):
1106 1171 2 x = [[[0]]]
1107 1172 ----> 3 return x[0][i][0]
1108 1173 ^^^^^^^
1109 1174
1110 1175 The corresponding locations marked here with ``^`` will show up highlighted in
1111 1176 the terminal and notebooks.
1112 1177
1113 1178 Finally, a colon ``::`` and line number is appended after a filename in
1114 1179 traceback::
1115 1180
1116 1181
1117 1182 ZeroDivisionError Traceback (most recent call last)
1118 1183 File ~/error.py:4, in <module>
1119 1184 1 def f():
1120 1185 2 1/0
1121 1186 ----> 4 f()
1122 1187
1123 1188 File ~/error.py:2, in f()
1124 1189 1 def f():
1125 1190 ----> 2 1/0
1126 1191
1127 1192 Many terminals and editors have integrations enabling you to directly jump to the
1128 1193 relevant file/line when this syntax is used, so this small addition may have a high
1129 1194 impact on productivity.
1130 1195
1131 1196
1132 1197 Autosuggestions
1133 1198 ~~~~~~~~~~~~~~~
1134 1199
1135 1200 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>`__.
1136 1201
1137 1202 `Ptpython <https://github.com/prompt-toolkit/ptpython#ptpython>`__ allows users to enable this feature in
1138 1203 `ptpython/config.py <https://github.com/prompt-toolkit/ptpython/blob/master/examples/ptpython_config/config.py#L90>`__.
1139 1204
1140 1205 This feature allows users to accept autosuggestions with ctrl e, ctrl f,
1141 1206 or right arrow as described below.
1142 1207
1143 1208 1. Start ipython
1144 1209
1145 1210 .. image:: ../_images/8.0/auto_suggest_1_prompt_no_text.png
1146 1211
1147 1212 2. Run ``print("hello")``
1148 1213
1149 1214 .. image:: ../_images/8.0/auto_suggest_2_print_hello_suggest.png
1150 1215
1151 1216 3. start typing ``print`` again to see the autosuggestion
1152 1217
1153 1218 .. image:: ../_images/8.0/auto_suggest_3_print_hello_suggest.png
1154 1219
1155 1220 4. Press ``ctrl-f``, or ``ctrl-e``, or ``right-arrow`` to accept the suggestion
1156 1221
1157 1222 .. image:: ../_images/8.0/auto_suggest_4_print_hello.png
1158 1223
1159 1224 You can also complete word by word:
1160 1225
1161 1226 1. Run ``def say_hello(): print("hello")``
1162 1227
1163 1228 .. image:: ../_images/8.0/auto_suggest_second_prompt.png
1164 1229
1165 1230 2. Start typing the first letter if ``def`` to see the autosuggestion
1166 1231
1167 1232 .. image:: ../_images/8.0/auto_suggest_d_phantom.png
1168 1233
1169 1234 3. Press ``alt-f`` (or ``escape`` followed by ``f``), to accept the first word of the suggestion
1170 1235
1171 1236 .. image:: ../_images/8.0/auto_suggest_def_phantom.png
1172 1237
1173 1238 Importantly, this feature does not interfere with tab completion:
1174 1239
1175 1240 1. After running ``def say_hello(): print("hello")``, press d
1176 1241
1177 1242 .. image:: ../_images/8.0/auto_suggest_d_phantom.png
1178 1243
1179 1244 2. Press Tab to start tab completion
1180 1245
1181 1246 .. image:: ../_images/8.0/auto_suggest_d_completions.png
1182 1247
1183 1248 3A. Press Tab again to select the first option
1184 1249
1185 1250 .. image:: ../_images/8.0/auto_suggest_def_completions.png
1186 1251
1187 1252 3B. Press ``alt f`` (``escape``, ``f``) to accept to accept the first word of the suggestion
1188 1253
1189 1254 .. image:: ../_images/8.0/auto_suggest_def_phantom.png
1190 1255
1191 1256 3C. Press ``ctrl-f`` or ``ctrl-e`` to accept the entire suggestion
1192 1257
1193 1258 .. image:: ../_images/8.0/auto_suggest_match_parens.png
1194 1259
1195 1260
1196 1261 Currently, autosuggestions are only shown in the emacs or vi insert editing modes:
1197 1262
1198 1263 - The ctrl e, ctrl f, and alt f shortcuts work by default in emacs mode.
1199 1264 - 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/>`__.
1200 1265
1201 1266
1202 1267 Show pinfo information in ipdb using "?" and "??"
1203 1268 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1204 1269
1205 1270 In IPDB, it is now possible to show the information about an object using "?"
1206 1271 and "??", in much the same way that it can be done when using the IPython prompt::
1207 1272
1208 1273 ipdb> partial?
1209 1274 Init signature: partial(self, /, *args, **kwargs)
1210 1275 Docstring:
1211 1276 partial(func, *args, **keywords) - new function with partial application
1212 1277 of the given arguments and keywords.
1213 1278 File: ~/.pyenv/versions/3.8.6/lib/python3.8/functools.py
1214 1279 Type: type
1215 1280 Subclasses:
1216 1281
1217 1282 Previously, ``pinfo`` or ``pinfo2`` command had to be used for this purpose.
1218 1283
1219 1284
1220 1285 Autoreload 3 feature
1221 1286 ~~~~~~~~~~~~~~~~~~~~
1222 1287
1223 1288 Example: When an IPython session is run with the 'autoreload' extension loaded,
1224 1289 you will now have the option '3' to select, which means the following:
1225 1290
1226 1291 1. replicate all functionality from option 2
1227 1292 2. autoload all new funcs/classes/enums/globals from the module when they are added
1228 1293 3. autoload all newly imported funcs/classes/enums/globals from external modules
1229 1294
1230 1295 Try ``%autoreload 3`` in an IPython session after running ``%load_ext autoreload``.
1231 1296
1232 1297 For more information please see the following unit test : ``extensions/tests/test_autoreload.py:test_autoload_newly_added_objects``
1233 1298
1234 1299 Auto formatting with black in the CLI
1235 1300 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1236 1301
1237 1302 This feature was present in 7.x, but disabled by default.
1238 1303
1239 1304 In 8.0, input was automatically reformatted with Black when black was installed.
1240 1305 This feature has been reverted for the time being.
1241 1306 You can re-enable it by setting ``TerminalInteractiveShell.autoformatter`` to ``"black"``
1242 1307
1243 1308 History Range Glob feature
1244 1309 ~~~~~~~~~~~~~~~~~~~~~~~~~~
1245 1310
1246 1311 Previously, when using ``%history``, users could specify either
1247 1312 a range of sessions and lines, for example:
1248 1313
1249 1314 .. code-block:: python
1250 1315
1251 1316 ~8/1-~6/5 # see history from the first line of 8 sessions ago,
1252 1317 # to the fifth line of 6 sessions ago.``
1253 1318
1254 1319 Or users could specify a glob pattern:
1255 1320
1256 1321 .. code-block:: python
1257 1322
1258 1323 -g <pattern> # glob ALL history for the specified pattern.
1259 1324
1260 1325 However users could *not* specify both.
1261 1326
1262 1327 If a user *did* specify both a range and a glob pattern,
1263 1328 then the glob pattern would be used (globbing *all* history) *and the range would be ignored*.
1264 1329
1265 1330 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.
1266 1331
1267 1332 Don't start a multi-line cell with sunken parenthesis
1268 1333 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1269 1334
1270 1335 From now on, IPython will not ask for the next line of input when given a single
1271 1336 line with more closing than opening brackets. For example, this means that if
1272 1337 you (mis)type ``]]`` instead of ``[]``, a ``SyntaxError`` will show up, instead of
1273 1338 the ``...:`` prompt continuation.
1274 1339
1275 1340 IPython shell for ipdb interact
1276 1341 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1277 1342
1278 1343 The ipdb ``interact`` starts an IPython shell instead of Python's built-in ``code.interact()``.
1279 1344
1280 1345 Automatic Vi prompt stripping
1281 1346 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1282 1347
1283 1348 When pasting code into IPython, it will strip the leading prompt characters if
1284 1349 there are any. For example, you can paste the following code into the console -
1285 1350 it will still work, even though each line is prefixed with prompts (``In``,
1286 1351 ``Out``)::
1287 1352
1288 1353 In [1]: 2 * 2 == 4
1289 1354 Out[1]: True
1290 1355
1291 1356 In [2]: print("This still works as pasted")
1292 1357
1293 1358
1294 1359 Previously, this was not the case for the Vi-mode prompts::
1295 1360
1296 1361 In [1]: [ins] In [13]: 2 * 2 == 4
1297 1362 ...: Out[13]: True
1298 1363 ...:
1299 1364 File "<ipython-input-1-727bb88eaf33>", line 1
1300 1365 [ins] In [13]: 2 * 2 == 4
1301 1366 ^
1302 1367 SyntaxError: invalid syntax
1303 1368
1304 1369 This is now fixed, and Vi prompt prefixes - ``[ins]`` and ``[nav]`` - are
1305 1370 skipped just as the normal ``In`` would be.
1306 1371
1307 1372 IPython shell can be started in the Vi mode using ``ipython --TerminalInteractiveShell.editing_mode=vi``,
1308 1373 You should be able to change mode dynamically with ``%config TerminalInteractiveShell.editing_mode='vi'``
1309 1374
1310 1375 Empty History Ranges
1311 1376 ~~~~~~~~~~~~~~~~~~~~
1312 1377
1313 1378 A number of magics that take history ranges can now be used with an empty
1314 1379 range. These magics are:
1315 1380
1316 1381 * ``%save``
1317 1382 * ``%load``
1318 1383 * ``%pastebin``
1319 1384 * ``%pycat``
1320 1385
1321 1386 Using them this way will make them take the history of the current session up
1322 1387 to the point of the magic call (such that the magic itself will not be
1323 1388 included).
1324 1389
1325 1390 Therefore it is now possible to save the whole history to a file using
1326 1391 ``%save <filename>``, load and edit it using ``%load`` (makes for a nice usage
1327 1392 when followed with :kbd:`F2`), send it to `dpaste.org <http://dpast.org>`_ using
1328 1393 ``%pastebin``, or view the whole thing syntax-highlighted with a single
1329 1394 ``%pycat``.
1330 1395
1331 1396
1332 1397 Windows timing implementation: Switch to process_time
1333 1398 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1334 1399 Timing on Windows, for example with ``%%time``, was changed from being based on ``time.perf_counter``
1335 1400 (which counted time even when the process was sleeping) to being based on ``time.process_time`` instead
1336 1401 (which only counts CPU time). This brings it closer to the behavior on Linux. See :ghpull:`12984`.
1337 1402
1338 1403 Miscellaneous
1339 1404 ~~~~~~~~~~~~~
1340 1405 - Non-text formatters are not disabled in the terminal, which should simplify
1341 1406 writing extensions displaying images or other mimetypes in supporting terminals.
1342 1407 :ghpull:`12315`
1343 1408 - It is now possible to automatically insert matching brackets in Terminal IPython using the
1344 1409 ``TerminalInteractiveShell.auto_match=True`` option. :ghpull:`12586`
1345 1410 - We are thinking of deprecating the current ``%%javascript`` magic in favor of a better replacement. See :ghpull:`13376`.
1346 1411 - ``~`` is now expanded when part of a path in most magics :ghpull:`13385`
1347 1412 - ``%/%%timeit`` magic now adds a comma every thousands to make reading a long number easier :ghpull:`13379`
1348 1413 - ``"info"`` messages can now be customised to hide some fields :ghpull:`13343`
1349 1414 - ``collections.UserList`` now pretty-prints :ghpull:`13320`
1350 1415 - The debugger now has a persistent history, which should make it less
1351 1416 annoying to retype commands :ghpull:`13246`
1352 1417 - ``!pip`` ``!conda`` ``!cd`` or ``!ls`` are likely doing the wrong thing. We
1353 1418 now warn users if they use one of those commands. :ghpull:`12954`
1354 1419 - Make ``%precision`` work for ``numpy.float64`` type :ghpull:`12902`
1355 1420
1356 1421 Re-added support for XDG config directories
1357 1422 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1358 1423
1359 1424 XDG support through the years comes and goes. There is a tension between having
1360 1425 an identical location for configuration in all platforms versus having simple instructions.
1361 1426 After initial failures a couple of years ago, IPython was modified to automatically migrate XDG
1362 1427 config files back into ``~/.ipython``. That migration code has now been removed.
1363 1428 IPython now checks the XDG locations, so if you _manually_ move your config
1364 1429 files to your preferred location, IPython will not move them back.
1365 1430
1366 1431
1367 1432 Preparing for Python 3.10
1368 1433 -------------------------
1369 1434
1370 1435 To prepare for Python 3.10, we have started working on removing reliance and
1371 1436 any dependency that is not compatible with Python 3.10. This includes migrating our
1372 1437 test suite to pytest and starting to remove nose. This also means that the
1373 1438 ``iptest`` command is now gone and all testing is via pytest.
1374 1439
1375 1440 This was in large part thanks to the NumFOCUS Small Developer grant, which enabled us to
1376 1441 allocate \$4000 to hire `Nikita Kniazev (@Kojoley) <https://github.com/Kojoley>`_,
1377 1442 who did a fantastic job at updating our code base, migrating to pytest, pushing
1378 1443 our coverage, and fixing a large number of bugs. I highly recommend contacting
1379 1444 them if you need help with C++ and Python projects.
1380 1445
1381 1446 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+>`__
1382 1447
1383 1448 Removing support for older Python versions
1384 1449 ------------------------------------------
1385 1450
1386 1451
1387 1452 We are removing support for Python up through 3.7, allowing internal code to use the more
1388 1453 efficient ``pathlib`` and to make better use of type annotations.
1389 1454
1390 1455 .. image:: ../_images/8.0/pathlib_pathlib_everywhere.jpg
1391 1456 :alt: "Meme image of Toy Story with Woody and Buzz, with the text 'pathlib, pathlib everywhere'"
1392 1457
1393 1458
1394 1459 We had about 34 PRs only to update some logic to update some functions from managing strings to
1395 1460 using Pathlib.
1396 1461
1397 1462 The completer has also seen significant updates and now makes use of newer Jedi APIs,
1398 1463 offering faster and more reliable tab completion.
1399 1464
1400 1465 Misc Statistics
1401 1466 ---------------
1402 1467
1403 1468 Here are some numbers::
1404 1469
1405 1470 7.x: 296 files, 12561 blank lines, 20282 comments, 35142 line of code.
1406 1471 8.0: 252 files, 12053 blank lines, 19232 comments, 34505 line of code.
1407 1472
1408 1473 $ git diff --stat 7.x...master | tail -1
1409 1474 340 files changed, 13399 insertions(+), 12421 deletions(-)
1410 1475
1411 1476 We have commits from 162 authors, who contributed 1916 commits in 23 month, excluding merges (to not bias toward
1412 1477 maintainers pushing buttons).::
1413 1478
1414 1479 $ git shortlog -s --no-merges 7.x...master | sort -nr
1415 1480 535 Matthias Bussonnier
1416 1481 86 Nikita Kniazev
1417 1482 69 Blazej Michalik
1418 1483 49 Samuel Gaist
1419 1484 27 Itamar Turner-Trauring
1420 1485 18 Spas Kalaydzhisyki
1421 1486 17 Thomas Kluyver
1422 1487 17 Quentin Peter
1423 1488 17 James Morris
1424 1489 17 Artur Svistunov
1425 1490 15 Bart Skowron
1426 1491 14 Alex Hall
1427 1492 13 rushabh-v
1428 1493 13 Terry Davis
1429 1494 13 Benjamin Ragan-Kelley
1430 1495 8 martinRenou
1431 1496 8 farisachugthai
1432 1497 7 dswij
1433 1498 7 Gal B
1434 1499 7 Corentin Cadiou
1435 1500 6 yuji96
1436 1501 6 Martin Skarzynski
1437 1502 6 Justin Palmer
1438 1503 6 Daniel Goldfarb
1439 1504 6 Ben Greiner
1440 1505 5 Sammy Al Hashemi
1441 1506 5 Paul Ivanov
1442 1507 5 Inception95
1443 1508 5 Eyenpi
1444 1509 5 Douglas Blank
1445 1510 5 Coco Mishra
1446 1511 5 Bibo Hao
1447 1512 5 AndrΓ© A. Gomes
1448 1513 5 Ahmed Fasih
1449 1514 4 takuya fujiwara
1450 1515 4 palewire
1451 1516 4 Thomas A Caswell
1452 1517 4 Talley Lambert
1453 1518 4 Scott Sanderson
1454 1519 4 Ram Rachum
1455 1520 4 Nick Muoh
1456 1521 4 Nathan Goldbaum
1457 1522 4 Mithil Poojary
1458 1523 4 Michael T
1459 1524 4 Jakub Klus
1460 1525 4 Ian Castleden
1461 1526 4 Eli Rykoff
1462 1527 4 Ashwin Vishnu
1463 1528 3 谭九鼎
1464 1529 3 sleeping
1465 1530 3 Sylvain Corlay
1466 1531 3 Peter Corke
1467 1532 3 Paul Bissex
1468 1533 3 Matthew Feickert
1469 1534 3 Fernando Perez
1470 1535 3 Eric Wieser
1471 1536 3 Daniel Mietchen
1472 1537 3 Aditya Sathe
1473 1538 3 007vedant
1474 1539 2 rchiodo
1475 1540 2 nicolaslazo
1476 1541 2 luttik
1477 1542 2 gorogoroumaru
1478 1543 2 foobarbyte
1479 1544 2 bar-hen
1480 1545 2 Theo Ouzhinski
1481 1546 2 Strawkage
1482 1547 2 Samreen Zarroug
1483 1548 2 Pete Blois
1484 1549 2 Meysam Azad
1485 1550 2 Matthieu Ancellin
1486 1551 2 Mark Schmitz
1487 1552 2 Maor Kleinberger
1488 1553 2 MRCWirtz
1489 1554 2 Lumir Balhar
1490 1555 2 Julien Rabinow
1491 1556 2 Juan Luis Cano RodrΓ­guez
1492 1557 2 Joyce Er
1493 1558 2 Jakub
1494 1559 2 Faris A Chugthai
1495 1560 2 Ethan Madden
1496 1561 2 Dimitri Papadopoulos
1497 1562 2 Diego Fernandez
1498 1563 2 Daniel Shimon
1499 1564 2 Coco Bennett
1500 1565 2 Carlos Cordoba
1501 1566 2 Boyuan Liu
1502 1567 2 BaoGiang HoangVu
1503 1568 2 Augusto
1504 1569 2 Arthur Svistunov
1505 1570 2 Arthur Moreira
1506 1571 2 Ali Nabipour
1507 1572 2 Adam Hackbarth
1508 1573 1 richard
1509 1574 1 linar-jether
1510 1575 1 lbennett
1511 1576 1 juacrumar
1512 1577 1 gpotter2
1513 1578 1 digitalvirtuoso
1514 1579 1 dalthviz
1515 1580 1 Yonatan Goldschmidt
1516 1581 1 Tomasz KΕ‚oczko
1517 1582 1 Tobias Bengfort
1518 1583 1 Timur Kushukov
1519 1584 1 Thomas
1520 1585 1 Snir Broshi
1521 1586 1 Shao Yang Hong
1522 1587 1 Sanjana-03
1523 1588 1 Romulo Filho
1524 1589 1 Rodolfo Carvalho
1525 1590 1 Richard Shadrach
1526 1591 1 Reilly Tucker Siemens
1527 1592 1 Rakessh Roshan
1528 1593 1 Piers Titus van der Torren
1529 1594 1 PhanatosZou
1530 1595 1 Pavel Safronov
1531 1596 1 Paulo S. Costa
1532 1597 1 Paul McCarthy
1533 1598 1 NotWearingPants
1534 1599 1 Naelson Douglas
1535 1600 1 Michael Tiemann
1536 1601 1 Matt Wozniski
1537 1602 1 Markus Wageringel
1538 1603 1 Marcus Wirtz
1539 1604 1 Marcio Mazza
1540 1605 1 LumΓ­r 'Frenzy' Balhar
1541 1606 1 Lightyagami1
1542 1607 1 Leon Anavi
1543 1608 1 LeafyLi
1544 1609 1 L0uisJ0shua
1545 1610 1 Kyle Cutler
1546 1611 1 Krzysztof Cybulski
1547 1612 1 Kevin Kirsche
1548 1613 1 KIU Shueng Chuan
1549 1614 1 Jonathan Slenders
1550 1615 1 Jay Qi
1551 1616 1 Jake VanderPlas
1552 1617 1 Iwan Briquemont
1553 1618 1 Hussaina Begum Nandyala
1554 1619 1 Gordon Ball
1555 1620 1 Gabriel Simonetto
1556 1621 1 Frank Tobia
1557 1622 1 Erik
1558 1623 1 Elliott Sales de Andrade
1559 1624 1 Daniel Hahler
1560 1625 1 Dan Green-Leipciger
1561 1626 1 Dan Green
1562 1627 1 Damian Yurzola
1563 1628 1 Coon, Ethan T
1564 1629 1 Carol Willing
1565 1630 1 Brian Lee
1566 1631 1 Brendan Gerrity
1567 1632 1 Blake Griffin
1568 1633 1 Bastian Ebeling
1569 1634 1 Bartosz Telenczuk
1570 1635 1 Ankitsingh6299
1571 1636 1 Andrew Port
1572 1637 1 Andrew J. Hesford
1573 1638 1 Albert Zhang
1574 1639 1 Adam Johnson
1575 1640
1576 1641 This does not, of course, represent non-code contributions, for which we are also grateful.
1577 1642
1578 1643
1579 1644 API Changes using Frappuccino
1580 1645 -----------------------------
1581 1646
1582 1647 This is an experimental exhaustive API difference using `Frappuccino <https://pypi.org/project/frappuccino/>`_
1583 1648
1584 1649
1585 1650 The following items are new in IPython 8.0 ::
1586 1651
1587 1652 + IPython.core.async_helpers.get_asyncio_loop()
1588 1653 + IPython.core.completer.Dict
1589 1654 + IPython.core.completer.Pattern
1590 1655 + IPython.core.completer.Sequence
1591 1656 + IPython.core.completer.__skip_doctest__
1592 1657 + IPython.core.debugger.Pdb.precmd(self, line)
1593 1658 + IPython.core.debugger.__skip_doctest__
1594 1659 + IPython.core.display.__getattr__(name)
1595 1660 + IPython.core.display.warn
1596 1661 + IPython.core.display_functions
1597 1662 + IPython.core.display_functions.DisplayHandle
1598 1663 + IPython.core.display_functions.DisplayHandle.display(self, obj, **kwargs)
1599 1664 + IPython.core.display_functions.DisplayHandle.update(self, obj, **kwargs)
1600 1665 + IPython.core.display_functions.__all__
1601 1666 + IPython.core.display_functions.__builtins__
1602 1667 + IPython.core.display_functions.__cached__
1603 1668 + IPython.core.display_functions.__doc__
1604 1669 + IPython.core.display_functions.__file__
1605 1670 + IPython.core.display_functions.__loader__
1606 1671 + IPython.core.display_functions.__name__
1607 1672 + IPython.core.display_functions.__package__
1608 1673 + IPython.core.display_functions.__spec__
1609 1674 + IPython.core.display_functions.b2a_hex
1610 1675 + IPython.core.display_functions.clear_output(wait=False)
1611 1676 + IPython.core.display_functions.display(*objs, include='None', exclude='None', metadata='None', transient='None', display_id='None', raw=False, clear=False, **kwargs)
1612 1677 + IPython.core.display_functions.publish_display_data(data, metadata='None', source='<deprecated>', *, transient='None', **kwargs)
1613 1678 + IPython.core.display_functions.update_display(obj, *, display_id, **kwargs)
1614 1679 + IPython.core.extensions.BUILTINS_EXTS
1615 1680 + IPython.core.inputtransformer2.has_sunken_brackets(tokens)
1616 1681 + IPython.core.interactiveshell.Callable
1617 1682 + IPython.core.interactiveshell.__annotations__
1618 1683 + IPython.core.ultratb.List
1619 1684 + IPython.core.ultratb.Tuple
1620 1685 + IPython.lib.pretty.CallExpression
1621 1686 + IPython.lib.pretty.CallExpression.factory(name)
1622 1687 + IPython.lib.pretty.RawStringLiteral
1623 1688 + IPython.lib.pretty.RawText
1624 1689 + IPython.terminal.debugger.TerminalPdb.do_interact(self, arg)
1625 1690 + IPython.terminal.embed.Set
1626 1691
1627 1692 The following items have been removed (or moved to superclass)::
1628 1693
1629 1694 - IPython.core.application.BaseIPythonApplication.initialize_subcommand
1630 1695 - IPython.core.completer.Sentinel
1631 1696 - IPython.core.completer.skip_doctest
1632 1697 - IPython.core.debugger.Tracer
1633 1698 - IPython.core.display.DisplayHandle
1634 1699 - IPython.core.display.DisplayHandle.display
1635 1700 - IPython.core.display.DisplayHandle.update
1636 1701 - IPython.core.display.b2a_hex
1637 1702 - IPython.core.display.clear_output
1638 1703 - IPython.core.display.display
1639 1704 - IPython.core.display.publish_display_data
1640 1705 - IPython.core.display.update_display
1641 1706 - IPython.core.excolors.Deprec
1642 1707 - IPython.core.excolors.ExceptionColors
1643 1708 - IPython.core.history.warn
1644 1709 - IPython.core.hooks.late_startup_hook
1645 1710 - IPython.core.hooks.pre_run_code_hook
1646 1711 - IPython.core.hooks.shutdown_hook
1647 1712 - IPython.core.interactiveshell.InteractiveShell.init_deprecation_warnings
1648 1713 - IPython.core.interactiveshell.InteractiveShell.init_readline
1649 1714 - IPython.core.interactiveshell.InteractiveShell.write
1650 1715 - IPython.core.interactiveshell.InteractiveShell.write_err
1651 1716 - IPython.core.interactiveshell.get_default_colors
1652 1717 - IPython.core.interactiveshell.removed_co_newlocals
1653 1718 - IPython.core.magics.execution.ExecutionMagics.profile_missing_notice
1654 1719 - IPython.core.magics.script.PIPE
1655 1720 - IPython.core.prefilter.PrefilterManager.init_transformers
1656 1721 - IPython.core.release.classifiers
1657 1722 - IPython.core.release.description
1658 1723 - IPython.core.release.keywords
1659 1724 - IPython.core.release.long_description
1660 1725 - IPython.core.release.name
1661 1726 - IPython.core.release.platforms
1662 1727 - IPython.core.release.url
1663 1728 - IPython.core.ultratb.VerboseTB.format_records
1664 1729 - IPython.core.ultratb.find_recursion
1665 1730 - IPython.core.ultratb.findsource
1666 1731 - IPython.core.ultratb.fix_frame_records_filenames
1667 1732 - IPython.core.ultratb.inspect_error
1668 1733 - IPython.core.ultratb.is_recursion_error
1669 1734 - IPython.core.ultratb.with_patch_inspect
1670 1735 - IPython.external.__all__
1671 1736 - IPython.external.__builtins__
1672 1737 - IPython.external.__cached__
1673 1738 - IPython.external.__doc__
1674 1739 - IPython.external.__file__
1675 1740 - IPython.external.__loader__
1676 1741 - IPython.external.__name__
1677 1742 - IPython.external.__package__
1678 1743 - IPython.external.__path__
1679 1744 - IPython.external.__spec__
1680 1745 - IPython.kernel.KernelConnectionInfo
1681 1746 - IPython.kernel.__builtins__
1682 1747 - IPython.kernel.__cached__
1683 1748 - IPython.kernel.__warningregistry__
1684 1749 - IPython.kernel.pkg
1685 1750 - IPython.kernel.protocol_version
1686 1751 - IPython.kernel.protocol_version_info
1687 1752 - IPython.kernel.src
1688 1753 - IPython.kernel.version_info
1689 1754 - IPython.kernel.warn
1690 1755 - IPython.lib.backgroundjobs
1691 1756 - IPython.lib.backgroundjobs.BackgroundJobBase
1692 1757 - IPython.lib.backgroundjobs.BackgroundJobBase.run
1693 1758 - IPython.lib.backgroundjobs.BackgroundJobBase.traceback
1694 1759 - IPython.lib.backgroundjobs.BackgroundJobExpr
1695 1760 - IPython.lib.backgroundjobs.BackgroundJobExpr.call
1696 1761 - IPython.lib.backgroundjobs.BackgroundJobFunc
1697 1762 - IPython.lib.backgroundjobs.BackgroundJobFunc.call
1698 1763 - IPython.lib.backgroundjobs.BackgroundJobManager
1699 1764 - IPython.lib.backgroundjobs.BackgroundJobManager.flush
1700 1765 - IPython.lib.backgroundjobs.BackgroundJobManager.new
1701 1766 - IPython.lib.backgroundjobs.BackgroundJobManager.remove
1702 1767 - IPython.lib.backgroundjobs.BackgroundJobManager.result
1703 1768 - IPython.lib.backgroundjobs.BackgroundJobManager.status
1704 1769 - IPython.lib.backgroundjobs.BackgroundJobManager.traceback
1705 1770 - IPython.lib.backgroundjobs.__builtins__
1706 1771 - IPython.lib.backgroundjobs.__cached__
1707 1772 - IPython.lib.backgroundjobs.__doc__
1708 1773 - IPython.lib.backgroundjobs.__file__
1709 1774 - IPython.lib.backgroundjobs.__loader__
1710 1775 - IPython.lib.backgroundjobs.__name__
1711 1776 - IPython.lib.backgroundjobs.__package__
1712 1777 - IPython.lib.backgroundjobs.__spec__
1713 1778 - IPython.lib.kernel.__builtins__
1714 1779 - IPython.lib.kernel.__cached__
1715 1780 - IPython.lib.kernel.__doc__
1716 1781 - IPython.lib.kernel.__file__
1717 1782 - IPython.lib.kernel.__loader__
1718 1783 - IPython.lib.kernel.__name__
1719 1784 - IPython.lib.kernel.__package__
1720 1785 - IPython.lib.kernel.__spec__
1721 1786 - IPython.lib.kernel.__warningregistry__
1722 1787 - IPython.paths.fs_encoding
1723 1788 - IPython.terminal.debugger.DEFAULT_BUFFER
1724 1789 - IPython.terminal.debugger.cursor_in_leading_ws
1725 1790 - IPython.terminal.debugger.emacs_insert_mode
1726 1791 - IPython.terminal.debugger.has_selection
1727 1792 - IPython.terminal.debugger.vi_insert_mode
1728 1793 - IPython.terminal.interactiveshell.DISPLAY_BANNER_DEPRECATED
1729 1794 - IPython.terminal.ipapp.TerminalIPythonApp.parse_command_line
1730 1795 - IPython.testing.test
1731 1796 - IPython.utils.contexts.NoOpContext
1732 1797 - IPython.utils.io.IOStream
1733 1798 - IPython.utils.io.IOStream.close
1734 1799 - IPython.utils.io.IOStream.write
1735 1800 - IPython.utils.io.IOStream.writelines
1736 1801 - IPython.utils.io.__warningregistry__
1737 1802 - IPython.utils.io.atomic_writing
1738 1803 - IPython.utils.io.stderr
1739 1804 - IPython.utils.io.stdin
1740 1805 - IPython.utils.io.stdout
1741 1806 - IPython.utils.io.unicode_std_stream
1742 1807 - IPython.utils.path.get_ipython_cache_dir
1743 1808 - IPython.utils.path.get_ipython_dir
1744 1809 - IPython.utils.path.get_ipython_module_path
1745 1810 - IPython.utils.path.get_ipython_package_dir
1746 1811 - IPython.utils.path.locate_profile
1747 1812 - IPython.utils.path.unquote_filename
1748 1813 - IPython.utils.py3compat.PY2
1749 1814 - IPython.utils.py3compat.PY3
1750 1815 - IPython.utils.py3compat.buffer_to_bytes
1751 1816 - IPython.utils.py3compat.builtin_mod_name
1752 1817 - IPython.utils.py3compat.cast_bytes
1753 1818 - IPython.utils.py3compat.getcwd
1754 1819 - IPython.utils.py3compat.isidentifier
1755 1820 - IPython.utils.py3compat.u_format
1756 1821
1757 1822 The following signatures differ between 7.x and 8.0::
1758 1823
1759 1824 - IPython.core.completer.IPCompleter.unicode_name_matches(self, text)
1760 1825 + IPython.core.completer.IPCompleter.unicode_name_matches(text)
1761 1826
1762 1827 - IPython.core.completer.match_dict_keys(keys, prefix, delims)
1763 1828 + IPython.core.completer.match_dict_keys(keys, prefix, delims, extra_prefix='None')
1764 1829
1765 1830 - IPython.core.interactiveshell.InteractiveShell.object_inspect_mime(self, oname, detail_level=0)
1766 1831 + IPython.core.interactiveshell.InteractiveShell.object_inspect_mime(self, oname, detail_level=0, omit_sections='()')
1767 1832
1768 1833 - IPython.core.interactiveshell.InteractiveShell.set_hook(self, name, hook, priority=50, str_key='None', re_key='None', _warn_deprecated=True)
1769 1834 + IPython.core.interactiveshell.InteractiveShell.set_hook(self, name, hook, priority=50, str_key='None', re_key='None')
1770 1835
1771 1836 - IPython.core.oinspect.Inspector.info(self, obj, oname='', formatter='None', info='None', detail_level=0)
1772 1837 + IPython.core.oinspect.Inspector.info(self, obj, oname='', info='None', detail_level=0)
1773 1838
1774 1839 - IPython.core.oinspect.Inspector.pinfo(self, obj, oname='', formatter='None', info='None', detail_level=0, enable_html_pager=True)
1775 1840 + IPython.core.oinspect.Inspector.pinfo(self, obj, oname='', formatter='None', info='None', detail_level=0, enable_html_pager=True, omit_sections='()')
1776 1841
1777 1842 - IPython.core.profiledir.ProfileDir.copy_config_file(self, config_file, path='None', overwrite=False)
1778 1843 + IPython.core.profiledir.ProfileDir.copy_config_file(self, config_file, path, overwrite=False)
1779 1844
1780 1845 - IPython.core.ultratb.VerboseTB.format_record(self, frame, file, lnum, func, lines, index)
1781 1846 + IPython.core.ultratb.VerboseTB.format_record(self, frame_info)
1782 1847
1783 1848 - IPython.terminal.embed.InteractiveShellEmbed.mainloop(self, local_ns='None', module='None', stack_depth=0, display_banner='None', global_ns='None', compile_flags='None')
1784 1849 + IPython.terminal.embed.InteractiveShellEmbed.mainloop(self, local_ns='None', module='None', stack_depth=0, compile_flags='None')
1785 1850
1786 1851 - IPython.terminal.embed.embed(**kwargs)
1787 1852 + IPython.terminal.embed.embed(*, header='', compile_flags='None', **kwargs)
1788 1853
1789 1854 - IPython.terminal.interactiveshell.TerminalInteractiveShell.interact(self, display_banner='<object object at 0xffffff>')
1790 1855 + IPython.terminal.interactiveshell.TerminalInteractiveShell.interact(self)
1791 1856
1792 1857 - IPython.terminal.interactiveshell.TerminalInteractiveShell.mainloop(self, display_banner='<object object at 0xffffff>')
1793 1858 + IPython.terminal.interactiveshell.TerminalInteractiveShell.mainloop(self)
1794 1859
1795 1860 - IPython.utils.path.get_py_filename(name, force_win32='None')
1796 1861 + IPython.utils.path.get_py_filename(name)
1797 1862
1798 1863 The following are new attributes (that might be inherited)::
1799 1864
1800 1865 + IPython.core.completer.IPCompleter.unicode_names
1801 1866 + IPython.core.debugger.InterruptiblePdb.precmd
1802 1867 + IPython.core.debugger.Pdb.precmd
1803 1868 + IPython.core.ultratb.AutoFormattedTB.has_colors
1804 1869 + IPython.core.ultratb.ColorTB.has_colors
1805 1870 + IPython.core.ultratb.FormattedTB.has_colors
1806 1871 + IPython.core.ultratb.ListTB.has_colors
1807 1872 + IPython.core.ultratb.SyntaxTB.has_colors
1808 1873 + IPython.core.ultratb.TBTools.has_colors
1809 1874 + IPython.core.ultratb.VerboseTB.has_colors
1810 1875 + IPython.terminal.debugger.TerminalPdb.do_interact
1811 1876 + IPython.terminal.debugger.TerminalPdb.precmd
1812 1877
1813 1878 The following attribute/methods have been removed::
1814 1879
1815 1880 - IPython.core.application.BaseIPythonApplication.deprecated_subcommands
1816 1881 - IPython.core.ultratb.AutoFormattedTB.format_records
1817 1882 - IPython.core.ultratb.ColorTB.format_records
1818 1883 - IPython.core.ultratb.FormattedTB.format_records
1819 1884 - IPython.terminal.embed.InteractiveShellEmbed.init_deprecation_warnings
1820 1885 - IPython.terminal.embed.InteractiveShellEmbed.init_readline
1821 1886 - IPython.terminal.embed.InteractiveShellEmbed.write
1822 1887 - IPython.terminal.embed.InteractiveShellEmbed.write_err
1823 1888 - IPython.terminal.interactiveshell.TerminalInteractiveShell.init_deprecation_warnings
1824 1889 - IPython.terminal.interactiveshell.TerminalInteractiveShell.init_readline
1825 1890 - IPython.terminal.interactiveshell.TerminalInteractiveShell.write
1826 1891 - IPython.terminal.interactiveshell.TerminalInteractiveShell.write_err
1827 1892 - IPython.terminal.ipapp.LocateIPythonApp.deprecated_subcommands
1828 1893 - IPython.terminal.ipapp.LocateIPythonApp.initialize_subcommand
1829 1894 - IPython.terminal.ipapp.TerminalIPythonApp.deprecated_subcommands
1830 1895 - IPython.terminal.ipapp.TerminalIPythonApp.initialize_subcommand
General Comments 0
You need to be logged in to leave comments. Login now