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