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