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