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