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