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