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