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