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