##// END OF EJS Templates
Backport PR #13335: What's new 7.16.2
Matthias Bussonnier -
Show More
@@ -1,1066 +1,1079 b''
1 1 ============
2 2 7.x Series
3 3 ============
4 4
5 5 .. _version 716:
6 6
7 IPython 7.16.1, 7.16.2
8 ======================
9
10 IPython 7.16.1 was release immediately after 7.16.0 to fix a conda packaging issue.
11 The source is identical to 7.16.0 but the file permissions in the tar are different.
12
13 IPython 7.16.2 pins jedi dependency to "<=0.17.2" which should prevent some
14 issues for users still on python 3.6. This may not be sufficient as pip may
15 still allow to downgrade IPython.
16
17 Compatibility with Jedi > 0.17.2 was not added as this would have meant bumping
18 the minimal version to >0.16.
19
7 20 IPython 7.16
8 21 ============
9 22
10 23
11 24 The default traceback mode will now skip frames that are marked with
12 25 ``__tracebackhide__ = True`` and show how many traceback frames have been
13 26 skipped. This can be toggled by using :magic:`xmode` with the ``--show`` or
14 27 ``--hide`` attribute. It will have no effect on non verbose traceback modes.
15 28
16 29 The ipython debugger also now understands ``__tracebackhide__`` as well and will
17 30 skip hidden frames when displaying. Movement up and down the stack will skip the
18 31 hidden frames and will show how many frames were hidden. Internal IPython frames
19 32 are also now hidden by default. The behavior can be changed with the
20 33 ``skip_hidden`` while in the debugger, command and accepts "yes", "no", "true"
21 34 and "false" case insensitive parameters.
22 35
23 36
24 37 Misc Noticeable changes:
25 38 ------------------------
26 39
27 40 - Exceptions are now (re)raised when running notebooks via the :magic:`%run`, helping to catch issues in workflows and
28 41 pipelines. :ghpull:`12301`
29 42 - Fix inputhook for qt 5.15.0 :ghpull:`12355`
30 43 - Fix wx inputhook :ghpull:`12375`
31 44 - Add handling for malformed pathext env var (Windows) :ghpull:`12367`
32 45 - use $SHELL in system_piped :ghpull:`12360` for uniform behavior with
33 46 ipykernel.
34 47
35 48 Reproducible Build
36 49 ------------------
37 50
38 51 IPython 7.15 reproducible build did not work, so we try again this month
39 52 :ghpull:`12358`.
40 53
41 54
42 55 API Changes
43 56 -----------
44 57
45 58 Change of API and exposed objects automatically detected using `frappuccino
46 59 <https://pypi.org/project/frappuccino/>`_ (still in beta):
47 60
48 61
49 62 The following items are new and mostly related to understanding ``__tracebackbhide__``::
50 63
51 64 + IPython.core.debugger.Pdb.do_down(self, arg)
52 65 + IPython.core.debugger.Pdb.do_skip_hidden(self, arg)
53 66 + IPython.core.debugger.Pdb.do_up(self, arg)
54 67 + IPython.core.debugger.Pdb.hidden_frames(self, stack)
55 68 + IPython.core.debugger.Pdb.stop_here(self, frame)
56 69
57 70
58 71 The following items have been removed::
59 72
60 73 - IPython.core.debugger.Pdb.new_do_down
61 74 - IPython.core.debugger.Pdb.new_do_up
62 75
63 76 Those were implementation details.
64 77
65 78
66 79 .. _version 715:
67 80
68 81 IPython 7.15
69 82 ============
70 83
71 84 IPython 7.15 brings a number of bug fixes and user facing improvements.
72 85
73 86 Misc Noticeable changes:
74 87 ------------------------
75 88
76 89 - Long completion name have better elision in terminal :ghpull:`12284`
77 90 - I've started to test on Python 3.9 :ghpull:`12307` and fix some errors.
78 91 - Hi DPI scaling of figures when using qt eventloop :ghpull:`12314`
79 92 - Document the ability to have systemwide configuration for IPython.
80 93 :ghpull:`12328`
81 94 - Fix issues with input autoformatting :ghpull:`12336`
82 95 - ``IPython.core.debugger.Pdb`` is now interruptible (:ghpull:`12168`, in 7.14
83 96 but forgotten in release notes)
84 97 - Video HTML attributes (:ghpull:`12212`, in 7.14 but forgotten in release
85 98 notes)
86 99
87 100 Reproducible Build
88 101 ------------------
89 102
90 103 Starting with IPython 7.15, I am attempting to provide reproducible builds,
91 104 that is to say you should be able from the source tree to generate an sdist
92 105 and wheel that are identical byte for byte with the publish version on PyPI.
93 106
94 107 I've only tested on a couple of machines so far and the process is relatively
95 108 straightforward, so this mean that IPython not only have a deterministic build
96 109 process, but also I have either removed, or put under control all effects of
97 110 the build environments on the final artifact. I encourage you to attempt the
98 111 build process on your machine as documented in :ref:`core_developer_guide`
99 112 and let me know if you do not obtain an identical artifact.
100 113
101 114 While reproducible builds is critical to check that the supply chain of (open
102 115 source) software has not been compromised, it can also help to speedup many
103 116 of the build processes in large environment (conda, apt...) by allowing
104 117 better caching of intermediate build steps.
105 118
106 119 Learn more on `<https://reproducible-builds.org/>`_. `Reflections on trusting
107 120 trust <https://dl.acm.org/doi/10.1145/358198.358210>`_ is also one of the
108 121 cornerstone and recommended reads on this subject.
109 122
110 123 .. note::
111 124
112 125 The build commit from which the sdist is generated is also `signed
113 126 <https://en.wikipedia.org/wiki/Digital_signature>`_, so you should be able to
114 127 check it has not been compromised, and the git repository is a `merkle-tree
115 128 <https://en.wikipedia.org/wiki/Merkle_tree>`_, you can check the consistency
116 129 with `git-fsck <https://git-scm.com/docs/git-fsck>`_ which you likely `want
117 130 to enable by default
118 131 <https://gist.github.com/mbbx6spp/14b86437e794bffb4120>`_.
119 132
120 133 NEP29: Last version to support Python 3.6
121 134 -----------------------------------------
122 135
123 136 IPython 7.15 will be the Last IPython version to officially support Python
124 137 3.6, as stated by `NumPy Enhancement Proposal 29
125 138 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_. Starting with
126 139 next minor version of IPython I may stop testing on Python 3.6 and may stop
127 140 publishing release artifacts that install on Python 3.6
128 141
129 142 Highlighted features
130 143 --------------------
131 144
132 145 Highlighted features are not new, but seem to not be widely known, this
133 146 section will help you discover in more narrative form what you can do with
134 147 IPython.
135 148
136 149 Increase Tab Completion Menu Height
137 150 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
138 151
139 152 In terminal IPython it is possible to increase the hight of the tab-completion
140 153 menu. To do so set the value of
141 154 :configtrait:`TerminalInteractiveShell.space_for_menu`, this will reserve more
142 155 space at the bottom of the screen for various kind of menus in IPython including
143 156 tab completion and searching in history.
144 157
145 158 Autoformat Code in the terminal
146 159 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
147 160
148 161 If you have a preferred code formatter, you can configure IPython to
149 162 reformat your code. Set the value of
150 163 :configtrait:`TerminalInteractiveShell.autoformatter` to for example ``'black'``
151 164 and IPython will auto format your code when possible.
152 165
153 166
154 167 .. _version 714:
155 168
156 169 IPython 7.14
157 170 ============
158 171
159 172 IPython 7.14 is a minor release that fix a couple of bugs and prepare
160 173 compatibility with new or future versions of some libraries.
161 174
162 175 Important changes:
163 176 ------------------
164 177
165 178 - Fix compatibility with Sphinx 3+ :ghpull:`12235`
166 179 - Remove deprecated matplotlib parameter usage, compatibility with matplotlib
167 180 3.3+ :`122250`
168 181
169 182 Misc Changes
170 183 ------------
171 184
172 185 - set ``.py`` extension when editing current buffer in vi/emacs. :ghpull:`12167`
173 186 - support for unicode identifiers in ``?``/``??`` :ghpull:`12208`
174 187 - add extra options to the ``Video`` Rich objects :ghpull:`12212`
175 188 - add pretty-printing to ``SimpleNamespace`` :ghpull:`12230`
176 189
177 190 IPython.core.debugger.Pdb is now interruptible
178 191 ----------------------------------------------
179 192
180 193 A ``KeyboardInterrupt`` will now interrupt IPython's extended debugger, in order to make Jupyter able to interrupt it. (:ghpull:`12168`)
181 194
182 195 Video HTML attributes
183 196 ---------------------
184 197
185 198 Add an option to `IPython.display.Video` to change the attributes of the HTML display of the video (:ghpull:`12212`)
186 199
187 200
188 201 Pending deprecated imports
189 202 --------------------------
190 203
191 204 Many object present in ``IPython.core.display`` are there for internal use only,
192 205 and should already been imported from ``IPython.display`` by users and external
193 206 libraries. Trying to import those from ``IPython.core.display`` is still possible
194 207 but will trigger a
195 208 deprecation warning in later versions of IPython and will become errors in the
196 209 future.
197 210
198 211 This will simplify compatibility with other Python kernels (like Xeus-Python),
199 212 and simplify code base.
200 213
201 214
202 215
203 216
204 217 .. _version 713:
205 218
206 219 IPython 7.13
207 220 ============
208 221
209 222 IPython 7.13 is the final release of the 7.x branch since master is diverging
210 223 toward an 8.0. Exiting new features have already been merged in 8.0 and will
211 224 not be available on the 7.x branch. All the changes below have been backported
212 225 from the master branch.
213 226
214 227
215 228 - Fix inability to run PDB when inside an event loop :ghpull:`12141`
216 229 - Fix ability to interrupt some processes on windows :ghpull:`12137`
217 230 - Fix debugger shortcuts :ghpull:`12132`
218 231 - improve tab completion when inside a string by removing irrelevant elements :ghpull:`12128`
219 232 - Fix display of filename tab completion when the path is long :ghpull:`12122`
220 233 - Many removal of Python 2 specific code path :ghpull:`12110`
221 234 - displaying wav files do not require NumPy anymore, and is 5x to 30x faster :ghpull:`12113`
222 235
223 236 See the list of all closed issues and pull request on `github
224 237 <https://github.com/ipython/ipython/pulls?q=is%3Aclosed+milestone%3A7.13>`_.
225 238
226 239 .. _version 712:
227 240
228 241 IPython 7.12
229 242 ============
230 243
231 244 IPython 7.12 is a minor update that mostly brings code cleanup, removal of
232 245 longtime deprecated function and a couple update to documentation cleanup as well.
233 246
234 247 Notable changes are the following:
235 248
236 249 - Exit non-zero when ipython is given a file path to run that doesn't exist :ghpull:`12074`
237 250 - Test PR on ARM64 with Travis-CI :ghpull:`12073`
238 251 - Update CI to work with latest Pytest :ghpull:`12086`
239 252 - Add infrastructure to run ipykernel eventloop via trio :ghpull:`12097`
240 253 - Support git blame ignore revs :ghpull:`12091`
241 254 - Start multi-line ``__repr__`` s on their own line :ghpull:`12099`
242 255
243 256 .. _version 7111:
244 257
245 258 IPython 7.11.1
246 259 ==============
247 260
248 261 A couple of deprecated functions (no-op) have been reintroduces in py3compat as
249 262 Cython was still relying on them, and will be removed in a couple of versions.
250 263
251 264 .. _version 711:
252 265
253 266 IPython 7.11
254 267 ============
255 268
256 269 IPython 7.11 received a couple of compatibility fixes and code cleanup.
257 270
258 271 A number of function in the ``py3compat`` have been removed; a number of types
259 272 in the IPython code base are now non-ambiguous and now always ``unicode``
260 273 instead of ``Union[Unicode,bytes]``; many of the relevant code path have thus
261 274 been simplified/cleaned and types annotation added.
262 275
263 276 IPython support several verbosity level from exceptions. ``xmode plain`` now
264 277 support chained exceptions. :ghpull:`11999`
265 278
266 279 We are starting to remove ``shell=True`` in some usages of subprocess. While not directly
267 280 a security issue (as IPython is made to run arbitrary code anyway) it is not good
268 281 practice and we'd like to show the example. :ghissue:`12023`. This discussion
269 282 was started by ``@mschwager`` thanks to a new auditing tool they are working on
270 283 with duo-labs (`dlint <https://github.com/duo-labs/dlint>`_).
271 284
272 285 Work around some bugs in Python 3.9 tokenizer :ghpull:`12057`
273 286
274 287 IPython will now print its version after a crash. :ghpull:`11986`
275 288
276 289 This is likely the last release from the 7.x series that will see new feature.
277 290 The master branch will soon accept large code changes and thrilling new
278 291 features; the 7.x branch will only start to accept critical bug fixes, and
279 292 update dependencies.
280 293
281 294 .. _version 7102:
282 295
283 296 IPython 7.10.2
284 297 ==============
285 298
286 299 IPython 7.10.2 fix a couple of extra incompatibility between IPython, ipdb,
287 300 asyncio and Prompt Toolkit 3.
288 301
289 302 .. _version 7101:
290 303
291 304 IPython 7.10.1
292 305 ==============
293 306
294 307 IPython 7.10.1 fix a couple of incompatibilities with Prompt toolkit 3 (please
295 308 update Prompt toolkit to 3.0.2 at least), and fixes some interaction with
296 309 headless IPython.
297 310
298 311 .. _version 7100:
299 312
300 313 IPython 7.10.0
301 314 ==============
302 315
303 316 IPython 7.10 is the first double digit minor release in the last decade, and
304 317 first since the release of IPython 1.0, previous double digit minor release was
305 318 in August 2009.
306 319
307 320 We've been trying to give you regular release on the last Friday of every month
308 321 for a guaranty of rapid access to bug fixes and new features.
309 322
310 323 Unlike the previous first few releases that have seen only a couple of code
311 324 changes, 7.10 bring a number of changes, new features and bugfixes.
312 325
313 326 Stop Support for Python 3.5 – Adopt NEP 29
314 327 ------------------------------------------
315 328
316 329 IPython has decided to follow the informational `NEP 29
317 330 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_ which layout a clear
318 331 policy as to which version of (C)Python and NumPy are supported.
319 332
320 333 We thus dropped support for Python 3.5, and cleaned up a number of code path
321 334 that were Python-version dependant. If you are on 3.5 or earlier pip should
322 335 automatically give you the latest compatible version of IPython so you do not
323 336 need to pin to a given version.
324 337
325 338 Support for Prompt Toolkit 3.0
326 339 ------------------------------
327 340
328 341 Prompt Toolkit 3.0 was release a week before IPython 7.10 and introduces a few
329 342 breaking changes. We believe IPython 7.10 should be compatible with both Prompt
330 343 Toolkit 2.x and 3.x, though it has not been extensively tested with 3.x so
331 344 please report any issues.
332 345
333 346
334 347 Prompt Rendering Performance improvements
335 348 -----------------------------------------
336 349
337 350 Pull Request :ghpull:`11933` introduced an optimisation in the prompt rendering
338 351 logic that should decrease the resource usage of IPython when using the
339 352 _default_ configuration but could potentially introduce a regression of
340 353 functionalities if you are using a custom prompt.
341 354
342 355 We know assume if you haven't changed the default keybindings that the prompt
343 356 **will not change** during the duration of your input – which is for example
344 357 not true when using vi insert mode that switches between `[ins]` and `[nor]`
345 358 for the current mode.
346 359
347 360 If you are experiencing any issue let us know.
348 361
349 362 Code autoformatting
350 363 -------------------
351 364
352 365 The IPython terminal can now auto format your code just before entering a new
353 366 line or executing a command. To do so use the
354 367 ``--TerminalInteractiveShell.autoformatter`` option and set it to ``'black'``;
355 368 if black is installed IPython will use black to format your code when possible.
356 369
357 370 IPython cannot always properly format your code; in particular it will
358 371 auto formatting with *black* will only work if:
359 372
360 373 - Your code does not contains magics or special python syntax.
361 374
362 375 - There is no code after your cursor.
363 376
364 377 The Black API is also still in motion; so this may not work with all versions of
365 378 black.
366 379
367 380 It should be possible to register custom formatter, though the API is till in
368 381 flux.
369 382
370 383 Arbitrary Mimetypes Handing in Terminal (Aka inline images in terminal)
371 384 -----------------------------------------------------------------------
372 385
373 386 When using IPython terminal it is now possible to register function to handle
374 387 arbitrary mimetypes. While rendering non-text based representation was possible in
375 388 many jupyter frontend; it was not possible in terminal IPython, as usually
376 389 terminal are limited to displaying text. As many terminal these days provide
377 390 escape sequences to display non-text; bringing this loved feature to IPython CLI
378 391 made a lot of sens. This functionality will not only allow inline images; but
379 392 allow opening of external program; for example ``mplayer`` to "display" sound
380 393 files.
381 394
382 395 So far only the hooks necessary for this are in place, but no default mime
383 396 renderers added; so inline images will only be available via extensions. We will
384 397 progressively enable these features by default in the next few releases, and
385 398 contribution is welcomed.
386 399
387 400 We welcome any feedback on the API. See :ref:`shell_mimerenderer` for more
388 401 informations.
389 402
390 403 This is originally based on work form in :ghpull:`10610` from @stephanh42
391 404 started over two years ago, and still a lot need to be done.
392 405
393 406 MISC
394 407 ----
395 408
396 409 - Completions can define their own ordering :ghpull:`11855`
397 410 - Enable Plotting in the same cell than the one that import matplotlib
398 411 :ghpull:`11916`
399 412 - Allow to store and restore multiple variables at once :ghpull:`11930`
400 413
401 414 You can see `all pull-requests <https://github.com/ipython/ipython/pulls?q=is%3Apr+milestone%3A7.10+is%3Aclosed>`_ for this release.
402 415
403 416 API Changes
404 417 -----------
405 418
406 419 Change of API and exposed objects automatically detected using `frappuccino <https://pypi.org/project/frappuccino/>`_ (still in beta):
407 420
408 421 The following items are new in IPython 7.10::
409 422
410 423 + IPython.terminal.shortcuts.reformat_text_before_cursor(buffer, document, shell)
411 424 + IPython.terminal.interactiveshell.PTK3
412 425 + IPython.terminal.interactiveshell.black_reformat_handler(text_before_cursor)
413 426 + IPython.terminal.prompts.RichPromptDisplayHook.write_format_data(self, format_dict, md_dict='None')
414 427
415 428 The following items have been removed in 7.10::
416 429
417 430 - IPython.lib.pretty.DICT_IS_ORDERED
418 431
419 432 The following signatures differ between versions::
420 433
421 434 - IPython.extensions.storemagic.restore_aliases(ip)
422 435 + IPython.extensions.storemagic.restore_aliases(ip, alias='None')
423 436
424 437 Special Thanks
425 438 --------------
426 439
427 440 - @stephanh42 who started the work on inline images in terminal 2 years ago
428 441 - @augustogoulart who spent a lot of time triaging issues and responding to
429 442 users.
430 443 - @con-f-use who is my (@Carreau) first sponsor on GitHub, as a reminder if you
431 444 like IPython, Jupyter and many other library of the SciPy stack you can
432 445 donate to numfocus.org non profit
433 446
434 447 .. _version 790:
435 448
436 449 IPython 7.9.0
437 450 =============
438 451
439 452 IPython 7.9 is a small release with a couple of improvement and bug fixes.
440 453
441 454 - Xterm terminal title should be restored on exit :ghpull:`11910`
442 455 - special variables ``_``,``__``, ``___`` are not set anymore when cache size
443 456 is 0 or less. :ghpull:`11877`
444 457 - Autoreload should have regained some speed by using a new heuristic logic to
445 458 find all objects needing reload. This should avoid large objects traversal
446 459 like pandas dataframes. :ghpull:`11876`
447 460 - Get ready for Python 4. :ghpull:`11874`
448 461 - `%env` Magic now has heuristic to hide potentially sensitive values :ghpull:`11896`
449 462
450 463 This is a small release despite a number of Pull Request Pending that need to
451 464 be reviewed/worked on. Many of the core developers have been busy outside of
452 465 IPython/Jupyter and we thanks all contributor for their patience; we'll work on
453 466 these as soon as we have time.
454 467
455 468
456 469 .. _version780:
457 470
458 471 IPython 7.8.0
459 472 =============
460 473
461 474 IPython 7.8.0 contain a few bugfix and 2 new APIs:
462 475
463 476 - Enable changing the font color for LaTeX rendering :ghpull:`11840`
464 477 - and Re-Expose some PDB API (see below)
465 478
466 479 Expose Pdb API
467 480 --------------
468 481
469 482 Expose the built-in ``pdb.Pdb`` API. ``Pdb`` constructor arguments are generically
470 483 exposed, regardless of python version.
471 484 Newly exposed arguments:
472 485
473 486 - ``skip`` - Python 3.1+
474 487 - ``nosiginnt`` - Python 3.2+
475 488 - ``readrc`` - Python 3.6+
476 489
477 490 Try it out::
478 491
479 492 from IPython.terminal.debugger import TerminalPdb
480 493 pdb = TerminalPdb(skip=["skipthismodule"])
481 494
482 495
483 496 See :ghpull:`11840`
484 497
485 498 .. _version770:
486 499
487 500 IPython 7.7.0
488 501 =============
489 502
490 503 IPython 7.7.0 contain multiple bug fixes and documentation updates; Here are a
491 504 few of the outstanding issue fixed:
492 505
493 506 - Fix a bug introduced in 7.6 where the ``%matplotlib`` magic would fail on
494 507 previously acceptable arguments :ghpull:`11814`.
495 508 - Fix the manage location on freebsd :ghpull:`11808`.
496 509 - Fix error message about aliases after ``%reset`` call in ipykernel
497 510 :ghpull:`11806`
498 511 - Fix Duplication completions in emacs :ghpull:`11803`
499 512
500 513 We are planning to adopt `NEP29 <https://github.com/numpy/numpy/pull/14086>`_
501 514 (still currently in draft) which may make this minor version of IPython the
502 515 last one to support Python 3.5 and will make the code base more aggressive
503 516 toward removing compatibility with older versions of Python.
504 517
505 518 GitHub now support to give only "Triage" permissions to users; if you'd like to
506 519 help close stale issues and labels issues please reach to us with your GitHub
507 520 Username and we'll add you to the triage team. It is a great way to start
508 521 contributing and a path toward getting commit rights.
509 522
510 523 .. _version761:
511 524
512 525 IPython 7.6.1
513 526 =============
514 527
515 528 IPython 7.6.1 contain a critical bugfix in the ``%timeit`` magic, which would
516 529 crash on some inputs as a side effect of :ghpull:`11716`. See :ghpull:`11812`
517 530
518 531
519 532 .. _whatsnew760:
520 533
521 534 IPython 7.6.0
522 535 =============
523 536
524 537 IPython 7.6.0 contains a couple of bug fixes and number of small features
525 538 additions as well as some compatibility with the current development version of
526 539 Python 3.8.
527 540
528 541 - Add a ``-l`` option to :magic:`psearch` to list the available search
529 542 types. :ghpull:`11672`
530 543 - Support ``PathLike`` for ``DisplayObject`` and ``Image``. :ghpull:`11764`
531 544 - Configurability of timeout in the test suite for slow platforms.
532 545 :ghpull:`11756`
533 546 - Accept any casing for matplotlib backend. :ghpull:`121748`
534 547 - Properly skip test that requires numpy to be installed :ghpull:`11723`
535 548 - More support for Python 3.8 and positional only arguments (pep570)
536 549 :ghpull:`11720`
537 550 - Unicode names for the completion are loaded lazily on first use which
538 551 should decrease startup time. :ghpull:`11693`
539 552 - Autoreload now update the types of reloaded objects; this for example allow
540 553 pickling of reloaded objects. :ghpull:`11644`
541 554 - Fix a bug where ``%%time`` magic would suppress cell output. :ghpull:`11716`
542 555
543 556
544 557 Prepare migration to pytest (instead of nose) for testing
545 558 ---------------------------------------------------------
546 559
547 560 Most of the work between 7.5 and 7.6 was to prepare the migration from our
548 561 testing framework to pytest. Most of the test suite should now work by simply
549 562 issuing ``pytest`` from the root of the repository.
550 563
551 564 The migration to pytest is just at its beginning. Many of our test still rely
552 565 on IPython-specific plugins for nose using pytest (doctest using IPython syntax
553 566 is one example of this where test appear as "passing", while no code has been
554 567 ran). Many test also need to be updated like ``yield-test`` to be properly
555 568 parametrized tests.
556 569
557 570 Migration to pytest allowed me to discover a number of issues in our test
558 571 suite; which was hiding a number of subtle issues – or not actually running
559 572 some of the tests in our test suite – I have thus corrected many of those; like
560 573 improperly closed resources; or used of deprecated features. I also made use of
561 574 the ``pytest --durations=...`` to find some of our slowest test and speed them
562 575 up (our test suite can now be up to 10% faster). Pytest as also a variety of
563 576 plugins and flags which will make the code quality of IPython and the testing
564 577 experience better.
565 578
566 579 Misc
567 580 ----
568 581
569 582 We skipped the release of 7.6 at the end of May, but will attempt to get back
570 583 on schedule. We are starting to think about making introducing backward
571 584 incompatible change and start the 8.0 series.
572 585
573 586 Special Thanks to Gabriel (@gpotter2 on GitHub), who among other took care many
574 587 of the remaining task for 7.4 and 7.5, like updating the website.
575 588
576 589 .. _whatsnew750:
577 590
578 591 IPython 7.5.0
579 592 =============
580 593
581 594 IPython 7.5.0 consist mostly of bug-fixes, and documentation updates, with one
582 595 minor new feature. The `Audio` display element can now be assigned an element
583 596 id when displayed in browser. See :ghpull:`11670`
584 597
585 598 The major outstanding bug fix correct a change of behavior that was introduce
586 599 in 7.4.0 where some cell magics would not be able to access or modify global
587 600 scope when using the ``@needs_local_scope`` decorator. This was typically
588 601 encountered with the ``%%time`` and ``%%timeit`` magics. See :ghissue:`11659`
589 602 and :ghpull:`11698`.
590 603
591 604 .. _whatsnew740:
592 605
593 606 IPython 7.4.0
594 607 =============
595 608
596 609 Unicode name completions
597 610 ------------------------
598 611
599 612 Previously, we provided completion for a unicode name with its relative symbol.
600 613 With this, now IPython provides complete suggestions to unicode name symbols.
601 614
602 615 As on the PR, if user types ``\LAT<tab>``, IPython provides a list of
603 616 possible completions. In this case, it would be something like::
604 617
605 618 'LATIN CAPITAL LETTER A',
606 619 'LATIN CAPITAL LETTER B',
607 620 'LATIN CAPITAL LETTER C',
608 621 'LATIN CAPITAL LETTER D',
609 622 ....
610 623
611 624 This help to type unicode character that do not have short latex aliases, and
612 625 have long unicode names. for example ``Ν°``, ``\GREEK CAPITAL LETTER HETA``.
613 626
614 627 This feature was contributed by Luciana Marques :ghpull:`11583`.
615 628
616 629 Make audio normalization optional
617 630 ---------------------------------
618 631
619 632 Added 'normalize' argument to `IPython.display.Audio`. This argument applies
620 633 when audio data is given as an array of samples. The default of `normalize=True`
621 634 preserves prior behavior of normalizing the audio to the maximum possible range.
622 635 Setting to `False` disables normalization.
623 636
624 637
625 638 Miscellaneous
626 639 -------------
627 640
628 641 - Fix improper acceptation of ``return`` outside of functions. :ghpull:`11641`.
629 642 - Fixed PyQt 5.11 backwards incompatibility causing sip import failure.
630 643 :ghpull:`11613`.
631 644 - Fix Bug where ``type?`` would crash IPython. :ghpull:`1608`.
632 645 - Allow to apply ``@needs_local_scope`` to cell magics for convenience.
633 646 :ghpull:`11542`.
634 647
635 648 .. _whatsnew730:
636 649
637 650 IPython 7.3.0
638 651 =============
639 652
640 653 .. _whatsnew720:
641 654
642 655 IPython 7.3.0 bring several bug fixes and small improvements that you will
643 656 described bellow.
644 657
645 658 The biggest change to this release is the implementation of the ``%conda`` and
646 659 ``%pip`` magics, that will attempt to install packages in the **current
647 660 environment**. You may still need to restart your interpreter or kernel for the
648 661 change to be taken into account, but it should simplify installation of packages
649 662 into remote environment. Installing using pip/conda from the command line is
650 663 still the prefer method.
651 664
652 665 The ``%pip`` magic was already present, but was only printing a warning; now it
653 666 will actually forward commands to pip.
654 667
655 668 Misc bug fixes and improvements:
656 669
657 670 - Compatibility with Python 3.8.
658 671 - Do not expand shell variable in execution magics, and added the
659 672 ``no_var_expand`` decorator for magic requiring a similar functionality
660 673 :ghpull:`11516`
661 674 - Add ``%pip`` and ``%conda`` magic :ghpull:`11524`
662 675 - Re-initialize posix aliases after a ``%reset`` :ghpull:`11528`
663 676 - Allow the IPython command line to run ``*.ipynb`` files :ghpull:`11529`
664 677
665 678 IPython 7.2.0
666 679 =============
667 680
668 681 IPython 7.2.0 brings minor bugfixes, improvements, and new configuration options:
669 682
670 683 - Fix a bug preventing PySide2 GUI integration from working :ghpull:`11464`
671 684 - Run CI on Mac OS ! :ghpull:`11471`
672 685 - Fix IPython "Demo" mode. :ghpull:`11498`
673 686 - Fix ``%run`` magic with path in name :ghpull:`11499`
674 687 - Fix: add CWD to sys.path *after* stdlib :ghpull:`11502`
675 688 - Better rendering of signatures, especially long ones. :ghpull:`11505`
676 689 - Re-enable jedi by default if it's installed :ghpull:`11506`
677 690 - Add New ``minimal`` exception reporting mode (useful for educational purpose). See :ghpull:`11509`
678 691
679 692
680 693 Added ability to show subclasses when using pinfo and other utilities
681 694 ---------------------------------------------------------------------
682 695
683 696 When using ``?``/``??`` on a class, IPython will now list the first 10 subclasses.
684 697
685 698 Special Thanks to Chris Mentzel of the Moore Foundation for this feature. Chris
686 699 is one of the people who played a critical role in IPython/Jupyter getting
687 700 funding.
688 701
689 702 We are grateful for all the help Chris has given us over the years,
690 703 and we're now proud to have code contributed by Chris in IPython.
691 704
692 705 OSMagics.cd_force_quiet configuration option
693 706 --------------------------------------------
694 707
695 708 You can set this option to force the %cd magic to behave as if ``-q`` was passed:
696 709 ::
697 710
698 711 In [1]: cd /
699 712 /
700 713
701 714 In [2]: %config OSMagics.cd_force_quiet = True
702 715
703 716 In [3]: cd /tmp
704 717
705 718 In [4]:
706 719
707 720 See :ghpull:`11491`
708 721
709 722 In vi editing mode, whether the prompt includes the current vi mode can now be configured
710 723 -----------------------------------------------------------------------------------------
711 724
712 725 Set the ``TerminalInteractiveShell.prompt_includes_vi_mode`` to a boolean value
713 726 (default: True) to control this feature. See :ghpull:`11492`
714 727
715 728 .. _whatsnew710:
716 729
717 730 IPython 7.1.0
718 731 =============
719 732
720 733 IPython 7.1.0 is the first minor release after 7.0.0 and mostly brings fixes to
721 734 new features, internal refactoring, and fixes for regressions that happened during the 6.x->7.x
722 735 transition. It also brings **Compatibility with Python 3.7.1**, as we're
723 736 unwillingly relying on a bug in CPython.
724 737
725 738 New Core Dev:
726 739
727 740 - We welcome Jonathan Slenders to the commiters. Jonathan has done a fantastic
728 741 work on prompt_toolkit, and we'd like to recognise his impact by giving him
729 742 commit rights. :ghissue:`11397`
730 743
731 744 Notable Changes
732 745
733 746 - Major update of "latex to unicode" tab completion map (see below)
734 747
735 748 Notable New Features:
736 749
737 750 - Restore functionality and documentation of the **sphinx directive**, which
738 751 is now stricter (fail on error by daefault), has new configuration options,
739 752 has a brand new documentation page :ref:`ipython_directive` (which needs
740 753 some cleanup). It is also now *tested* so we hope to have less regressions.
741 754 :ghpull:`11402`
742 755
743 756 - ``IPython.display.Video`` now supports ``width`` and ``height`` arguments,
744 757 allowing a custom width and height to be set instead of using the video's
745 758 width and height. :ghpull:`11353`
746 759
747 760 - Warn when using ``HTML('<iframe>')`` instead of ``IFrame`` :ghpull:`11350`
748 761
749 762 - Allow Dynamic switching of editing mode between vi/emacs and show
750 763 normal/input mode in prompt when using vi. :ghpull:`11390`. Use ``%config
751 764 TerminalInteractiveShell.editing_mode = 'vi'`` or ``%config
752 765 TerminalInteractiveShell.editing_mode = 'emacs'`` to dynamically switch
753 766 between modes.
754 767
755 768
756 769 Notable Fixes:
757 770
758 771 - Fix entering of **multi-line blocks in terminal** IPython, and various
759 772 crashes in the new input transformation machinery :ghpull:`11354`,
760 773 :ghpull:`11356`, :ghpull:`11358`. These also fix a **Compatibility bug
761 774 with Python 3.7.1**.
762 775
763 776 - Fix moving through generator stack in ipdb :ghpull:`11266`
764 777
765 778 - %Magic command arguments now support quoting. :ghpull:`11330`
766 779
767 780 - Re-add ``rprint`` and ``rprinte`` aliases. :ghpull:`11331`
768 781
769 782 - Remove implicit dependency on ``ipython_genutils`` :ghpull:`11317`
770 783
771 784 - Make ``nonlocal`` raise ``SyntaxError`` instead of silently failing in async
772 785 mode. :ghpull:`11382`
773 786
774 787 - Fix mishandling of magics and ``= !`` assignment just after a dedent in
775 788 nested code blocks :ghpull:`11418`
776 789
777 790 - Fix instructions for custom shortcuts :ghpull:`11426`
778 791
779 792
780 793 Notable Internals improvements:
781 794
782 795 - Use of ``os.scandir`` (Python 3 only) to speed up some file system operations.
783 796 :ghpull:`11365`
784 797
785 798 - use ``perf_counter`` instead of ``clock`` for more precise
786 799 timing results with ``%time`` :ghpull:`11376`
787 800
788 801 Many thanks to all the contributors and in particular to ``bartskowron`` and
789 802 ``tonyfast`` who handled some pretty complicated bugs in the input machinery. We
790 803 had a number of first time contributors and maybe hacktoberfest participants that
791 804 made significant contributions and helped us free some time to focus on more
792 805 complicated bugs.
793 806
794 807 You
795 808 can see all the closed issues and Merged PR, new features and fixes `here
796 809 <https://github.com/ipython/ipython/issues?utf8=%E2%9C%93&q=+is%3Aclosed+milestone%3A7.1+>`_.
797 810
798 811 Unicode Completion update
799 812 -------------------------
800 813
801 814 In IPython 7.1 the Unicode completion map has been updated and synchronized with
802 815 the Julia language.
803 816
804 817 Added and removed character characters:
805 818
806 819 ``\jmath`` (``Θ·``), ``\\underleftrightarrow`` (U+034D, combining) have been
807 820 added, while ``\\textasciicaron`` have been removed
808 821
809 822 Some sequences have seen their prefix removed:
810 823
811 824 - 6 characters ``\text...<tab>`` should now be inputed with ``\...<tab>`` directly,
812 825 - 45 characters ``\Elz...<tab>`` should now be inputed with ``\...<tab>`` directly,
813 826 - 65 characters ``\B...<tab>`` should now be inputed with ``\...<tab>`` directly,
814 827 - 450 characters ``\m...<tab>`` should now be inputed with ``\...<tab>`` directly,
815 828
816 829 Some sequences have seen their prefix shortened:
817 830
818 831 - 5 characters ``\mitBbb...<tab>`` should now be inputed with ``\bbi...<tab>`` directly,
819 832 - 52 characters ``\mit...<tab>`` should now be inputed with ``\i...<tab>`` directly,
820 833 - 216 characters ``\mbfit...<tab>`` should now be inputed with ``\bi...<tab>`` directly,
821 834 - 222 characters ``\mbf...<tab>`` should now be inputed with ``\b...<tab>`` directly,
822 835
823 836 A couple of characters had their sequence simplified:
824 837
825 838 - ``Γ°``, type ``\dh<tab>``, instead of ``\eth<tab>``
826 839 - ``Δ§``, type ``\hbar<tab>``, instead of ``\Elzxh<tab>``
827 840 - ``ΙΈ``, type ``\ltphi<tab>``, instead of ``\textphi<tab>``
828 841 - ``Ο΄``, type ``\varTheta<tab>``, instead of ``\textTheta<tab>``
829 842 - ``ℇ``, type ``\eulermascheroni<tab>``, instead of ``\Eulerconst<tab>``
830 843 - ``β„Ž``, type ``\planck<tab>``, instead of ``\Planckconst<tab>``
831 844
832 845 - U+0336 (COMBINING LONG STROKE OVERLAY), type ``\strike<tab>``, instead of ``\Elzbar<tab>``.
833 846
834 847 A couple of sequences have been updated:
835 848
836 849 - ``\varepsilon`` now gives ``Ι›`` (GREEK SMALL LETTER EPSILON) instead of ``Ξ΅`` (GREEK LUNATE EPSILON SYMBOL),
837 850 - ``\underbar`` now gives U+0331 (COMBINING MACRON BELOW) instead of U+0332 (COMBINING LOW LINE).
838 851
839 852
840 853 .. _whatsnew700:
841 854
842 855 IPython 7.0.0
843 856 =============
844 857
845 858 Released Thursday September 27th, 2018
846 859
847 860 IPython 7 includes major feature improvements.
848 861 This is also the second major version of IPython to support only
849 862 Python 3 – starting at Python 3.4. Python 2 is still community-supported
850 863 on the bugfix only 5.x branch, but we remind you that Python 2 "end of life"
851 864 is on Jan 1st 2020.
852 865
853 866 We were able to backport bug fixes to the 5.x branch thanks to our backport bot which
854 867 backported more than `70 Pull-Requests
855 868 <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>`_
856 869
857 870 The IPython 6.x branch will likely not see any further release unless critical
858 871 bugs are found.
859 872
860 873 Make sure you have pip > 9.0 before upgrading. You should be able to update by running:
861 874
862 875 .. code::
863 876
864 877 pip install ipython --upgrade
865 878
866 879 .. only:: ipydev
867 880
868 881 If you are trying to install or update an ``alpha``, ``beta``, or ``rc``
869 882 version, use pip ``--pre`` flag.
870 883
871 884 .. code::
872 885
873 886 pip install ipython --upgrade --pre
874 887
875 888
876 889 Or, if you have conda installed:
877 890
878 891 .. code::
879 892
880 893 conda install ipython
881 894
882 895
883 896
884 897 Prompt Toolkit 2.0
885 898 ------------------
886 899
887 900 IPython 7.0+ now uses ``prompt_toolkit 2.0``. If you still need to use an earlier
888 901 ``prompt_toolkit`` version, you may need to pin IPython to ``<7.0``.
889 902
890 903 Autowait: Asynchronous REPL
891 904 ---------------------------
892 905
893 906 Staring with IPython 7.0 on Python 3.6+, IPython can automatically ``await``
894 907 top level code. You should not need to access an event loop or runner
895 908 yourself. To learn more, read the :ref:`autoawait` section of our docs, see
896 909 :ghpull:`11265`, or try the following code::
897 910
898 911 Python 3.6.0
899 912 Type 'copyright', 'credits' or 'license' for more information
900 913 IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help.
901 914
902 915 In [1]: import aiohttp
903 916 ...: result = aiohttp.get('https://api.github.com')
904 917
905 918 In [2]: response = await result
906 919 <pause for a few 100s ms>
907 920
908 921 In [3]: await response.json()
909 922 Out[3]:
910 923 {'authorizations_url': 'https://api.github.com/authorizations',
911 924 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}',
912 925 ...
913 926 }
914 927
915 928 .. note::
916 929
917 930 Async integration is experimental code, behavior may change or be removed
918 931 between Python and IPython versions without warnings.
919 932
920 933 Integration is by default with `asyncio`, but other libraries can be configured --
921 934 like ``curio`` or ``trio`` -- to improve concurrency in the REPL::
922 935
923 936 In [1]: %autoawait trio
924 937
925 938 In [2]: import trio
926 939
927 940 In [3]: async def child(i):
928 941 ...: print(" child %s goes to sleep"%i)
929 942 ...: await trio.sleep(2)
930 943 ...: print(" child %s wakes up"%i)
931 944
932 945 In [4]: print('parent start')
933 946 ...: async with trio.open_nursery() as n:
934 947 ...: for i in range(3):
935 948 ...: n.spawn(child, i)
936 949 ...: print('parent end')
937 950 parent start
938 951 child 2 goes to sleep
939 952 child 0 goes to sleep
940 953 child 1 goes to sleep
941 954 <about 2 seconds pause>
942 955 child 2 wakes up
943 956 child 1 wakes up
944 957 child 0 wakes up
945 958 parent end
946 959
947 960 See :ref:`autoawait` for more information.
948 961
949 962
950 963 Asynchronous code in a Notebook interface or any other frontend using the
951 964 Jupyter Protocol will require further updates to the IPykernel package.
952 965
953 966 Non-Asynchronous code
954 967 ~~~~~~~~~~~~~~~~~~~~~
955 968
956 969 As the internal API of IPython is now asynchronous, IPython needs to run under
957 970 an event loop. In order to allow many workflows, (like using the :magic:`%run`
958 971 magic, or copy-pasting code that explicitly starts/stop event loop), when
959 972 top-level code is detected as not being asynchronous, IPython code is advanced
960 973 via a pseudo-synchronous runner, and may not advance pending tasks.
961 974
962 975 Change to Nested Embed
963 976 ~~~~~~~~~~~~~~~~~~~~~~
964 977
965 978 The introduction of the ability to run async code had some effect on the
966 979 ``IPython.embed()`` API. By default, embed will not allow you to run asynchronous
967 980 code unless an event loop is specified.
968 981
969 982 Effects on Magics
970 983 ~~~~~~~~~~~~~~~~~
971 984
972 985 Some magics will not work with async until they're updated.
973 986 Contributions welcome.
974 987
975 988 Expected Future changes
976 989 ~~~~~~~~~~~~~~~~~~~~~~~
977 990
978 991 We expect more internal but public IPython functions to become ``async``, and
979 992 will likely end up having a persistent event loop while IPython is running.
980 993
981 994 Thanks
982 995 ~~~~~~
983 996
984 997 This release took more than a year in the making.
985 998 The code was rebased a number of
986 999 times; leading to commit authorship that may have been lost in the final
987 1000 Pull-Request. Huge thanks to many people for contribution, discussion, code,
988 1001 documentation, use-cases: dalejung, danielballan, ellisonbg, fperez, gnestor,
989 1002 minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many others.
990 1003
991 1004
992 1005 Autoreload Improvement
993 1006 ----------------------
994 1007
995 1008 The magic :magic:`%autoreload 2 <autoreload>` now captures new methods added to
996 1009 classes. Earlier, only methods existing as of the initial import were being
997 1010 tracked and updated.
998 1011
999 1012 This new feature helps dual environment development - Jupyter+IDE - where the
1000 1013 code gradually moves from notebook cells to package files as it gets
1001 1014 structured.
1002 1015
1003 1016 **Example**: An instance of the class ``MyClass`` will be able to access the
1004 1017 method ``cube()`` after it is uncommented and the file ``file1.py`` is saved on
1005 1018 disk.
1006 1019
1007 1020
1008 1021 .. code::
1009 1022
1010 1023 # notebook
1011 1024
1012 1025 from mymodule import MyClass
1013 1026 first = MyClass(5)
1014 1027
1015 1028 .. code::
1016 1029
1017 1030 # mymodule/file1.py
1018 1031
1019 1032 class MyClass:
1020 1033
1021 1034 def __init__(self, a=10):
1022 1035 self.a = a
1023 1036
1024 1037 def square(self):
1025 1038 print('compute square')
1026 1039 return self.a*self.a
1027 1040
1028 1041 # def cube(self):
1029 1042 # print('compute cube')
1030 1043 # return self.a*self.a*self.a
1031 1044
1032 1045
1033 1046
1034 1047
1035 1048 Misc
1036 1049 ----
1037 1050
1038 1051 The autoindent feature that was deprecated in 5.x was re-enabled and
1039 1052 un-deprecated in :ghpull:`11257`
1040 1053
1041 1054 Make :magic:`%run -n -i ... <run>` work correctly. Earlier, if :magic:`%run` was
1042 1055 passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308`
1043 1056
1044 1057
1045 1058 The :cellmagic:`%%script` (as well as :cellmagic:`%%bash`,
1046 1059 :cellmagic:`%%ruby`... ) cell magics now raise by default if the return code of
1047 1060 the given code is non-zero (thus halting execution of further cells in a
1048 1061 notebook). The behavior can be disable by passing the ``--no-raise-error`` flag.
1049 1062
1050 1063
1051 1064 Deprecations
1052 1065 ------------
1053 1066
1054 1067 A couple of unused functions and methods have been deprecated and will be removed
1055 1068 in future versions:
1056 1069
1057 1070 - ``IPython.utils.io.raw_print_err``
1058 1071 - ``IPython.utils.io.raw_print``
1059 1072
1060 1073
1061 1074 Backwards incompatible changes
1062 1075 ------------------------------
1063 1076
1064 1077 * The API for transforming input before it is parsed as Python code has been
1065 1078 completely redesigned: any custom input transformations will need to be
1066 1079 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