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