##// END OF EJS Templates
typo
Matthias Bussonnier -
Show More
@@ -1,480 +1,480 b''
1 1 ============
2 2 7.x Series
3 3 ============
4 4
5 5 .. _whatsnew740:
6 6
7 7 IPython 7.4.0
8 8 =============
9 9
10 10 Unicode name completions
11 11 ------------------------
12 12
13 13 Previously, we provided completion for a unicode name with its relative symbol.
14 14 With this, now IPython provides complete suggestions to unicode name symbols.
15 15
16 16 As on the PR, if user types ``\LAT<tab>``, IPython provides a list of
17 17 possible completions. In this case, it would be something like::
18 18
19 19 'LATIN CAPITAL LETTER A',
20 20 'LATIN CAPITAL LETTER B',
21 21 'LATIN CAPITAL LETTER C',
22 22 'LATIN CAPITAL LETTER D',
23 23 ....
24 24
25 25 This help to type unicode character that do not have short latex aliases, and
26 26 have long unicode names. for example ``Ν°``, ``\GREEK CAPITAL LETTER HETA``.
27 27
28 28 This feature was contributed by Luciana Marques :ghpull:`11583`.
29 29
30 30 Make audio normalization optional
31 31 ---------------------------------
32 32
33 33 Added 'normalize' argument to `IPython.display.Audio`. This argument applies
34 34 when audio data is given as an array of samples. The default of `normalize=True`
35 35 preserves prior behavior of normalizing the audio to the maximum possible range.
36 36 Setting to `False` disables normalization.
37 37
38 38
39 39 Miscelanious
40 40 ------------
41 41
42 42 - Fix improper acceptation of ``return`` outside of functions. :ghpull:`11641`.
43 43 - Fixed PyQt 5.11 backwards incompatibility causing sip import failure.
44 44 :ghpull:`11613`.
45 - Fix Bug where ``type?`` woudl crash IPython. :ghpull:`1608`.
45 - Fix Bug where ``type?`` would crash IPython. :ghpull:`1608`.
46 46 - Allow to apply ``@needs_local_scope`` to cell magics for convenience.
47 47 :ghpull:`11542`.
48 48
49 49 .. _whatsnew730:
50 50
51 51 IPython 7.3.0
52 52 =============
53 53
54 54 .. _whatsnew720:
55 55
56 56 IPython 7.3.0 bring several bug fixes and small improvements that you will
57 57 described bellow.
58 58
59 59 The biggest change to this release is the implementation of the ``%conda`` and
60 60 ``%pip`` magics, that will attempt to install packages in the **current
61 61 environment**. You may still need to restart your interpreter or kernel for the
62 62 change to be taken into account, but it should simplify installation of packages
63 63 into remote environment. Installing using pip/conda from the command line is
64 64 still the prefer method.
65 65
66 66 The ``%pip`` magic was already present, but was only printing a warning; now it
67 67 will actually forward commands to pip.
68 68
69 69 Misc bug fixes and improvements:
70 70
71 71 - Compatibility with Python 3.8.
72 72 - Do not expand shell variable in execution magics, and added the
73 73 ``no_var_expand`` decorator for magic requiring a similar functionality
74 74 :ghpull:`11516`
75 75 - Add ``%pip`` and ``%conda`` magic :ghpull:`11524`
76 76 - Re-initialize posix aliases after a ``%reset`` :ghpull:`11528`
77 77 - Allow the IPython command line to run ``*.ipynb`` files :ghpull:`11529`
78 78
79 79 IPython 7.2.0
80 80 =============
81 81
82 82 IPython 7.2.0 brings minor bugfixes, improvements, and new configuration options:
83 83
84 84 - Fix a bug preventing PySide2 GUI integration from working :ghpull:`11464`
85 85 - Run CI on Mac OS ! :ghpull:`11471`
86 86 - Fix IPython "Demo" mode. :ghpull:`11498`
87 87 - Fix ``%run`` magic with path in name :ghpull:`11499`
88 88 - Fix: add CWD to sys.path *after* stdlib :ghpull:`11502`
89 89 - Better rendering of signatures, especially long ones. :ghpull:`11505`
90 90 - Re-enable jedi by default if it's installed :ghpull:`11506`
91 91 - Add New ``minimal`` exception reporting mode (useful for educational purpose). See :ghpull:`11509`
92 92
93 93
94 94 Added ability to show subclasses when using pinfo and other utilities
95 95 ---------------------------------------------------------------------
96 96
97 97 When using ``?``/``??`` on a class, IPython will now list the first 10 subclasses.
98 98
99 99 Special Thanks to Chris Mentzel of the Moore Foundation for this feature. Chris
100 100 is one of the people who played a critical role in IPython/Jupyter getting
101 101 funding.
102 102
103 103 We are grateful for all the help Chris has given us over the years,
104 104 and we're now proud to have code contributed by Chris in IPython.
105 105
106 106 OSMagics.cd_force_quiet configuration option
107 107 --------------------------------------------
108 108
109 109 You can set this option to force the %cd magic to behave as if ``-q`` was passed:
110 110 ::
111 111
112 112 In [1]: cd /
113 113 /
114 114
115 115 In [2]: %config OSMagics.cd_force_quiet = True
116 116
117 117 In [3]: cd /tmp
118 118
119 119 In [4]:
120 120
121 121 See :ghpull:`11491`
122 122
123 123 In vi editing mode, whether the prompt includes the current vi mode can now be configured
124 124 -----------------------------------------------------------------------------------------
125 125
126 126 Set the ``TerminalInteractiveShell.prompt_includes_vi_mode`` to a boolean value
127 127 (default: True) to control this feature. See :ghpull:`11492`
128 128
129 129 .. _whatsnew710:
130 130
131 131 IPython 7.1.0
132 132 =============
133 133
134 134 IPython 7.1.0 is the first minor release after 7.0.0 and mostly brings fixes to
135 135 new features, internal refactoring, and fixes for regressions that happened during the 6.x->7.x
136 136 transition. It also brings **Compatibility with Python 3.7.1**, as we're
137 137 unwillingly relying on a bug in CPython.
138 138
139 139 New Core Dev:
140 140
141 141 - We welcome Jonathan Slenders to the commiters. Jonathan has done a fantastic
142 142 work on prompt_toolkit, and we'd like to recognise his impact by giving him
143 143 commit rights. :ghissue:`11397`
144 144
145 145 Notable Changes
146 146
147 147 - Major update of "latex to unicode" tab completion map (see below)
148 148
149 149 Notable New Features:
150 150
151 151 - Restore functionality and documentation of the **sphinx directive**, which
152 152 is now stricter (fail on error by daefault), has new configuration options,
153 153 has a brand new documentation page :ref:`ipython_directive` (which needs
154 154 some cleanup). It is also now *tested* so we hope to have less regressions.
155 155 :ghpull:`11402`
156 156
157 157 - ``IPython.display.Video`` now supports ``width`` and ``height`` arguments,
158 158 allowing a custom width and height to be set instead of using the video's
159 159 width and height. :ghpull:`11353`
160 160
161 161 - Warn when using ``HTML('<iframe>')`` instead of ``IFrame`` :ghpull:`11350`
162 162
163 163 - Allow Dynamic switching of editing mode between vi/emacs and show
164 164 normal/input mode in prompt when using vi. :ghpull:`11390`. Use ``%config
165 165 TerminalInteractiveShell.editing_mode = 'vi'`` or ``%config
166 166 TerminalInteractiveShell.editing_mode = 'emacs'`` to dynamically switch
167 167 between modes.
168 168
169 169
170 170 Notable Fixes:
171 171
172 172 - Fix entering of **multi-line blocks in terminal** IPython, and various
173 173 crashes in the new input transformation machinery :ghpull:`11354`,
174 174 :ghpull:`11356`, :ghpull:`11358`. These also fix a **Compatibility bug
175 175 with Python 3.7.1**.
176 176
177 177 - Fix moving through generator stack in ipdb :ghpull:`11266`
178 178
179 179 - %Magic command arguments now support quoting. :ghpull:`11330`
180 180
181 181 - Re-add ``rprint`` and ``rprinte`` aliases. :ghpull:`11331`
182 182
183 183 - Remove implicit dependency on ``ipython_genutils`` :ghpull:`11317`
184 184
185 185 - Make ``nonlocal`` raise ``SyntaxError`` instead of silently failing in async
186 186 mode. :ghpull:`11382`
187 187
188 188 - Fix mishandling of magics and ``= !`` assignment just after a dedent in
189 189 nested code blocks :ghpull:`11418`
190 190
191 191 - Fix instructions for custom shortcuts :ghpull:`11426`
192 192
193 193
194 194 Notable Internals improvements:
195 195
196 196 - Use of ``os.scandir`` (Python 3 only) to speed up some file system operations.
197 197 :ghpull:`11365`
198 198
199 199 - use ``perf_counter`` instead of ``clock`` for more precise
200 200 timing results with ``%time`` :ghpull:`11376`
201 201
202 202 Many thanks to all the contributors and in particular to ``bartskowron`` and
203 203 ``tonyfast`` who handled some pretty complicated bugs in the input machinery. We
204 204 had a number of first time contributors and maybe hacktoberfest participants that
205 205 made significant contributions and helped us free some time to focus on more
206 206 complicated bugs.
207 207
208 208 You
209 209 can see all the closed issues and Merged PR, new features and fixes `here
210 210 <https://github.com/ipython/ipython/issues?utf8=%E2%9C%93&q=+is%3Aclosed+milestone%3A7.1+>`_.
211 211
212 212 Unicode Completion update
213 213 -------------------------
214 214
215 215 In IPython 7.1 the Unicode completion map has been updated and synchronized with
216 216 the Julia language.
217 217
218 218 Added and removed character characters:
219 219
220 220 ``\jmath`` (``Θ·``), ``\\underleftrightarrow`` (U+034D, combining) have been
221 221 added, while ``\\textasciicaron`` have been removed
222 222
223 223 Some sequences have seen their prefix removed:
224 224
225 225 - 6 characters ``\text...<tab>`` should now be inputed with ``\...<tab>`` directly,
226 226 - 45 characters ``\Elz...<tab>`` should now be inputed with ``\...<tab>`` directly,
227 227 - 65 characters ``\B...<tab>`` should now be inputed with ``\...<tab>`` directly,
228 228 - 450 characters ``\m...<tab>`` should now be inputed with ``\...<tab>`` directly,
229 229
230 230 Some sequences have seen their prefix shortened:
231 231
232 232 - 5 characters ``\mitBbb...<tab>`` should now be inputed with ``\bbi...<tab>`` directly,
233 233 - 52 characters ``\mit...<tab>`` should now be inputed with ``\i...<tab>`` directly,
234 234 - 216 characters ``\mbfit...<tab>`` should now be inputed with ``\bi...<tab>`` directly,
235 235 - 222 characters ``\mbf...<tab>`` should now be inputed with ``\b...<tab>`` directly,
236 236
237 237 A couple of characters had their sequence simplified:
238 238
239 239 - ``Γ°``, type ``\dh<tab>``, instead of ``\eth<tab>``
240 240 - ``Δ§``, type ``\hbar<tab>``, instead of ``\Elzxh<tab>``
241 241 - ``ΙΈ``, type ``\ltphi<tab>``, instead of ``\textphi<tab>``
242 242 - ``Ο΄``, type ``\varTheta<tab>``, instead of ``\textTheta<tab>``
243 243 - ``ℇ``, type ``\eulermascheroni<tab>``, instead of ``\Eulerconst<tab>``
244 244 - ``β„Ž``, type ``\planck<tab>``, instead of ``\Planckconst<tab>``
245 245
246 246 - U+0336 (COMBINING LONG STROKE OVERLAY), type ``\strike<tab>``, instead of ``\Elzbar<tab>``.
247 247
248 248 A couple of sequences have been updated:
249 249
250 250 - ``\varepsilon`` now gives ``Ι›`` (GREEK SMALL LETTER EPSILON) instead of ``Ξ΅`` (GREEK LUNATE EPSILON SYMBOL),
251 251 - ``\underbar`` now gives U+0331 (COMBINING MACRON BELOW) instead of U+0332 (COMBINING LOW LINE).
252 252
253 253
254 254 .. _whatsnew700:
255 255
256 256 IPython 7.0.0
257 257 =============
258 258
259 259 Released Thursday September 27th, 2018
260 260
261 261 IPython 7 includes major feature improvements.
262 262 This is also the second major version of IPython to support only
263 263 Python 3 – starting at Python 3.4. Python 2 is still community-supported
264 264 on the bugfix only 5.x branch, but we remind you that Python 2 "end of life"
265 265 is on Jan 1st 2020.
266 266
267 267 We were able to backport bug fixes to the 5.x branch thanks to our backport bot which
268 268 backported more than `70 Pull-Requests
269 269 <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>`_
270 270
271 271 The IPython 6.x branch will likely not see any further release unless critical
272 272 bugs are found.
273 273
274 274 Make sure you have pip > 9.0 before upgrading. You should be able to update by running:
275 275
276 276 .. code::
277 277
278 278 pip install ipython --upgrade
279 279
280 280 .. only:: ipydev
281 281
282 282 If you are trying to install or update an ``alpha``, ``beta``, or ``rc``
283 283 version, use pip ``--pre`` flag.
284 284
285 285 .. code::
286 286
287 287 pip install ipython --upgrade --pre
288 288
289 289
290 290 Or, if you have conda installed:
291 291
292 292 .. code::
293 293
294 294 conda install ipython
295 295
296 296
297 297
298 298 Prompt Toolkit 2.0
299 299 ------------------
300 300
301 301 IPython 7.0+ now uses ``prompt_toolkit 2.0``. If you still need to use an earlier
302 302 ``prompt_toolkit`` version, you may need to pin IPython to ``<7.0``.
303 303
304 304 Autowait: Asynchronous REPL
305 305 ---------------------------
306 306
307 307 Staring with IPython 7.0 on Python 3.6+, IPython can automatically ``await``
308 308 top level code. You should not need to access an event loop or runner
309 309 yourself. To learn more, read the :ref:`autoawait` section of our docs, see
310 310 :ghpull:`11265`, or try the following code::
311 311
312 312 Python 3.6.0
313 313 Type 'copyright', 'credits' or 'license' for more information
314 314 IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help.
315 315
316 316 In [1]: import aiohttp
317 317 ...: result = aiohttp.get('https://api.github.com')
318 318
319 319 In [2]: response = await result
320 320 <pause for a few 100s ms>
321 321
322 322 In [3]: await response.json()
323 323 Out[3]:
324 324 {'authorizations_url': 'https://api.github.com/authorizations',
325 325 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}',
326 326 ...
327 327 }
328 328
329 329 .. note::
330 330
331 331 Async integration is experimental code, behavior may change or be removed
332 332 between Python and IPython versions without warnings.
333 333
334 334 Integration is by default with `asyncio`, but other libraries can be configured --
335 335 like ``curio`` or ``trio`` -- to improve concurrency in the REPL::
336 336
337 337 In [1]: %autoawait trio
338 338
339 339 In [2]: import trio
340 340
341 341 In [3]: async def child(i):
342 342 ...: print(" child %s goes to sleep"%i)
343 343 ...: await trio.sleep(2)
344 344 ...: print(" child %s wakes up"%i)
345 345
346 346 In [4]: print('parent start')
347 347 ...: async with trio.open_nursery() as n:
348 348 ...: for i in range(3):
349 349 ...: n.spawn(child, i)
350 350 ...: print('parent end')
351 351 parent start
352 352 child 2 goes to sleep
353 353 child 0 goes to sleep
354 354 child 1 goes to sleep
355 355 <about 2 seconds pause>
356 356 child 2 wakes up
357 357 child 1 wakes up
358 358 child 0 wakes up
359 359 parent end
360 360
361 361 See :ref:`autoawait` for more information.
362 362
363 363
364 364 Asynchronous code in a Notebook interface or any other frontend using the
365 365 Jupyter Protocol will require further updates to the IPykernel package.
366 366
367 367 Non-Asynchronous code
368 368 ~~~~~~~~~~~~~~~~~~~~~
369 369
370 370 As the internal API of IPython is now asynchronous, IPython needs to run under
371 371 an event loop. In order to allow many workflows, (like using the :magic:`%run`
372 372 magic, or copy-pasting code that explicitly starts/stop event loop), when
373 373 top-level code is detected as not being asynchronous, IPython code is advanced
374 374 via a pseudo-synchronous runner, and may not advance pending tasks.
375 375
376 376 Change to Nested Embed
377 377 ~~~~~~~~~~~~~~~~~~~~~~
378 378
379 379 The introduction of the ability to run async code had some effect on the
380 380 ``IPython.embed()`` API. By default, embed will not allow you to run asynchronous
381 381 code unless an event loop is specified.
382 382
383 383 Effects on Magics
384 384 ~~~~~~~~~~~~~~~~~
385 385
386 386 Some magics will not work with async until they're updated.
387 387 Contributions welcome.
388 388
389 389 Expected Future changes
390 390 ~~~~~~~~~~~~~~~~~~~~~~~
391 391
392 392 We expect more internal but public IPython functions to become ``async``, and
393 393 will likely end up having a persistent event loop while IPython is running.
394 394
395 395 Thanks
396 396 ~~~~~~
397 397
398 398 This release took more than a year in the making.
399 399 The code was rebased a number of
400 400 times; leading to commit authorship that may have been lost in the final
401 401 Pull-Request. Huge thanks to many people for contribution, discussion, code,
402 402 documentation, use-cases: dalejung, danielballan, ellisonbg, fperez, gnestor,
403 403 minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many others.
404 404
405 405
406 406 Autoreload Improvement
407 407 ----------------------
408 408
409 409 The magic :magic:`%autoreload 2 <autoreload>` now captures new methods added to
410 410 classes. Earlier, only methods existing as of the initial import were being
411 411 tracked and updated.
412 412
413 413 This new feature helps dual environment development - Jupyter+IDE - where the
414 414 code gradually moves from notebook cells to package files as it gets
415 415 structured.
416 416
417 417 **Example**: An instance of the class ``MyClass`` will be able to access the
418 418 method ``cube()`` after it is uncommented and the file ``file1.py`` is saved on
419 419 disk.
420 420
421 421
422 422 .. code::
423 423
424 424 # notebook
425 425
426 426 from mymodule import MyClass
427 427 first = MyClass(5)
428 428
429 429 .. code::
430 430
431 431 # mymodule/file1.py
432 432
433 433 class MyClass:
434 434
435 435 def __init__(self, a=10):
436 436 self.a = a
437 437
438 438 def square(self):
439 439 print('compute square')
440 440 return self.a*self.a
441 441
442 442 # def cube(self):
443 443 # print('compute cube')
444 444 # return self.a*self.a*self.a
445 445
446 446
447 447
448 448
449 449 Misc
450 450 ----
451 451
452 452 The autoindent feature that was deprecated in 5.x was re-enabled and
453 453 un-deprecated in :ghpull:`11257`
454 454
455 455 Make :magic:`%run -n -i ... <run>` work correctly. Earlier, if :magic:`%run` was
456 456 passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308`
457 457
458 458
459 459 The :cellmagic:`%%script` (as well as :cellmagic:`%%bash`,
460 460 :cellmagic:`%%ruby`... ) cell magics now raise by default if the return code of
461 461 the given code is non-zero (thus halting execution of further cells in a
462 462 notebook). The behavior can be disable by passing the ``--no-raise-error`` flag.
463 463
464 464
465 465 Deprecations
466 466 ------------
467 467
468 468 A couple of unused functions and methods have been deprecated and will be removed
469 469 in future versions:
470 470
471 471 - ``IPython.utils.io.raw_print_err``
472 472 - ``IPython.utils.io.raw_print``
473 473
474 474
475 475 Backwards incompatible changes
476 476 ------------------------------
477 477
478 478 * The API for transforming input before it is parsed as Python code has been
479 479 completely redesigned: any custom input transformations will need to be
480 480 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