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