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