Debian Codegraph @

docs/source/whatsnew/version7.rst

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