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