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