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