##// END OF EJS Templates
Merge pull request #13236 from meeseeksmachine/auto-backport-of-pr-13235-on-7.x...
Matthias Bussonnier -
r26984:ca4af65d merge
parent child Browse files
Show More
@@ -1,1605 +1,1658 b''
1 1 ============
2 2 7.x Series
3 3 ============
4 4
5 5 .. _version 7.29:
6 6
7 7 IPython 7.29
8 8 ============
9 9
10 10
11 11 IPython 7.29 brings a couple of new functionalities to IPython and a number of bugfixes.
12 12 It is one of the largest recent release, relatively speaking, with close to 15 Pull Requests.
13 13
14 14
15 15 - fix an issue where base64 was returned instead of bytes when showing figures :ghpull:`13162`
16 16 - fix compatibility with PyQt6, PySide 6 :ghpull:`13172`. This may be of
17 17 interest if you are running on Apple Silicon as only qt6.2+ is natively
18 18 compatible.
19 19 - fix matplotlib qtagg eventloop :ghpull:`13179`
20 20 - Multiple docs fixes, typos, ... etc.
21 21 - Debugger will now exit by default on SigInt :ghpull:`13218`, this will be
22 22 useful in notebook/lab if you forgot to exit the debugger. "Interrupt Kernel"
23 23 will now exist the debugger.
24 24
25 25 It give Pdb the ability to skip code in decorators. If functions contain a
26 26 special value names ``__debuggerskip__ = True|False``, the function will not be
27 27 stepped into, and Pdb will step into lower frames only if the value is set to
28 28 ``False``. The exact behavior is still likely to have corner cases and will be
29 29 refined in subsequent releases. Feedback welcome. See the debugger module
30 30 documentation for more info. Thanks to the `D. E. Shaw
31 31 group <https://deshaw.com/>`__ for funding this feature.
32 32
33 33 The main branch of IPython is receiving a number of changes as we received a
34 34 `NumFOCUS SDG <https://numfocus.org/programs/small-development-grants>`__
35 35 ($4800), to help us finish replacing ``nose`` by ``pytest``, and make IPython
36 36 future proof with an 8.0 release.
37 37
38 38
39 39 Many thanks to all the contributors to this release. You can find all individual
40 40 contributions to this milestone `on github
41 41 <https://github.com/ipython/ipython/milestone/93>`__.
42 42
43 43 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
44 44 work on IPython and related libraries.
45 45
46 46
47 47 .. _version 7.28:
48 48
49 49 IPython 7.28
50 50 ============
51 51
52 52
53 53 IPython 7.28 is again a minor release that mostly bring bugfixes, and couple of
54 54 improvement. Many thanks to MrMino, who again did all the work this month, and
55 55 made a number of documentation improvements.
56 56
57 57 Here is a non-exhaustive list of changes,
58 58
59 59 Fixes:
60 60
61 61 - async with doesn't allow newlines :ghpull:`13090`
62 62 - Dynamically changing to vi mode via %config magic) :ghpull:`13091`
63 63
64 64 Virtualenv handling fixes:
65 65
66 66 - init_virtualenv now uses Pathlib :ghpull:`12548`
67 67 - Fix Improper path comparison of virtualenv directories :ghpull:`13140`
68 68 - Fix virtual environment user warning for lower case pathes :ghpull:`13094`
69 69 - Adapt to all sorts of drive names for cygwin :ghpull:`13153`
70 70
71 71 New Features:
72 72
73 73 - enable autoplay in embed YouTube player :ghpull:`13133`
74 74
75 75 Documentation:
76 76
77 77 - Fix formatting for the core.interactiveshell documentation :ghpull:`13118`
78 78 - Fix broken ipyparallel's refs :ghpull:`13138`
79 79 - Improve formatting of %time documentation :ghpull:`13125`
80 80 - Reword the YouTubeVideo autoplay WN :ghpull:`13147`
81 81
82 82
83 Highlighted features
84 --------------------
85
86
87 ``YouTubeVideo`` autoplay and the ability to add extra attributes to ``IFrame``
88 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89
90 You can add any extra attributes to the ``<iframe>`` tag using the new
91 ``extras`` argument in the ``IFrame`` class. For example::
92
93 In [1]: from IPython.display import IFrame
94
95 In [2]: IFrame(src="src", width=300, height=300, extras=['loading="eager"'])
96
97 The above cells will result in the following HTML code being displayed in a
98 notebook::
99
100 <iframe
101 width="300"
102 height="300"
103 src="src"
104 frameborder="0"
105 allowfullscreen
106 loading="eager"
107 ></iframe>
108
109 Related to the above, the ``YouTubeVideo`` class now takes an
110 ``allow_autoplay`` flag, which sets up the iframe of the embedded YouTube video
111 such that it allows autoplay.
112
113 .. note::
114 Whether this works depends on the autoplay policy of the browser rendering
115 the HTML allowing it. It also could get blocked by some browser extensions.
116
117 Try it out!
118 ::
119
120 In [1]: from IPython.display import YouTubeVideo
121
122 In [2]: YouTubeVideo("dQw4w9WgXcQ", allow_autoplay=True)
123
124
125
83 126 Thanks
84 127 ------
85 128
86 129 Many thanks to all the contributors to this release. You can find all individual
87 130 contributions to this milestone `on github
88 131 <https://github.com/ipython/ipython/milestone/92>`__.
89 132
90 133 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
91 134 work on IPython and related libraries.
92 135
93 136
94 137 .. _version 7.27:
95 138
96 139 IPython 7.27
97 140 ============
98 141
99 142 IPython 7.27 is a minor release that fixes a couple of issues and compatibility.
100 143
101 144 - Add support for GTK4 :ghpull:`131011`
102 145 - Add support for Qt6 :ghpull:`13085`
103 146 - Fix an issue with pip magic on windows :ghpull:`13093`
104 147
105 148 Thanks
106 149 ------
107 150
108 151 Many thanks to all the contributors to this release. You can find all individual
109 152 contributions to this milestone `on github
110 153 <https://github.com/ipython/ipython/milestone/91>`__.
111 154
112 155 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
113 156 work on IPython and related libraries.
114 157
115 158 .. _version 7.26:
116 159
117 160 IPython 7.26
118 161 ============
119 162
120 163 IPython 7.26 is a minor release that fixes a couple of issues, updates in API
121 164 and Copyright/Licenses issues around various part of the codebase.
122 165
123 166 We'll highlight `this issue <https://github.com/ipython/ipython/issues/13039>`
124 167 pointing out we were including and refereeing to code from Stack Overflow which
125 168 was CC-BY-SA, hence incompatible with the BSD license of IPython. This lead us
126 169 to a rewriting of the corresponding logic which in our case was done in a more
127 170 efficient way (in our case we were searching string prefixes instead of full
128 171 strings).
129 172
130 173 You will notice also a number of documentation improvements and cleanup.
131 174
132 175 Of particular interest are the following Pull-requests:
133 176
134 177
135 178 - The IPython directive now uses Sphinx logging for warnings. :ghpull:`13030`.
136 179 - Add expiry days option to pastebin magic and change http protocol to https.
137 180 :ghpull:`13056`
138 181 - Make Ipython.utils.timing work with jupyterlite :ghpull:`13050`.
139 182
183 Pastebin magic expiry days option
184 ---------------------------------
185
186 The Pastebin magic now has ``-e`` option to determine
187 the number of days for paste expiration. For example
188 the paste that created with ``%pastebin -e 20 1`` magic will
189 be available for next 20 days.
190
191
192
140 193
141 194
142 195 Thanks
143 196 ------
144 197
145 198 Many thanks to all the contributors to this release and in particular MrMino who
146 199 is doing most of the work those days. You can find all individual contributions
147 200 to this milestone `on github <https://github.com/ipython/ipython/milestone/90>`__.
148 201
149 202 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
150 203 work on IPython and related libraries.
151 204
152 205
153 206 .. _version 7.25:
154 207
155 208 IPython 7.25
156 209 ============
157 210
158 211 IPython 7.25 is a minor release that contains a single bugfix, which is highly
159 212 recommended for all users of ipdb, ipython debugger %debug magic and similar.
160 213
161 214 Issuing commands like ``where`` from within the debugger would reset the
162 215 local variables changes made by the user. It is interesting to look at the root
163 216 cause of the issue as accessing an attribute (``frame.f_locals``) would trigger
164 217 this side effects.
165 218
166 219 Thanks in particular to the patience from the reporters at D.E. Shaw for their
167 220 initial bug report that was due to a similar coding oversight in an extension,
168 221 and who took time to debug and narrow down the problem.
169 222
170 223 Thanks
171 224 ------
172 225
173 226 Many thanks to all the contributors to this release you can find all individual
174 227 contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/89>`__.
175 228
176 229 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
177 230 work on IPython and related libraries.
178 231
179 232
180 233 .. _version 7.24:
181 234
182 235 IPython 7.24
183 236 ============
184 237
185 238 Third release of IPython for 2021, mostly containing bug fixes. A couple of not
186 239 typical updates:
187 240
188 241 Misc
189 242 ----
190 243
191 244
192 245 - Fix an issue where ``%recall`` would both succeeded and print an error message
193 246 it failed. :ghpull:`12952`
194 247 - Drop support for NumPy 1.16 – practically has no effect beyond indicating in
195 248 package metadata that we do not support it. :ghpull:`12937`
196 249
197 250 Debugger improvements
198 251 ---------------------
199 252
200 253 The debugger (and ``%debug`` magic) have been improved and can skip or hide frames
201 254 originating from files that are not writable to the user, as these are less
202 255 likely to be the source of errors, or be part of system files this can be a useful
203 256 addition when debugging long errors.
204 257
205 258 In addition to the global ``skip_hidden True|False`` command, the debugger has
206 259 gained finer grained control of predicates as to whether to a frame should be
207 260 considered hidden. So far 3 predicates are available :
208 261
209 262 - ``tbhide``: frames containing the local variable ``__tracebackhide__`` set to
210 263 True.
211 264 - ``readonly``: frames originating from readonly files, set to False.
212 265 - ``ipython_internal``: frames that are likely to be from IPython internal
213 266 code, set to True.
214 267
215 268 You can toggle individual predicates during a session with
216 269
217 270 .. code-block::
218 271
219 272 ipdb> skip_predicates readonly True
220 273
221 274 Read-only files will now be considered hidden frames.
222 275
223 276
224 277 You can call ``skip_predicates`` without arguments to see the states of current
225 278 predicates:
226 279
227 280 .. code-block::
228 281
229 282 ipdb> skip_predicates
230 283 current predicates:
231 284 tbhide : True
232 285 readonly : False
233 286 ipython_internal : True
234 287
235 288 If all predicates are set to ``False``, ``skip_hidden`` will practically have
236 289 no effect. We attempt to warn you when all predicates are False.
237 290
238 291 Note that the ``readonly`` predicate may increase disk access as we check for
239 292 file access permission for all frames on many command invocation, but is usually
240 293 cached by operating systems. Let us know if you encounter any issues.
241 294
242 295 As the IPython debugger does not use the traitlets infrastructure for
243 296 configuration, by editing your ``.pdbrc`` files and appending commands you would
244 297 like to be executed just before entering the interactive prompt. For example:
245 298
246 299
247 300 .. code::
248 301
249 302 # file : ~/.pdbrc
250 303 skip_predicates readonly True
251 304 skip_predicates tbhide False
252 305
253 306 Will hide read only frames by default and show frames marked with
254 307 ``__tracebackhide__``.
255 308
256 309
257 310
258 311
259 312 Thanks
260 313 ------
261 314
262 315 Many thanks to all the contributors to this release you can find all individual
263 316 contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/87>`__.
264 317
265 318 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
266 319 work on IPython and related libraries, in particular above mentioned
267 320 improvements to the debugger.
268 321
269 322
270 323
271 324
272 325 .. _version 7.23:
273 326
274 327 IPython 7.23 and 7.23.1
275 328 =======================
276 329
277 330
278 331 Third release of IPython for 2021, mostly containing bug fixes. A couple of not
279 332 typical updates:
280 333
281 334 - We moved to GitHub actions away from Travis-CI, the transition may not be
282 335 100% complete (not testing on nightly anymore), but as we ran out of
283 336 Travis-Ci hours on the IPython organisation that was a necessary step.
284 337 :ghpull:`12900`.
285 338
286 339 - We have a new dependency: ``matplotlib-inline``, which try to extract
287 340 matplotlib inline backend specific behavior. It is available on PyPI and
288 341 conda-forge thus should not be a problem to upgrade to this version. If you
289 342 are a package maintainer that might be an extra dependency to package first.
290 343 :ghpull:`12817` (IPython 7.23.1 fix a typo that made this change fail)
291 344
292 345 In the addition/new feature category, ``display()`` now have a ``clear=True``
293 346 option to clear the display if any further outputs arrives, allowing users to
294 347 avoid having to use ``clear_output()`` directly. :ghpull:`12823`.
295 348
296 349 In bug fixes category, this release fix an issue when printing tracebacks
297 350 containing Unicode characters :ghpull:`12758`.
298 351
299 352 In code cleanup category :ghpull:`12932` remove usage of some deprecated
300 353 functionality for compatibility with Python 3.10.
301 354
302 355
303 356
304 357 Thanks
305 358 ------
306 359
307 360 Many thanks to all the contributors to this release you can find all individual
308 361 contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/86>`__.
309 362 In particular MrMino for responding to almost all new issues, and triaging many
310 363 of the old ones, as well as takluyver, minrk, willingc for reacting quikly when
311 364 we ran out of CI Hours.
312 365
313 366 Thanks as well to organisations, QuantStack (martinRenou and SylvainCorlay) for
314 367 extracting matplotlib inline backend into its own package, and the `D. E. Shaw group
315 368 <https://deshaw.com/>`__ for sponsoring work on IPython and related libraries.
316 369
317 370
318 371 .. _version 7.22:
319 372
320 373 IPython 7.22
321 374 ============
322 375
323 376 Second release of IPython for 2021, mostly containing bug fixes. Here is a quick
324 377 rundown of the few changes.
325 378
326 379 - Fix some ``sys.excepthook`` shenanigan when embedding with qt, recommended if
327 380 you – for example – use `napari <https://napari.org>`__. :ghpull:`12842`.
328 381 - Fix bug when using the new ipdb ``%context`` magic :ghpull:`12844`
329 382 - Couples of deprecation cleanup :ghpull:`12868`
330 383 - Update for new dpast.com api if you use the ``%pastbin`` magic. :ghpull:`12712`
331 384 - Remove support for numpy before 1.16. :ghpull:`12836`
332 385
333 386
334 387 Thanks
335 388 ------
336 389
337 390 We have a new team member that you should see more often on the IPython
338 391 repository, Błażej Michalik (@MrMino) have been doing regular contributions to
339 392 IPython, and spent time replying to many issues and guiding new users to the
340 393 codebase; they now have triage permissions to the IPython repository and we'll
341 394 work toward giving them more permission in the future.
342 395
343 396 Many thanks to all the contributors to this release you can find all individual
344 397 contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/84>`__.
345 398
346 399 Thanks as well to organisations, QuantStack for working on debugger
347 400 compatibility for Xeus_python, and the `D. E. Shaw group
348 401 <https://deshaw.com/>`__ for sponsoring work on IPython and related libraries.
349 402
350 403 .. _version 721:
351 404
352 405 IPython 7.21
353 406 ============
354 407
355 408 IPython 7.21 is the first release we have back on schedule of one release every
356 409 month; it contains a number of minor fixes and improvements, notably, the new
357 410 context command for ipdb
358 411
359 412
360 413 New "context" command in ipdb
361 414 -----------------------------
362 415
363 416 It is now possible to change the number of lines shown in the backtrace
364 417 information in ipdb using "context" command. :ghpull:`12826`
365 418
366 419 (thanks @MrMino, there are other improvement from them on master).
367 420
368 421 Other notable changes in IPython 7.21
369 422 -------------------------------------
370 423
371 424 - Fix some issues on new osx-arm64 :ghpull:`12804`, :ghpull:`12807`.
372 425 - Compatibility with Xeus-Python for debugger protocol, :ghpull:`12809`
373 426 - Misc docs fixes for compatibility and uniformity with Numpydoc.
374 427 :ghpull:`12824`
375 428
376 429
377 430 Thanks
378 431 ------
379 432
380 433 Many thanks to all the contributors to this release you can find all individual
381 434 contribution to this milestone `on github <https://github.com/ipython/ipython/milestone/83>`__.
382 435
383 436
384 437 .. _version 720:
385 438
386 439 IPython 7.20
387 440 ============
388 441
389 442 IPython 7.20 is the accumulation of 3 month of work on IPython, spacing between
390 443 IPython release have been increased from the usual once a month for various
391 444 reason.
392 445
393 446 - Mainly as I'm too busy and the effectively sole maintainer, and
394 447 - Second because not much changes happened before mid December.
395 448
396 449 The main driver for this release was the new version of Jedi 0.18 breaking API;
397 450 which was taken care of in the master branch early in 2020 but not in 7.x as I
398 451 though that by now 8.0 would be out.
399 452
400 453 The inclusion of a resolver in pip did not help and actually made things worse.
401 454 If usually I would have simply pinned Jedi to ``<0.18``; this is not a solution
402 455 anymore as now pip is free to install Jedi 0.18, and downgrade IPython.
403 456
404 457 I'll do my best to keep the regular release, but as the 8.0-dev branch and 7.x
405 458 are starting to diverge this is becoming difficult in particular with my limited
406 459 time, so if you have any cycles to spare I'll appreciate your help to respond to
407 460 issues and pushing 8.0 forward.
408 461
409 462 Here are thus some of the changes for IPython 7.20.
410 463
411 464 - Support for PyQt5 >= 5.11 :ghpull:`12715`
412 465 - ``%reset`` remove imports more agressively :ghpull:`12718`
413 466 - fix the ``%conda`` magic :ghpull:`12739`
414 467 - compatibility with Jedi 0.18, and bump minimum Jedi version. :ghpull:`12793`
415 468
416 469
417 470 .. _version 719:
418 471
419 472 IPython 7.19
420 473 ============
421 474
422 475 IPython 7.19 accumulative two month of works, bug fixes and improvements, there
423 476 was exceptionally no release last month.
424 477
425 478 - Fix to restore the ability to specify more than one extension using command
426 479 line flags when using traitlets 5.0 :ghpull:`12543`
427 480 - Docs docs formatting that make the install commands work on zsh
428 481 :ghpull:`12587`
429 482 - Always display the last frame in tracebacks even if hidden with
430 483 ``__tracebackhide__`` :ghpull:`12601`
431 484 - Avoid an issue where a callback can be registered multiple times.
432 485 :ghpull:`12625`
433 486 - Avoid an issue in debugger mode where frames changes could be lost.
434 487 :ghpull:`12627`
435 488
436 489 - Never hide the frames that invoke a debugger, even if marked as hidden by
437 490 ``__tracebackhide__`` :ghpull:`12631`
438 491 - Fix calling the debugger in a recursive manner :ghpull:`12659`
439 492
440 493
441 494 A number of code changes have landed on master and we are getting close to
442 495 enough new features and codebase improvement that a 8.0 start to make sens.
443 496 For downstream packages, please start working on migrating downstream testing
444 497 away from iptest and using pytest, as nose will not work on Python 3.10 and we
445 498 will likely start removing it as a dependency for testing.
446 499
447 500 .. _version 718:
448 501
449 502 IPython 7.18
450 503 ============
451 504
452 505 IPython 7.18 is a minor release that mostly contains bugfixes.
453 506
454 507 - ``CRLF`` is now handled by magics my default; solving some issues due to copy
455 508 pasting on windows. :ghpull:`12475`
456 509
457 510 - Requiring pexpect ``>=4.3`` as we are Python 3.7+ only and earlier version of
458 511 pexpect will be incompatible. :ghpull:`12510`
459 512
460 513 - Minimum jedi version is now 0.16. :ghpull:`12488`
461 514
462 515
463 516
464 517 .. _version 717:
465 518
466 519 IPython 7.17
467 520 ============
468 521
469 522 IPython 7.17 brings a couple of new improvements to API and a couple of user
470 523 facing changes to make the terminal experience more user friendly.
471 524
472 525 :ghpull:`12407` introduces the ability to pass extra argument to the IPython
473 526 debugger class; this is to help a new project from ``kmaork``
474 527 (https://github.com/kmaork/madbg) to feature a fully remote debugger.
475 528
476 529 :ghpull:`12410` finally remove support for 3.6, while the codebase is still
477 530 technically compatible; IPython will not install on Python 3.6.
478 531
479 532 lots of work on the debugger and hidden frames from ``@impact27`` in
480 533 :ghpull:`12437`, :ghpull:`12445`, :ghpull:`12460` and in particular
481 534 :ghpull:`12453` which make the debug magic more robust at handling spaces.
482 535
483 536 Biggest API addition is code transformation which is done before code execution;
484 537 IPython allows a number of hooks to catch non-valid Python syntax (magic, prompt
485 538 stripping...etc). Transformers are usually called many time; typically:
486 539
487 540 - When trying to figure out whether the code is complete and valid (should we
488 541 insert a new line or execute ?)
489 542 - During actual code execution pass before giving the code to Python's
490 543 ``exec``.
491 544
492 545 This lead to issues when transformer might have had side effects; or do external
493 546 queries. Starting with IPython 7.17 you can expect your transformer to be called
494 547 less time.
495 548
496 549 Input transformers are now called only once in the execution path of
497 550 `InteractiveShell`, allowing to register transformer that potentially have side
498 551 effects (note that this is not recommended). Internal methods `should_run_async`, and
499 552 `run_cell_async` now take a recommended optional `transformed_cell`, and
500 553 `preprocessing_exc_tuple` parameters that will become mandatory at some point in
501 554 the future; that is to say cells need to be explicitly transformed to be valid
502 555 Python syntax ahead of trying to run them. :ghpull:`12440`;
503 556
504 557 ``input_transformers`` can now also have an attribute ``has_side_effects`` set
505 558 to `True`, when this attribute is present; this will prevent the transformers
506 559 from being ran when IPython is trying to guess whether the user input is
507 560 complete. Note that this may means you will need to explicitly execute in some
508 561 case where your transformations are now not ran; but will not affect users with
509 562 no custom extensions.
510 563
511 564
512 565 API Changes
513 566 -----------
514 567
515 568 Change of API and exposed objects automatically detected using `frappuccino
516 569 <https://pypi.org/project/frappuccino/>`_
517 570
518 571
519 572 The following items are new since 7.16.0::
520 573
521 574 + IPython.core.interactiveshell.InteractiveShell.get_local_scope(self, stack_depth)
522 575
523 576 The following signatures differ since 7.16.0::
524 577
525 578 - IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True)
526 579 + IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True, *, transformed_cell=None, preprocessing_exc_tuple=None)
527 580
528 581 - IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell)
529 582 + IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell, *, transformed_cell=None, preprocessing_exc_tuple=None)
530 583
531 584 - IPython.terminal.debugger.TerminalPdb.pt_init(self)
532 585 + IPython.terminal.debugger.TerminalPdb.pt_init(self, pt_session_options=None)
533 586
534 587 This method was added::
535 588
536 589 + IPython.core.interactiveshell.InteractiveShell.get_local_scope
537 590
538 591 Which is now also present on subclasses::
539 592
540 593 + IPython.terminal.embed.InteractiveShellEmbed.get_local_scope
541 594 + IPython.terminal.interactiveshell.TerminalInteractiveShell.get_local_scope
542 595
543 596
544 597 .. _version 716:
545 598
546 599 IPython 7.16
547 600 ============
548 601
549 602
550 603 The default traceback mode will now skip frames that are marked with
551 604 ``__tracebackhide__ = True`` and show how many traceback frames have been
552 605 skipped. This can be toggled by using :magic:`xmode` with the ``--show`` or
553 606 ``--hide`` attribute. It will have no effect on non verbose traceback modes.
554 607
555 608 The ipython debugger also now understands ``__tracebackhide__`` as well and will
556 609 skip hidden frames when displaying. Movement up and down the stack will skip the
557 610 hidden frames and will show how many frames were hidden. Internal IPython frames
558 611 are also now hidden by default. The behavior can be changed with the
559 612 ``skip_hidden`` while in the debugger, command and accepts "yes", "no", "true"
560 613 and "false" case insensitive parameters.
561 614
562 615
563 616 Misc Noticeable changes:
564 617 ------------------------
565 618
566 619 - Exceptions are now (re)raised when running notebooks via the :magic:`%run`, helping to catch issues in workflows and
567 620 pipelines. :ghpull:`12301`
568 621 - Fix inputhook for qt 5.15.0 :ghpull:`12355`
569 622 - Fix wx inputhook :ghpull:`12375`
570 623 - Add handling for malformed pathext env var (Windows) :ghpull:`12367`
571 624 - use $SHELL in system_piped :ghpull:`12360` for uniform behavior with
572 625 ipykernel.
573 626
574 627 Reproducible Build
575 628 ------------------
576 629
577 630 IPython 7.15 reproducible build did not work, so we try again this month
578 631 :ghpull:`12358`.
579 632
580 633
581 634 API Changes
582 635 -----------
583 636
584 637 Change of API and exposed objects automatically detected using `frappuccino
585 638 <https://pypi.org/project/frappuccino/>`_ (still in beta):
586 639
587 640
588 641 The following items are new and mostly related to understanding ``__tracebackhide__``::
589 642
590 643 + IPython.core.debugger.Pdb.do_down(self, arg)
591 644 + IPython.core.debugger.Pdb.do_skip_hidden(self, arg)
592 645 + IPython.core.debugger.Pdb.do_up(self, arg)
593 646 + IPython.core.debugger.Pdb.hidden_frames(self, stack)
594 647 + IPython.core.debugger.Pdb.stop_here(self, frame)
595 648
596 649
597 650 The following items have been removed::
598 651
599 652 - IPython.core.debugger.Pdb.new_do_down
600 653 - IPython.core.debugger.Pdb.new_do_up
601 654
602 655 Those were implementation details.
603 656
604 657
605 658 .. _version 715:
606 659
607 660 IPython 7.15
608 661 ============
609 662
610 663 IPython 7.15 brings a number of bug fixes and user facing improvements.
611 664
612 665 Misc Noticeable changes:
613 666 ------------------------
614 667
615 668 - Long completion name have better elision in terminal :ghpull:`12284`
616 669 - I've started to test on Python 3.9 :ghpull:`12307` and fix some errors.
617 670 - Hi DPI scaling of figures when using qt eventloop :ghpull:`12314`
618 671 - Document the ability to have systemwide configuration for IPython.
619 672 :ghpull:`12328`
620 673 - Fix issues with input autoformatting :ghpull:`12336`
621 674 - ``IPython.core.debugger.Pdb`` is now interruptible (:ghpull:`12168`, in 7.14
622 675 but forgotten in release notes)
623 676 - Video HTML attributes (:ghpull:`12212`, in 7.14 but forgotten in release
624 677 notes)
625 678
626 679 Reproducible Build
627 680 ------------------
628 681
629 682 Starting with IPython 7.15, I am attempting to provide reproducible builds,
630 683 that is to say you should be able from the source tree to generate an sdist
631 684 and wheel that are identical byte for byte with the publish version on PyPI.
632 685
633 686 I've only tested on a couple of machines so far and the process is relatively
634 687 straightforward, so this mean that IPython not only have a deterministic build
635 688 process, but also I have either removed, or put under control all effects of
636 689 the build environments on the final artifact. I encourage you to attempt the
637 690 build process on your machine as documented in :ref:`core_developer_guide`
638 691 and let me know if you do not obtain an identical artifact.
639 692
640 693 While reproducible builds is critical to check that the supply chain of (open
641 694 source) software has not been compromised, it can also help to speedup many
642 695 of the build processes in large environment (conda, apt...) by allowing
643 696 better caching of intermediate build steps.
644 697
645 698 Learn more on `<https://reproducible-builds.org/>`_. `Reflections on trusting
646 699 trust <https://dl.acm.org/doi/10.1145/358198.358210>`_ is also one of the
647 700 cornerstone and recommended reads on this subject.
648 701
649 702 .. note::
650 703
651 704 The build commit from which the sdist is generated is also `signed
652 705 <https://en.wikipedia.org/wiki/Digital_signature>`_, so you should be able to
653 706 check it has not been compromised, and the git repository is a `merkle-tree
654 707 <https://en.wikipedia.org/wiki/Merkle_tree>`_, you can check the consistency
655 708 with `git-fsck <https://git-scm.com/docs/git-fsck>`_ which you likely `want
656 709 to enable by default
657 710 <https://gist.github.com/mbbx6spp/14b86437e794bffb4120>`_.
658 711
659 712 NEP29: Last version to support Python 3.6
660 713 -----------------------------------------
661 714
662 715 IPython 7.15 will be the Last IPython version to officially support Python
663 716 3.6, as stated by `NumPy Enhancement Proposal 29
664 717 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_. Starting with
665 718 next minor version of IPython I may stop testing on Python 3.6 and may stop
666 719 publishing release artifacts that install on Python 3.6
667 720
668 721 Highlighted features
669 722 --------------------
670 723
671 724 Highlighted features are not new, but seem to not be widely known, this
672 725 section will help you discover in more narrative form what you can do with
673 726 IPython.
674 727
675 728 Increase Tab Completion Menu Height
676 729 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
677 730
678 731 In terminal IPython it is possible to increase the hight of the tab-completion
679 732 menu. To do so set the value of
680 733 :configtrait:`TerminalInteractiveShell.space_for_menu`, this will reserve more
681 734 space at the bottom of the screen for various kind of menus in IPython including
682 735 tab completion and searching in history.
683 736
684 737 Autoformat Code in the terminal
685 738 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
686 739
687 740 If you have a preferred code formatter, you can configure IPython to
688 741 reformat your code. Set the value of
689 742 :configtrait:`TerminalInteractiveShell.autoformatter` to for example ``'black'``
690 743 and IPython will auto format your code when possible.
691 744
692 745
693 746 .. _version 714:
694 747
695 748 IPython 7.14
696 749 ============
697 750
698 751 IPython 7.14 is a minor release that fix a couple of bugs and prepare
699 752 compatibility with new or future versions of some libraries.
700 753
701 754 Important changes:
702 755 ------------------
703 756
704 757 - Fix compatibility with Sphinx 3+ :ghpull:`12235`
705 758 - Remove deprecated matplotlib parameter usage, compatibility with matplotlib
706 759 3.3+ :`122250`
707 760
708 761 Misc Changes
709 762 ------------
710 763
711 764 - set ``.py`` extension when editing current buffer in vi/emacs. :ghpull:`12167`
712 765 - support for unicode identifiers in ``?``/``??`` :ghpull:`12208`
713 766 - add extra options to the ``Video`` Rich objects :ghpull:`12212`
714 767 - add pretty-printing to ``SimpleNamespace`` :ghpull:`12230`
715 768
716 769 IPython.core.debugger.Pdb is now interruptible
717 770 ----------------------------------------------
718 771
719 772 A ``KeyboardInterrupt`` will now interrupt IPython's extended debugger, in order to make Jupyter able to interrupt it. (:ghpull:`12168`)
720 773
721 774 Video HTML attributes
722 775 ---------------------
723 776
724 777 Add an option to `IPython.display.Video` to change the attributes of the HTML display of the video (:ghpull:`12212`)
725 778
726 779
727 780 Pending deprecated imports
728 781 --------------------------
729 782
730 783 Many object present in ``IPython.core.display`` are there for internal use only,
731 784 and should already been imported from ``IPython.display`` by users and external
732 785 libraries. Trying to import those from ``IPython.core.display`` is still possible
733 786 but will trigger a
734 787 deprecation warning in later versions of IPython and will become errors in the
735 788 future.
736 789
737 790 This will simplify compatibility with other Python kernels (like Xeus-Python),
738 791 and simplify code base.
739 792
740 793
741 794
742 795
743 796 .. _version 713:
744 797
745 798 IPython 7.13
746 799 ============
747 800
748 801 IPython 7.13 is the final release of the 7.x branch since master is diverging
749 802 toward an 8.0. Exiting new features have already been merged in 8.0 and will
750 803 not be available on the 7.x branch. All the changes below have been backported
751 804 from the master branch.
752 805
753 806
754 807 - Fix inability to run PDB when inside an event loop :ghpull:`12141`
755 808 - Fix ability to interrupt some processes on windows :ghpull:`12137`
756 809 - Fix debugger shortcuts :ghpull:`12132`
757 810 - improve tab completion when inside a string by removing irrelevant elements :ghpull:`12128`
758 811 - Fix display of filename tab completion when the path is long :ghpull:`12122`
759 812 - Many removal of Python 2 specific code path :ghpull:`12110`
760 813 - displaying wav files do not require NumPy anymore, and is 5x to 30x faster :ghpull:`12113`
761 814
762 815 See the list of all closed issues and pull request on `github
763 816 <https://github.com/ipython/ipython/pulls?q=is%3Aclosed+milestone%3A7.13>`_.
764 817
765 818 .. _version 712:
766 819
767 820 IPython 7.12
768 821 ============
769 822
770 823 IPython 7.12 is a minor update that mostly brings code cleanup, removal of
771 824 longtime deprecated function and a couple update to documentation cleanup as well.
772 825
773 826 Notable changes are the following:
774 827
775 828 - Exit non-zero when ipython is given a file path to run that doesn't exist :ghpull:`12074`
776 829 - Test PR on ARM64 with Travis-CI :ghpull:`12073`
777 830 - Update CI to work with latest Pytest :ghpull:`12086`
778 831 - Add infrastructure to run ipykernel eventloop via trio :ghpull:`12097`
779 832 - Support git blame ignore revs :ghpull:`12091`
780 833 - Start multi-line ``__repr__`` s on their own line :ghpull:`12099`
781 834
782 835 .. _version 7111:
783 836
784 837 IPython 7.11.1
785 838 ==============
786 839
787 840 A couple of deprecated functions (no-op) have been reintroduces in py3compat as
788 841 Cython was still relying on them, and will be removed in a couple of versions.
789 842
790 843 .. _version 711:
791 844
792 845 IPython 7.11
793 846 ============
794 847
795 848 IPython 7.11 received a couple of compatibility fixes and code cleanup.
796 849
797 850 A number of function in the ``py3compat`` have been removed; a number of types
798 851 in the IPython code base are now non-ambiguous and now always ``unicode``
799 852 instead of ``Union[Unicode,bytes]``; many of the relevant code path have thus
800 853 been simplified/cleaned and types annotation added.
801 854
802 855 IPython support several verbosity level from exceptions. ``xmode plain`` now
803 856 support chained exceptions. :ghpull:`11999`
804 857
805 858 We are starting to remove ``shell=True`` in some usages of subprocess. While not directly
806 859 a security issue (as IPython is made to run arbitrary code anyway) it is not good
807 860 practice and we'd like to show the example. :ghissue:`12023`. This discussion
808 861 was started by ``@mschwager`` thanks to a new auditing tool they are working on
809 862 with duo-labs (`dlint <https://github.com/duo-labs/dlint>`_).
810 863
811 864 Work around some bugs in Python 3.9 tokenizer :ghpull:`12057`
812 865
813 866 IPython will now print its version after a crash. :ghpull:`11986`
814 867
815 868 This is likely the last release from the 7.x series that will see new feature.
816 869 The master branch will soon accept large code changes and thrilling new
817 870 features; the 7.x branch will only start to accept critical bug fixes, and
818 871 update dependencies.
819 872
820 873 .. _version 7102:
821 874
822 875 IPython 7.10.2
823 876 ==============
824 877
825 878 IPython 7.10.2 fix a couple of extra incompatibility between IPython, ipdb,
826 879 asyncio and Prompt Toolkit 3.
827 880
828 881 .. _version 7101:
829 882
830 883 IPython 7.10.1
831 884 ==============
832 885
833 886 IPython 7.10.1 fix a couple of incompatibilities with Prompt toolkit 3 (please
834 887 update Prompt toolkit to 3.0.2 at least), and fixes some interaction with
835 888 headless IPython.
836 889
837 890 .. _version 7100:
838 891
839 892 IPython 7.10.0
840 893 ==============
841 894
842 895 IPython 7.10 is the first double digit minor release in the last decade, and
843 896 first since the release of IPython 1.0, previous double digit minor release was
844 897 in August 2009.
845 898
846 899 We've been trying to give you regular release on the last Friday of every month
847 900 for a guaranty of rapid access to bug fixes and new features.
848 901
849 902 Unlike the previous first few releases that have seen only a couple of code
850 903 changes, 7.10 bring a number of changes, new features and bugfixes.
851 904
852 905 Stop Support for Python 3.5 – Adopt NEP 29
853 906 ------------------------------------------
854 907
855 908 IPython has decided to follow the informational `NEP 29
856 909 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_ which layout a clear
857 910 policy as to which version of (C)Python and NumPy are supported.
858 911
859 912 We thus dropped support for Python 3.5, and cleaned up a number of code path
860 913 that were Python-version dependant. If you are on 3.5 or earlier pip should
861 914 automatically give you the latest compatible version of IPython so you do not
862 915 need to pin to a given version.
863 916
864 917 Support for Prompt Toolkit 3.0
865 918 ------------------------------
866 919
867 920 Prompt Toolkit 3.0 was release a week before IPython 7.10 and introduces a few
868 921 breaking changes. We believe IPython 7.10 should be compatible with both Prompt
869 922 Toolkit 2.x and 3.x, though it has not been extensively tested with 3.x so
870 923 please report any issues.
871 924
872 925
873 926 Prompt Rendering Performance improvements
874 927 -----------------------------------------
875 928
876 929 Pull Request :ghpull:`11933` introduced an optimisation in the prompt rendering
877 930 logic that should decrease the resource usage of IPython when using the
878 931 _default_ configuration but could potentially introduce a regression of
879 932 functionalities if you are using a custom prompt.
880 933
881 934 We know assume if you haven't changed the default keybindings that the prompt
882 935 **will not change** during the duration of your input – which is for example
883 936 not true when using vi insert mode that switches between `[ins]` and `[nor]`
884 937 for the current mode.
885 938
886 939 If you are experiencing any issue let us know.
887 940
888 941 Code autoformatting
889 942 -------------------
890 943
891 944 The IPython terminal can now auto format your code just before entering a new
892 945 line or executing a command. To do so use the
893 946 ``--TerminalInteractiveShell.autoformatter`` option and set it to ``'black'``;
894 947 if black is installed IPython will use black to format your code when possible.
895 948
896 949 IPython cannot always properly format your code; in particular it will
897 950 auto formatting with *black* will only work if:
898 951
899 952 - Your code does not contains magics or special python syntax.
900 953
901 954 - There is no code after your cursor.
902 955
903 956 The Black API is also still in motion; so this may not work with all versions of
904 957 black.
905 958
906 959 It should be possible to register custom formatter, though the API is till in
907 960 flux.
908 961
909 962 Arbitrary Mimetypes Handing in Terminal (Aka inline images in terminal)
910 963 -----------------------------------------------------------------------
911 964
912 965 When using IPython terminal it is now possible to register function to handle
913 966 arbitrary mimetypes. While rendering non-text based representation was possible in
914 967 many jupyter frontend; it was not possible in terminal IPython, as usually
915 968 terminal are limited to displaying text. As many terminal these days provide
916 969 escape sequences to display non-text; bringing this loved feature to IPython CLI
917 970 made a lot of sens. This functionality will not only allow inline images; but
918 971 allow opening of external program; for example ``mplayer`` to "display" sound
919 972 files.
920 973
921 974 So far only the hooks necessary for this are in place, but no default mime
922 975 renderers added; so inline images will only be available via extensions. We will
923 976 progressively enable these features by default in the next few releases, and
924 977 contribution is welcomed.
925 978
926 979 We welcome any feedback on the API. See :ref:`shell_mimerenderer` for more
927 980 informations.
928 981
929 982 This is originally based on work form in :ghpull:`10610` from @stephanh42
930 983 started over two years ago, and still a lot need to be done.
931 984
932 985 MISC
933 986 ----
934 987
935 988 - Completions can define their own ordering :ghpull:`11855`
936 989 - Enable Plotting in the same cell than the one that import matplotlib
937 990 :ghpull:`11916`
938 991 - Allow to store and restore multiple variables at once :ghpull:`11930`
939 992
940 993 You can see `all pull-requests <https://github.com/ipython/ipython/pulls?q=is%3Apr+milestone%3A7.10+is%3Aclosed>`_ for this release.
941 994
942 995 API Changes
943 996 -----------
944 997
945 998 Change of API and exposed objects automatically detected using `frappuccino <https://pypi.org/project/frappuccino/>`_ (still in beta):
946 999
947 1000 The following items are new in IPython 7.10::
948 1001
949 1002 + IPython.terminal.shortcuts.reformat_text_before_cursor(buffer, document, shell)
950 1003 + IPython.terminal.interactiveshell.PTK3
951 1004 + IPython.terminal.interactiveshell.black_reformat_handler(text_before_cursor)
952 1005 + IPython.terminal.prompts.RichPromptDisplayHook.write_format_data(self, format_dict, md_dict='None')
953 1006
954 1007 The following items have been removed in 7.10::
955 1008
956 1009 - IPython.lib.pretty.DICT_IS_ORDERED
957 1010
958 1011 The following signatures differ between versions::
959 1012
960 1013 - IPython.extensions.storemagic.restore_aliases(ip)
961 1014 + IPython.extensions.storemagic.restore_aliases(ip, alias='None')
962 1015
963 1016 Special Thanks
964 1017 --------------
965 1018
966 1019 - @stephanh42 who started the work on inline images in terminal 2 years ago
967 1020 - @augustogoulart who spent a lot of time triaging issues and responding to
968 1021 users.
969 1022 - @con-f-use who is my (@Carreau) first sponsor on GitHub, as a reminder if you
970 1023 like IPython, Jupyter and many other library of the SciPy stack you can
971 1024 donate to numfocus.org non profit
972 1025
973 1026 .. _version 790:
974 1027
975 1028 IPython 7.9.0
976 1029 =============
977 1030
978 1031 IPython 7.9 is a small release with a couple of improvement and bug fixes.
979 1032
980 1033 - Xterm terminal title should be restored on exit :ghpull:`11910`
981 1034 - special variables ``_``,``__``, ``___`` are not set anymore when cache size
982 1035 is 0 or less. :ghpull:`11877`
983 1036 - Autoreload should have regained some speed by using a new heuristic logic to
984 1037 find all objects needing reload. This should avoid large objects traversal
985 1038 like pandas dataframes. :ghpull:`11876`
986 1039 - Get ready for Python 4. :ghpull:`11874`
987 1040 - `%env` Magic now has heuristic to hide potentially sensitive values :ghpull:`11896`
988 1041
989 1042 This is a small release despite a number of Pull Request Pending that need to
990 1043 be reviewed/worked on. Many of the core developers have been busy outside of
991 1044 IPython/Jupyter and we thanks all contributor for their patience; we'll work on
992 1045 these as soon as we have time.
993 1046
994 1047
995 1048 .. _version780:
996 1049
997 1050 IPython 7.8.0
998 1051 =============
999 1052
1000 1053 IPython 7.8.0 contain a few bugfix and 2 new APIs:
1001 1054
1002 1055 - Enable changing the font color for LaTeX rendering :ghpull:`11840`
1003 1056 - and Re-Expose some PDB API (see below)
1004 1057
1005 1058 Expose Pdb API
1006 1059 --------------
1007 1060
1008 1061 Expose the built-in ``pdb.Pdb`` API. ``Pdb`` constructor arguments are generically
1009 1062 exposed, regardless of python version.
1010 1063 Newly exposed arguments:
1011 1064
1012 1065 - ``skip`` - Python 3.1+
1013 1066 - ``nosiginnt`` - Python 3.2+
1014 1067 - ``readrc`` - Python 3.6+
1015 1068
1016 1069 Try it out::
1017 1070
1018 1071 from IPython.terminal.debugger import TerminalPdb
1019 1072 pdb = TerminalPdb(skip=["skipthismodule"])
1020 1073
1021 1074
1022 1075 See :ghpull:`11840`
1023 1076
1024 1077 .. _version770:
1025 1078
1026 1079 IPython 7.7.0
1027 1080 =============
1028 1081
1029 1082 IPython 7.7.0 contain multiple bug fixes and documentation updates; Here are a
1030 1083 few of the outstanding issue fixed:
1031 1084
1032 1085 - Fix a bug introduced in 7.6 where the ``%matplotlib`` magic would fail on
1033 1086 previously acceptable arguments :ghpull:`11814`.
1034 1087 - Fix the manage location on freebsd :ghpull:`11808`.
1035 1088 - Fix error message about aliases after ``%reset`` call in ipykernel
1036 1089 :ghpull:`11806`
1037 1090 - Fix Duplication completions in emacs :ghpull:`11803`
1038 1091
1039 1092 We are planning to adopt `NEP29 <https://github.com/numpy/numpy/pull/14086>`_
1040 1093 (still currently in draft) which may make this minor version of IPython the
1041 1094 last one to support Python 3.5 and will make the code base more aggressive
1042 1095 toward removing compatibility with older versions of Python.
1043 1096
1044 1097 GitHub now support to give only "Triage" permissions to users; if you'd like to
1045 1098 help close stale issues and labels issues please reach to us with your GitHub
1046 1099 Username and we'll add you to the triage team. It is a great way to start
1047 1100 contributing and a path toward getting commit rights.
1048 1101
1049 1102 .. _version761:
1050 1103
1051 1104 IPython 7.6.1
1052 1105 =============
1053 1106
1054 1107 IPython 7.6.1 contain a critical bugfix in the ``%timeit`` magic, which would
1055 1108 crash on some inputs as a side effect of :ghpull:`11716`. See :ghpull:`11812`
1056 1109
1057 1110
1058 1111 .. _whatsnew760:
1059 1112
1060 1113 IPython 7.6.0
1061 1114 =============
1062 1115
1063 1116 IPython 7.6.0 contains a couple of bug fixes and number of small features
1064 1117 additions as well as some compatibility with the current development version of
1065 1118 Python 3.8.
1066 1119
1067 1120 - Add a ``-l`` option to :magic:`psearch` to list the available search
1068 1121 types. :ghpull:`11672`
1069 1122 - Support ``PathLike`` for ``DisplayObject`` and ``Image``. :ghpull:`11764`
1070 1123 - Configurability of timeout in the test suite for slow platforms.
1071 1124 :ghpull:`11756`
1072 1125 - Accept any casing for matplotlib backend. :ghpull:`121748`
1073 1126 - Properly skip test that requires numpy to be installed :ghpull:`11723`
1074 1127 - More support for Python 3.8 and positional only arguments (pep570)
1075 1128 :ghpull:`11720`
1076 1129 - Unicode names for the completion are loaded lazily on first use which
1077 1130 should decrease startup time. :ghpull:`11693`
1078 1131 - Autoreload now update the types of reloaded objects; this for example allow
1079 1132 pickling of reloaded objects. :ghpull:`11644`
1080 1133 - Fix a bug where ``%%time`` magic would suppress cell output. :ghpull:`11716`
1081 1134
1082 1135
1083 1136 Prepare migration to pytest (instead of nose) for testing
1084 1137 ---------------------------------------------------------
1085 1138
1086 1139 Most of the work between 7.5 and 7.6 was to prepare the migration from our
1087 1140 testing framework to pytest. Most of the test suite should now work by simply
1088 1141 issuing ``pytest`` from the root of the repository.
1089 1142
1090 1143 The migration to pytest is just at its beginning. Many of our test still rely
1091 1144 on IPython-specific plugins for nose using pytest (doctest using IPython syntax
1092 1145 is one example of this where test appear as "passing", while no code has been
1093 1146 ran). Many test also need to be updated like ``yield-test`` to be properly
1094 1147 parametrized tests.
1095 1148
1096 1149 Migration to pytest allowed me to discover a number of issues in our test
1097 1150 suite; which was hiding a number of subtle issues – or not actually running
1098 1151 some of the tests in our test suite – I have thus corrected many of those; like
1099 1152 improperly closed resources; or used of deprecated features. I also made use of
1100 1153 the ``pytest --durations=...`` to find some of our slowest test and speed them
1101 1154 up (our test suite can now be up to 10% faster). Pytest as also a variety of
1102 1155 plugins and flags which will make the code quality of IPython and the testing
1103 1156 experience better.
1104 1157
1105 1158 Misc
1106 1159 ----
1107 1160
1108 1161 We skipped the release of 7.6 at the end of May, but will attempt to get back
1109 1162 on schedule. We are starting to think about making introducing backward
1110 1163 incompatible change and start the 8.0 series.
1111 1164
1112 1165 Special Thanks to Gabriel (@gpotter2 on GitHub), who among other took care many
1113 1166 of the remaining task for 7.4 and 7.5, like updating the website.
1114 1167
1115 1168 .. _whatsnew750:
1116 1169
1117 1170 IPython 7.5.0
1118 1171 =============
1119 1172
1120 1173 IPython 7.5.0 consist mostly of bug-fixes, and documentation updates, with one
1121 1174 minor new feature. The `Audio` display element can now be assigned an element
1122 1175 id when displayed in browser. See :ghpull:`11670`
1123 1176
1124 1177 The major outstanding bug fix correct a change of behavior that was introduce
1125 1178 in 7.4.0 where some cell magics would not be able to access or modify global
1126 1179 scope when using the ``@needs_local_scope`` decorator. This was typically
1127 1180 encountered with the ``%%time`` and ``%%timeit`` magics. See :ghissue:`11659`
1128 1181 and :ghpull:`11698`.
1129 1182
1130 1183 .. _whatsnew740:
1131 1184
1132 1185 IPython 7.4.0
1133 1186 =============
1134 1187
1135 1188 Unicode name completions
1136 1189 ------------------------
1137 1190
1138 1191 Previously, we provided completion for a unicode name with its relative symbol.
1139 1192 With this, now IPython provides complete suggestions to unicode name symbols.
1140 1193
1141 1194 As on the PR, if user types ``\LAT<tab>``, IPython provides a list of
1142 1195 possible completions. In this case, it would be something like::
1143 1196
1144 1197 'LATIN CAPITAL LETTER A',
1145 1198 'LATIN CAPITAL LETTER B',
1146 1199 'LATIN CAPITAL LETTER C',
1147 1200 'LATIN CAPITAL LETTER D',
1148 1201 ....
1149 1202
1150 1203 This help to type unicode character that do not have short latex aliases, and
1151 1204 have long unicode names. for example ``Ͱ``, ``\GREEK CAPITAL LETTER HETA``.
1152 1205
1153 1206 This feature was contributed by Luciana Marques :ghpull:`11583`.
1154 1207
1155 1208 Make audio normalization optional
1156 1209 ---------------------------------
1157 1210
1158 1211 Added 'normalize' argument to `IPython.display.Audio`. This argument applies
1159 1212 when audio data is given as an array of samples. The default of `normalize=True`
1160 1213 preserves prior behavior of normalizing the audio to the maximum possible range.
1161 1214 Setting to `False` disables normalization.
1162 1215
1163 1216
1164 1217 Miscellaneous
1165 1218 -------------
1166 1219
1167 1220 - Fix improper acceptation of ``return`` outside of functions. :ghpull:`11641`.
1168 1221 - Fixed PyQt 5.11 backwards incompatibility causing sip import failure.
1169 1222 :ghpull:`11613`.
1170 1223 - Fix Bug where ``type?`` would crash IPython. :ghpull:`1608`.
1171 1224 - Allow to apply ``@needs_local_scope`` to cell magics for convenience.
1172 1225 :ghpull:`11542`.
1173 1226
1174 1227 .. _whatsnew730:
1175 1228
1176 1229 IPython 7.3.0
1177 1230 =============
1178 1231
1179 1232 .. _whatsnew720:
1180 1233
1181 1234 IPython 7.3.0 bring several bug fixes and small improvements that you will
1182 1235 described bellow.
1183 1236
1184 1237 The biggest change to this release is the implementation of the ``%conda`` and
1185 1238 ``%pip`` magics, that will attempt to install packages in the **current
1186 1239 environment**. You may still need to restart your interpreter or kernel for the
1187 1240 change to be taken into account, but it should simplify installation of packages
1188 1241 into remote environment. Installing using pip/conda from the command line is
1189 1242 still the prefer method.
1190 1243
1191 1244 The ``%pip`` magic was already present, but was only printing a warning; now it
1192 1245 will actually forward commands to pip.
1193 1246
1194 1247 Misc bug fixes and improvements:
1195 1248
1196 1249 - Compatibility with Python 3.8.
1197 1250 - Do not expand shell variable in execution magics, and added the
1198 1251 ``no_var_expand`` decorator for magic requiring a similar functionality
1199 1252 :ghpull:`11516`
1200 1253 - Add ``%pip`` and ``%conda`` magic :ghpull:`11524`
1201 1254 - Re-initialize posix aliases after a ``%reset`` :ghpull:`11528`
1202 1255 - Allow the IPython command line to run ``*.ipynb`` files :ghpull:`11529`
1203 1256
1204 1257 IPython 7.2.0
1205 1258 =============
1206 1259
1207 1260 IPython 7.2.0 brings minor bugfixes, improvements, and new configuration options:
1208 1261
1209 1262 - Fix a bug preventing PySide2 GUI integration from working :ghpull:`11464`
1210 1263 - Run CI on Mac OS ! :ghpull:`11471`
1211 1264 - Fix IPython "Demo" mode. :ghpull:`11498`
1212 1265 - Fix ``%run`` magic with path in name :ghpull:`11499`
1213 1266 - Fix: add CWD to sys.path *after* stdlib :ghpull:`11502`
1214 1267 - Better rendering of signatures, especially long ones. :ghpull:`11505`
1215 1268 - Re-enable jedi by default if it's installed :ghpull:`11506`
1216 1269 - Add New ``minimal`` exception reporting mode (useful for educational purpose). See :ghpull:`11509`
1217 1270
1218 1271
1219 1272 Added ability to show subclasses when using pinfo and other utilities
1220 1273 ---------------------------------------------------------------------
1221 1274
1222 1275 When using ``?``/``??`` on a class, IPython will now list the first 10 subclasses.
1223 1276
1224 1277 Special Thanks to Chris Mentzel of the Moore Foundation for this feature. Chris
1225 1278 is one of the people who played a critical role in IPython/Jupyter getting
1226 1279 funding.
1227 1280
1228 1281 We are grateful for all the help Chris has given us over the years,
1229 1282 and we're now proud to have code contributed by Chris in IPython.
1230 1283
1231 1284 OSMagics.cd_force_quiet configuration option
1232 1285 --------------------------------------------
1233 1286
1234 1287 You can set this option to force the %cd magic to behave as if ``-q`` was passed:
1235 1288 ::
1236 1289
1237 1290 In [1]: cd /
1238 1291 /
1239 1292
1240 1293 In [2]: %config OSMagics.cd_force_quiet = True
1241 1294
1242 1295 In [3]: cd /tmp
1243 1296
1244 1297 In [4]:
1245 1298
1246 1299 See :ghpull:`11491`
1247 1300
1248 1301 In vi editing mode, whether the prompt includes the current vi mode can now be configured
1249 1302 -----------------------------------------------------------------------------------------
1250 1303
1251 1304 Set the ``TerminalInteractiveShell.prompt_includes_vi_mode`` to a boolean value
1252 1305 (default: True) to control this feature. See :ghpull:`11492`
1253 1306
1254 1307 .. _whatsnew710:
1255 1308
1256 1309 IPython 7.1.0
1257 1310 =============
1258 1311
1259 1312 IPython 7.1.0 is the first minor release after 7.0.0 and mostly brings fixes to
1260 1313 new features, internal refactoring, and fixes for regressions that happened during the 6.x->7.x
1261 1314 transition. It also brings **Compatibility with Python 3.7.1**, as we're
1262 1315 unwillingly relying on a bug in CPython.
1263 1316
1264 1317 New Core Dev:
1265 1318
1266 1319 - We welcome Jonathan Slenders to the commiters. Jonathan has done a fantastic
1267 1320 work on prompt_toolkit, and we'd like to recognise his impact by giving him
1268 1321 commit rights. :ghissue:`11397`
1269 1322
1270 1323 Notable Changes
1271 1324
1272 1325 - Major update of "latex to unicode" tab completion map (see below)
1273 1326
1274 1327 Notable New Features:
1275 1328
1276 1329 - Restore functionality and documentation of the **sphinx directive**, which
1277 1330 is now stricter (fail on error by daefault), has new configuration options,
1278 1331 has a brand new documentation page :ref:`ipython_directive` (which needs
1279 1332 some cleanup). It is also now *tested* so we hope to have less regressions.
1280 1333 :ghpull:`11402`
1281 1334
1282 1335 - ``IPython.display.Video`` now supports ``width`` and ``height`` arguments,
1283 1336 allowing a custom width and height to be set instead of using the video's
1284 1337 width and height. :ghpull:`11353`
1285 1338
1286 1339 - Warn when using ``HTML('<iframe>')`` instead of ``IFrame`` :ghpull:`11350`
1287 1340
1288 1341 - Allow Dynamic switching of editing mode between vi/emacs and show
1289 1342 normal/input mode in prompt when using vi. :ghpull:`11390`. Use ``%config
1290 1343 TerminalInteractiveShell.editing_mode = 'vi'`` or ``%config
1291 1344 TerminalInteractiveShell.editing_mode = 'emacs'`` to dynamically switch
1292 1345 between modes.
1293 1346
1294 1347
1295 1348 Notable Fixes:
1296 1349
1297 1350 - Fix entering of **multi-line blocks in terminal** IPython, and various
1298 1351 crashes in the new input transformation machinery :ghpull:`11354`,
1299 1352 :ghpull:`11356`, :ghpull:`11358`. These also fix a **Compatibility bug
1300 1353 with Python 3.7.1**.
1301 1354
1302 1355 - Fix moving through generator stack in ipdb :ghpull:`11266`
1303 1356
1304 1357 - %Magic command arguments now support quoting. :ghpull:`11330`
1305 1358
1306 1359 - Re-add ``rprint`` and ``rprinte`` aliases. :ghpull:`11331`
1307 1360
1308 1361 - Remove implicit dependency on ``ipython_genutils`` :ghpull:`11317`
1309 1362
1310 1363 - Make ``nonlocal`` raise ``SyntaxError`` instead of silently failing in async
1311 1364 mode. :ghpull:`11382`
1312 1365
1313 1366 - Fix mishandling of magics and ``= !`` assignment just after a dedent in
1314 1367 nested code blocks :ghpull:`11418`
1315 1368
1316 1369 - Fix instructions for custom shortcuts :ghpull:`11426`
1317 1370
1318 1371
1319 1372 Notable Internals improvements:
1320 1373
1321 1374 - Use of ``os.scandir`` (Python 3 only) to speed up some file system operations.
1322 1375 :ghpull:`11365`
1323 1376
1324 1377 - use ``perf_counter`` instead of ``clock`` for more precise
1325 1378 timing results with ``%time`` :ghpull:`11376`
1326 1379
1327 1380 Many thanks to all the contributors and in particular to ``bartskowron`` and
1328 1381 ``tonyfast`` who handled some pretty complicated bugs in the input machinery. We
1329 1382 had a number of first time contributors and maybe hacktoberfest participants that
1330 1383 made significant contributions and helped us free some time to focus on more
1331 1384 complicated bugs.
1332 1385
1333 1386 You
1334 1387 can see all the closed issues and Merged PR, new features and fixes `here
1335 1388 <https://github.com/ipython/ipython/issues?utf8=%E2%9C%93&q=+is%3Aclosed+milestone%3A7.1+>`_.
1336 1389
1337 1390 Unicode Completion update
1338 1391 -------------------------
1339 1392
1340 1393 In IPython 7.1 the Unicode completion map has been updated and synchronized with
1341 1394 the Julia language.
1342 1395
1343 1396 Added and removed character characters:
1344 1397
1345 1398 ``\jmath`` (``ȷ``), ``\\underleftrightarrow`` (U+034D, combining) have been
1346 1399 added, while ``\\textasciicaron`` have been removed
1347 1400
1348 1401 Some sequences have seen their prefix removed:
1349 1402
1350 1403 - 6 characters ``\text...<tab>`` should now be inputed with ``\...<tab>`` directly,
1351 1404 - 45 characters ``\Elz...<tab>`` should now be inputed with ``\...<tab>`` directly,
1352 1405 - 65 characters ``\B...<tab>`` should now be inputed with ``\...<tab>`` directly,
1353 1406 - 450 characters ``\m...<tab>`` should now be inputed with ``\...<tab>`` directly,
1354 1407
1355 1408 Some sequences have seen their prefix shortened:
1356 1409
1357 1410 - 5 characters ``\mitBbb...<tab>`` should now be inputed with ``\bbi...<tab>`` directly,
1358 1411 - 52 characters ``\mit...<tab>`` should now be inputed with ``\i...<tab>`` directly,
1359 1412 - 216 characters ``\mbfit...<tab>`` should now be inputed with ``\bi...<tab>`` directly,
1360 1413 - 222 characters ``\mbf...<tab>`` should now be inputed with ``\b...<tab>`` directly,
1361 1414
1362 1415 A couple of characters had their sequence simplified:
1363 1416
1364 1417 - ``ð``, type ``\dh<tab>``, instead of ``\eth<tab>``
1365 1418 - ``ħ``, type ``\hbar<tab>``, instead of ``\Elzxh<tab>``
1366 1419 - ``ɸ``, type ``\ltphi<tab>``, instead of ``\textphi<tab>``
1367 1420 - ``ϴ``, type ``\varTheta<tab>``, instead of ``\textTheta<tab>``
1368 1421 - ``ℇ``, type ``\eulermascheroni<tab>``, instead of ``\Eulerconst<tab>``
1369 1422 - ``ℎ``, type ``\planck<tab>``, instead of ``\Planckconst<tab>``
1370 1423
1371 1424 - U+0336 (COMBINING LONG STROKE OVERLAY), type ``\strike<tab>``, instead of ``\Elzbar<tab>``.
1372 1425
1373 1426 A couple of sequences have been updated:
1374 1427
1375 1428 - ``\varepsilon`` now gives ``ɛ`` (GREEK SMALL LETTER EPSILON) instead of ``ε`` (GREEK LUNATE EPSILON SYMBOL),
1376 1429 - ``\underbar`` now gives U+0331 (COMBINING MACRON BELOW) instead of U+0332 (COMBINING LOW LINE).
1377 1430
1378 1431
1379 1432 .. _whatsnew700:
1380 1433
1381 1434 IPython 7.0.0
1382 1435 =============
1383 1436
1384 1437 Released Thursday September 27th, 2018
1385 1438
1386 1439 IPython 7 includes major feature improvements.
1387 1440 This is also the second major version of IPython to support only
1388 1441 Python 3 – starting at Python 3.4. Python 2 is still community-supported
1389 1442 on the bugfix only 5.x branch, but we remind you that Python 2 "end of life"
1390 1443 is on Jan 1st 2020.
1391 1444
1392 1445 We were able to backport bug fixes to the 5.x branch thanks to our backport bot which
1393 1446 backported more than `70 Pull-Requests
1394 1447 <https://github.com/ipython/ipython/pulls?page=3&q=is%3Apr+sort%3Aupdated-desc+author%3Aapp%2Fmeeseeksdev++5.x&utf8=%E2%9C%93>`_, but there are still many PRs that required manual work. This is an area of the project where you can easily contribute by looking for `PRs that still need manual backport <https://github.com/ipython/ipython/issues?q=label%3A%22Still+Needs+Manual+Backport%22+is%3Aclosed+sort%3Aupdated-desc>`_
1395 1448
1396 1449 The IPython 6.x branch will likely not see any further release unless critical
1397 1450 bugs are found.
1398 1451
1399 1452 Make sure you have pip > 9.0 before upgrading. You should be able to update by running:
1400 1453
1401 1454 .. code::
1402 1455
1403 1456 pip install ipython --upgrade
1404 1457
1405 1458 .. only:: ipydev
1406 1459
1407 1460 If you are trying to install or update an ``alpha``, ``beta``, or ``rc``
1408 1461 version, use pip ``--pre`` flag.
1409 1462
1410 1463 .. code::
1411 1464
1412 1465 pip install ipython --upgrade --pre
1413 1466
1414 1467
1415 1468 Or, if you have conda installed:
1416 1469
1417 1470 .. code::
1418 1471
1419 1472 conda install ipython
1420 1473
1421 1474
1422 1475
1423 1476 Prompt Toolkit 2.0
1424 1477 ------------------
1425 1478
1426 1479 IPython 7.0+ now uses ``prompt_toolkit 2.0``. If you still need to use an earlier
1427 1480 ``prompt_toolkit`` version, you may need to pin IPython to ``<7.0``.
1428 1481
1429 1482 Autowait: Asynchronous REPL
1430 1483 ---------------------------
1431 1484
1432 1485 Staring with IPython 7.0 on Python 3.6+, IPython can automatically ``await``
1433 1486 top level code. You should not need to access an event loop or runner
1434 1487 yourself. To learn more, read the :ref:`autoawait` section of our docs, see
1435 1488 :ghpull:`11265`, or try the following code::
1436 1489
1437 1490 Python 3.6.0
1438 1491 Type 'copyright', 'credits' or 'license' for more information
1439 1492 IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help.
1440 1493
1441 1494 In [1]: import aiohttp
1442 1495 ...: result = aiohttp.get('https://api.github.com')
1443 1496
1444 1497 In [2]: response = await result
1445 1498 <pause for a few 100s ms>
1446 1499
1447 1500 In [3]: await response.json()
1448 1501 Out[3]:
1449 1502 {'authorizations_url': 'https://api.github.com/authorizations',
1450 1503 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}',
1451 1504 ...
1452 1505 }
1453 1506
1454 1507 .. note::
1455 1508
1456 1509 Async integration is experimental code, behavior may change or be removed
1457 1510 between Python and IPython versions without warnings.
1458 1511
1459 1512 Integration is by default with `asyncio`, but other libraries can be configured --
1460 1513 like ``curio`` or ``trio`` -- to improve concurrency in the REPL::
1461 1514
1462 1515 In [1]: %autoawait trio
1463 1516
1464 1517 In [2]: import trio
1465 1518
1466 1519 In [3]: async def child(i):
1467 1520 ...: print(" child %s goes to sleep"%i)
1468 1521 ...: await trio.sleep(2)
1469 1522 ...: print(" child %s wakes up"%i)
1470 1523
1471 1524 In [4]: print('parent start')
1472 1525 ...: async with trio.open_nursery() as n:
1473 1526 ...: for i in range(3):
1474 1527 ...: n.spawn(child, i)
1475 1528 ...: print('parent end')
1476 1529 parent start
1477 1530 child 2 goes to sleep
1478 1531 child 0 goes to sleep
1479 1532 child 1 goes to sleep
1480 1533 <about 2 seconds pause>
1481 1534 child 2 wakes up
1482 1535 child 1 wakes up
1483 1536 child 0 wakes up
1484 1537 parent end
1485 1538
1486 1539 See :ref:`autoawait` for more information.
1487 1540
1488 1541
1489 1542 Asynchronous code in a Notebook interface or any other frontend using the
1490 1543 Jupyter Protocol will require further updates to the IPykernel package.
1491 1544
1492 1545 Non-Asynchronous code
1493 1546 ~~~~~~~~~~~~~~~~~~~~~
1494 1547
1495 1548 As the internal API of IPython is now asynchronous, IPython needs to run under
1496 1549 an event loop. In order to allow many workflows, (like using the :magic:`%run`
1497 1550 magic, or copy-pasting code that explicitly starts/stop event loop), when
1498 1551 top-level code is detected as not being asynchronous, IPython code is advanced
1499 1552 via a pseudo-synchronous runner, and may not advance pending tasks.
1500 1553
1501 1554 Change to Nested Embed
1502 1555 ~~~~~~~~~~~~~~~~~~~~~~
1503 1556
1504 1557 The introduction of the ability to run async code had some effect on the
1505 1558 ``IPython.embed()`` API. By default, embed will not allow you to run asynchronous
1506 1559 code unless an event loop is specified.
1507 1560
1508 1561 Effects on Magics
1509 1562 ~~~~~~~~~~~~~~~~~
1510 1563
1511 1564 Some magics will not work with async until they're updated.
1512 1565 Contributions welcome.
1513 1566
1514 1567 Expected Future changes
1515 1568 ~~~~~~~~~~~~~~~~~~~~~~~
1516 1569
1517 1570 We expect more internal but public IPython functions to become ``async``, and
1518 1571 will likely end up having a persistent event loop while IPython is running.
1519 1572
1520 1573 Thanks
1521 1574 ~~~~~~
1522 1575
1523 1576 This release took more than a year in the making.
1524 1577 The code was rebased a number of
1525 1578 times; leading to commit authorship that may have been lost in the final
1526 1579 Pull-Request. Huge thanks to many people for contribution, discussion, code,
1527 1580 documentation, use-cases: dalejung, danielballan, ellisonbg, fperez, gnestor,
1528 1581 minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many others.
1529 1582
1530 1583
1531 1584 Autoreload Improvement
1532 1585 ----------------------
1533 1586
1534 1587 The magic :magic:`%autoreload 2 <autoreload>` now captures new methods added to
1535 1588 classes. Earlier, only methods existing as of the initial import were being
1536 1589 tracked and updated.
1537 1590
1538 1591 This new feature helps dual environment development - Jupyter+IDE - where the
1539 1592 code gradually moves from notebook cells to package files as it gets
1540 1593 structured.
1541 1594
1542 1595 **Example**: An instance of the class ``MyClass`` will be able to access the
1543 1596 method ``cube()`` after it is uncommented and the file ``file1.py`` is saved on
1544 1597 disk.
1545 1598
1546 1599
1547 1600 .. code::
1548 1601
1549 1602 # notebook
1550 1603
1551 1604 from mymodule import MyClass
1552 1605 first = MyClass(5)
1553 1606
1554 1607 .. code::
1555 1608
1556 1609 # mymodule/file1.py
1557 1610
1558 1611 class MyClass:
1559 1612
1560 1613 def __init__(self, a=10):
1561 1614 self.a = a
1562 1615
1563 1616 def square(self):
1564 1617 print('compute square')
1565 1618 return self.a*self.a
1566 1619
1567 1620 # def cube(self):
1568 1621 # print('compute cube')
1569 1622 # return self.a*self.a*self.a
1570 1623
1571 1624
1572 1625
1573 1626
1574 1627 Misc
1575 1628 ----
1576 1629
1577 1630 The autoindent feature that was deprecated in 5.x was re-enabled and
1578 1631 un-deprecated in :ghpull:`11257`
1579 1632
1580 1633 Make :magic:`%run -n -i ... <run>` work correctly. Earlier, if :magic:`%run` was
1581 1634 passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308`
1582 1635
1583 1636
1584 1637 The :cellmagic:`%%script` (as well as :cellmagic:`%%bash`,
1585 1638 :cellmagic:`%%ruby`... ) cell magics now raise by default if the return code of
1586 1639 the given code is non-zero (thus halting execution of further cells in a
1587 1640 notebook). The behavior can be disable by passing the ``--no-raise-error`` flag.
1588 1641
1589 1642
1590 1643 Deprecations
1591 1644 ------------
1592 1645
1593 1646 A couple of unused functions and methods have been deprecated and will be removed
1594 1647 in future versions:
1595 1648
1596 1649 - ``IPython.utils.io.raw_print_err``
1597 1650 - ``IPython.utils.io.raw_print``
1598 1651
1599 1652
1600 1653 Backwards incompatible changes
1601 1654 ------------------------------
1602 1655
1603 1656 * The API for transforming input before it is parsed as Python code has been
1604 1657 completely redesigned: any custom input transformations will need to be
1605 1658 rewritten. See :doc:`/config/inputtransforms` for details of the new API.
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now