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