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