##// END OF EJS Templates
Start working on whatsnew notes for 7.19.
Matthias Bussonnier -
Show More
@@ -1,1163 +1,1193 b''
1 1 ============
2 2 7.x Series
3 3 ============
4 4
5 .. _version 719:
6
7 IPython 7.19
8 ============
9
10 IPython 7.19 accumulative two month of works, bug fixes and improvements, there
11 was exceptionally no release last month.
12
13 - Fix to restore the ability to specify more than one extension using command
14 line flags when using traitlets 5.0 :ghpull:`12543`
15 - Docs docs formatting that make the install commands work on zsh
16 :ghpull:`12587`
17 - Always display the last frame in tracebacks even if hidden with
18 ``__traceback_hide__`` :ghpull:`12601`
19 - Avoid an issue where a callback can be registered multiple times.
20 :ghpull:`12625`
21 - Avoid an issue in debugger mode where frames changes could be lost.
22 :ghpull:`12627`
23
24 - Never hide the frames that invoke a debugger, even if marked as hidden by
25 ``__traceback_hide__`` :ghpull:`12631`
26 - Fix calling the debugger in a recursive manner :ghpull:`12659`
27
28
29 A number of code changes have landed on master and we are getting close to
30 enough new features and codebase improvement that a 8.0 start to make sens.
31 For downstream packages, please start working on migrating downstream testing
32 away from iptest and using pytest, as nose will not work on Python 3.10 and we
33 will likely start removing it as a dependency for testing.
34
5 35 .. _version 718:
6 36
7 37 IPython 7.18
8 38 ============
9 39
10 40 IPython 7.18 is a minor release that mostly contains bugfixes.
11 41
12 42 - ``CRLF`` is now handled by magics my default; solving some issues due to copy
13 43 pasting on windows. :ghpull:`12475`
14 44
15 45 - Requiring pexpect ``>=4.3`` as we are Python 3.7+ only and earlier version of
16 46 pexpect will be incompatible. :ghpull:`12510`
17 47
18 48 - Minimum jedi version is now 0.16. :ghpull:`12488`
19 49
20 50
21 51
22 52 .. _version 717:
23 53
24 54 IPython 7.17
25 55 ============
26 56
27 57 IPython 7.17 brings a couple of new improvements to API and a couple of user
28 58 facing changes to make the terminal experience more user friendly.
29 59
30 60 :ghpull:`12407` introduces the ability to pass extra argument to the IPython
31 61 debugger class; this is to help a new project from ``kmaork``
32 62 (https://github.com/kmaork/madbg) to feature a fully remote debugger.
33 63
34 64 :ghpull:`12410` finally remove support for 3.6, while the codebase is still
35 65 technically compatible; IPython will not install on Python 3.6.
36 66
37 67 lots of work on the debugger and hidden frames from ``@impact27`` in
38 68 :ghpull:`12437`, :ghpull:`12445`, :ghpull:`12460` and in particular
39 69 :ghpull:`12453` which make the debug magic more robust at handling spaces.
40 70
41 71 Biggest API addition is code transformation which is done before code execution;
42 72 IPython allows a number of hooks to catch non-valid Python syntax (magic, prompt
43 73 stripping...etc). Transformers are usually called many time; typically:
44 74
45 75 - When trying to figure out whether the code is complete and valid (should we
46 76 insert a new line or execute ?)
47 77 - During actual code execution pass before giving the code to Python's
48 78 ``exec``.
49 79
50 80 This lead to issues when transformer might have had side effects; or do external
51 81 queries. Starting with IPython 7.17 you can expect your transformer to be called
52 82 less time.
53 83
54 84 Input transformers are now called only once in the execution path of
55 85 `InteractiveShell`, allowing to register transformer that potentially have side
56 86 effects (note that this is not recommended). Internal methods `should_run_async`, and
57 87 `run_cell_async` now take a recommended optional `transformed_cell`, and
58 88 `preprocessing_exc_tuple` parameters that will become mandatory at some point in
59 89 the future; that is to say cells need to be explicitly transformed to be valid
60 90 Python syntax ahead of trying to run them. :ghpull:`12440`;
61 91
62 92 ``input_transformers`` can now also have an attribute ``has_side_effects`` set
63 93 to `True`, when this attribute is present; this will prevent the transformers
64 94 from being ran when IPython is trying to guess whether the user input is
65 95 complete. Note that this may means you will need to explicitly execute in some
66 96 case where your transformations are now not ran; but will not affect users with
67 97 no custom extensions.
68 98
69 99
70 100 API Changes
71 101 -----------
72 102
73 103 Change of API and exposed objects automatically detected using `frappuccino
74 104 <https://pypi.org/project/frappuccino/>`_
75 105
76 106
77 107 The following items are new since 7.16.0::
78 108
79 109 + IPython.core.interactiveshell.InteractiveShell.get_local_scope(self, stack_depth)
80 110
81 111 The following signatures differ since 7.16.0::
82 112
83 113 - IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True)
84 114 + IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True, *, transformed_cell=None, preprocessing_exc_tuple=None)
85 115
86 116 - IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell)
87 117 + IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell, *, transformed_cell=None, preprocessing_exc_tuple=None)
88 118
89 119 - IPython.terminal.debugger.TerminalPdb.pt_init(self)
90 120 + IPython.terminal.debugger.TerminalPdb.pt_init(self, pt_session_options=None)
91 121
92 122 This method was added::
93 123
94 124 + IPython.core.interactiveshell.InteractiveShell.get_local_scope
95 125
96 126 Which is now also present on subclasses::
97 127
98 128 + IPython.terminal.embed.InteractiveShellEmbed.get_local_scope
99 129 + IPython.terminal.interactiveshell.TerminalInteractiveShell.get_local_scope
100 130
101 131
102 132 .. _version 716:
103 133
104 134 IPython 7.16
105 135 ============
106 136
107 137
108 138 The default traceback mode will now skip frames that are marked with
109 139 ``__tracebackhide__ = True`` and show how many traceback frames have been
110 140 skipped. This can be toggled by using :magic:`xmode` with the ``--show`` or
111 141 ``--hide`` attribute. It will have no effect on non verbose traceback modes.
112 142
113 143 The ipython debugger also now understands ``__tracebackhide__`` as well and will
114 144 skip hidden frames when displaying. Movement up and down the stack will skip the
115 145 hidden frames and will show how many frames were hidden. Internal IPython frames
116 146 are also now hidden by default. The behavior can be changed with the
117 147 ``skip_hidden`` while in the debugger, command and accepts "yes", "no", "true"
118 148 and "false" case insensitive parameters.
119 149
120 150
121 151 Misc Noticeable changes:
122 152 ------------------------
123 153
124 154 - Exceptions are now (re)raised when running notebooks via the :magic:`%run`, helping to catch issues in workflows and
125 155 pipelines. :ghpull:`12301`
126 156 - Fix inputhook for qt 5.15.0 :ghpull:`12355`
127 157 - Fix wx inputhook :ghpull:`12375`
128 158 - Add handling for malformed pathext env var (Windows) :ghpull:`12367`
129 159 - use $SHELL in system_piped :ghpull:`12360` for uniform behavior with
130 160 ipykernel.
131 161
132 162 Reproducible Build
133 163 ------------------
134 164
135 165 IPython 7.15 reproducible build did not work, so we try again this month
136 166 :ghpull:`12358`.
137 167
138 168
139 169 API Changes
140 170 -----------
141 171
142 172 Change of API and exposed objects automatically detected using `frappuccino
143 173 <https://pypi.org/project/frappuccino/>`_ (still in beta):
144 174
145 175
146 176 The following items are new and mostly related to understanding ``__tracebackbhide__``::
147 177
148 178 + IPython.core.debugger.Pdb.do_down(self, arg)
149 179 + IPython.core.debugger.Pdb.do_skip_hidden(self, arg)
150 180 + IPython.core.debugger.Pdb.do_up(self, arg)
151 181 + IPython.core.debugger.Pdb.hidden_frames(self, stack)
152 182 + IPython.core.debugger.Pdb.stop_here(self, frame)
153 183
154 184
155 185 The following items have been removed::
156 186
157 187 - IPython.core.debugger.Pdb.new_do_down
158 188 - IPython.core.debugger.Pdb.new_do_up
159 189
160 190 Those were implementation details.
161 191
162 192
163 193 .. _version 715:
164 194
165 195 IPython 7.15
166 196 ============
167 197
168 198 IPython 7.15 brings a number of bug fixes and user facing improvements.
169 199
170 200 Misc Noticeable changes:
171 201 ------------------------
172 202
173 203 - Long completion name have better elision in terminal :ghpull:`12284`
174 204 - I've started to test on Python 3.9 :ghpull:`12307` and fix some errors.
175 205 - Hi DPI scaling of figures when using qt eventloop :ghpull:`12314`
176 206 - Document the ability to have systemwide configuration for IPython.
177 207 :ghpull:`12328`
178 208 - Fix issues with input autoformatting :ghpull:`12336`
179 209 - ``IPython.core.debugger.Pdb`` is now interruptible (:ghpull:`12168`, in 7.14
180 210 but forgotten in release notes)
181 211 - Video HTML attributes (:ghpull:`12212`, in 7.14 but forgotten in release
182 212 notes)
183 213
184 214 Reproducible Build
185 215 ------------------
186 216
187 217 Starting with IPython 7.15, I am attempting to provide reproducible builds,
188 218 that is to say you should be able from the source tree to generate an sdist
189 219 and wheel that are identical byte for byte with the publish version on PyPI.
190 220
191 221 I've only tested on a couple of machines so far and the process is relatively
192 222 straightforward, so this mean that IPython not only have a deterministic build
193 223 process, but also I have either removed, or put under control all effects of
194 224 the build environments on the final artifact. I encourage you to attempt the
195 225 build process on your machine as documented in :ref:`core_developer_guide`
196 226 and let me know if you do not obtain an identical artifact.
197 227
198 228 While reproducible builds is critical to check that the supply chain of (open
199 229 source) software has not been compromised, it can also help to speedup many
200 230 of the build processes in large environment (conda, apt...) by allowing
201 231 better caching of intermediate build steps.
202 232
203 233 Learn more on `<https://reproducible-builds.org/>`_. `Reflections on trusting
204 234 trust <https://dl.acm.org/doi/10.1145/358198.358210>`_ is also one of the
205 235 cornerstone and recommended reads on this subject.
206 236
207 237 .. note::
208 238
209 239 The build commit from which the sdist is generated is also `signed
210 240 <https://en.wikipedia.org/wiki/Digital_signature>`_, so you should be able to
211 241 check it has not been compromised, and the git repository is a `merkle-tree
212 242 <https://en.wikipedia.org/wiki/Merkle_tree>`_, you can check the consistency
213 243 with `git-fsck <https://git-scm.com/docs/git-fsck>`_ which you likely `want
214 244 to enable by default
215 245 <https://gist.github.com/mbbx6spp/14b86437e794bffb4120>`_.
216 246
217 247 NEP29: Last version to support Python 3.6
218 248 -----------------------------------------
219 249
220 250 IPython 7.15 will be the Last IPython version to officially support Python
221 251 3.6, as stated by `NumPy Enhancement Proposal 29
222 252 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_. Starting with
223 253 next minor version of IPython I may stop testing on Python 3.6 and may stop
224 254 publishing release artifacts that install on Python 3.6
225 255
226 256 Highlighted features
227 257 --------------------
228 258
229 259 Highlighted features are not new, but seem to not be widely known, this
230 260 section will help you discover in more narrative form what you can do with
231 261 IPython.
232 262
233 263 Increase Tab Completion Menu Height
234 264 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
235 265
236 266 In terminal IPython it is possible to increase the hight of the tab-completion
237 267 menu. To do so set the value of
238 268 :configtrait:`TerminalInteractiveShell.space_for_menu`, this will reserve more
239 269 space at the bottom of the screen for various kind of menus in IPython including
240 270 tab completion and searching in history.
241 271
242 272 Autoformat Code in the terminal
243 273 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
244 274
245 275 If you have a preferred code formatter, you can configure IPython to
246 276 reformat your code. Set the value of
247 277 :configtrait:`TerminalInteractiveShell.autoformatter` to for example ``'black'``
248 278 and IPython will auto format your code when possible.
249 279
250 280
251 281 .. _version 714:
252 282
253 283 IPython 7.14
254 284 ============
255 285
256 286 IPython 7.14 is a minor release that fix a couple of bugs and prepare
257 287 compatibility with new or future versions of some libraries.
258 288
259 289 Important changes:
260 290 ------------------
261 291
262 292 - Fix compatibility with Sphinx 3+ :ghpull:`12235`
263 293 - Remove deprecated matplotlib parameter usage, compatibility with matplotlib
264 294 3.3+ :`122250`
265 295
266 296 Misc Changes
267 297 ------------
268 298
269 299 - set ``.py`` extension when editing current buffer in vi/emacs. :ghpull:`12167`
270 300 - support for unicode identifiers in ``?``/``??`` :ghpull:`12208`
271 301 - add extra options to the ``Video`` Rich objects :ghpull:`12212`
272 302 - add pretty-printing to ``SimpleNamespace`` :ghpull:`12230`
273 303
274 304 IPython.core.debugger.Pdb is now interruptible
275 305 ----------------------------------------------
276 306
277 307 A ``KeyboardInterrupt`` will now interrupt IPython's extended debugger, in order to make Jupyter able to interrupt it. (:ghpull:`12168`)
278 308
279 309 Video HTML attributes
280 310 ---------------------
281 311
282 312 Add an option to `IPython.display.Video` to change the attributes of the HTML display of the video (:ghpull:`12212`)
283 313
284 314
285 315 Pending deprecated imports
286 316 --------------------------
287 317
288 318 Many object present in ``IPython.core.display`` are there for internal use only,
289 319 and should already been imported from ``IPython.display`` by users and external
290 320 libraries. Trying to import those from ``IPython.core.display`` is still possible
291 321 but will trigger a
292 322 deprecation warning in later versions of IPython and will become errors in the
293 323 future.
294 324
295 325 This will simplify compatibility with other Python kernels (like Xeus-Python),
296 326 and simplify code base.
297 327
298 328
299 329
300 330
301 331 .. _version 713:
302 332
303 333 IPython 7.13
304 334 ============
305 335
306 336 IPython 7.13 is the final release of the 7.x branch since master is diverging
307 337 toward an 8.0. Exiting new features have already been merged in 8.0 and will
308 338 not be available on the 7.x branch. All the changes below have been backported
309 339 from the master branch.
310 340
311 341
312 342 - Fix inability to run PDB when inside an event loop :ghpull:`12141`
313 343 - Fix ability to interrupt some processes on windows :ghpull:`12137`
314 344 - Fix debugger shortcuts :ghpull:`12132`
315 345 - improve tab completion when inside a string by removing irrelevant elements :ghpull:`12128`
316 346 - Fix display of filename tab completion when the path is long :ghpull:`12122`
317 347 - Many removal of Python 2 specific code path :ghpull:`12110`
318 348 - displaying wav files do not require NumPy anymore, and is 5x to 30x faster :ghpull:`12113`
319 349
320 350 See the list of all closed issues and pull request on `github
321 351 <https://github.com/ipython/ipython/pulls?q=is%3Aclosed+milestone%3A7.13>`_.
322 352
323 353 .. _version 712:
324 354
325 355 IPython 7.12
326 356 ============
327 357
328 358 IPython 7.12 is a minor update that mostly brings code cleanup, removal of
329 359 longtime deprecated function and a couple update to documentation cleanup as well.
330 360
331 361 Notable changes are the following:
332 362
333 363 - Exit non-zero when ipython is given a file path to run that doesn't exist :ghpull:`12074`
334 364 - Test PR on ARM64 with Travis-CI :ghpull:`12073`
335 365 - Update CI to work with latest Pytest :ghpull:`12086`
336 366 - Add infrastructure to run ipykernel eventloop via trio :ghpull:`12097`
337 367 - Support git blame ignore revs :ghpull:`12091`
338 368 - Start multi-line ``__repr__`` s on their own line :ghpull:`12099`
339 369
340 370 .. _version 7111:
341 371
342 372 IPython 7.11.1
343 373 ==============
344 374
345 375 A couple of deprecated functions (no-op) have been reintroduces in py3compat as
346 376 Cython was still relying on them, and will be removed in a couple of versions.
347 377
348 378 .. _version 711:
349 379
350 380 IPython 7.11
351 381 ============
352 382
353 383 IPython 7.11 received a couple of compatibility fixes and code cleanup.
354 384
355 385 A number of function in the ``py3compat`` have been removed; a number of types
356 386 in the IPython code base are now non-ambiguous and now always ``unicode``
357 387 instead of ``Union[Unicode,bytes]``; many of the relevant code path have thus
358 388 been simplified/cleaned and types annotation added.
359 389
360 390 IPython support several verbosity level from exceptions. ``xmode plain`` now
361 391 support chained exceptions. :ghpull:`11999`
362 392
363 393 We are starting to remove ``shell=True`` in some usages of subprocess. While not directly
364 394 a security issue (as IPython is made to run arbitrary code anyway) it is not good
365 395 practice and we'd like to show the example. :ghissue:`12023`. This discussion
366 396 was started by ``@mschwager`` thanks to a new auditing tool they are working on
367 397 with duo-labs (`dlint <https://github.com/duo-labs/dlint>`_).
368 398
369 399 Work around some bugs in Python 3.9 tokenizer :ghpull:`12057`
370 400
371 401 IPython will now print its version after a crash. :ghpull:`11986`
372 402
373 403 This is likely the last release from the 7.x series that will see new feature.
374 404 The master branch will soon accept large code changes and thrilling new
375 405 features; the 7.x branch will only start to accept critical bug fixes, and
376 406 update dependencies.
377 407
378 408 .. _version 7102:
379 409
380 410 IPython 7.10.2
381 411 ==============
382 412
383 413 IPython 7.10.2 fix a couple of extra incompatibility between IPython, ipdb,
384 414 asyncio and Prompt Toolkit 3.
385 415
386 416 .. _version 7101:
387 417
388 418 IPython 7.10.1
389 419 ==============
390 420
391 421 IPython 7.10.1 fix a couple of incompatibilities with Prompt toolkit 3 (please
392 422 update Prompt toolkit to 3.0.2 at least), and fixes some interaction with
393 423 headless IPython.
394 424
395 425 .. _version 7100:
396 426
397 427 IPython 7.10.0
398 428 ==============
399 429
400 430 IPython 7.10 is the first double digit minor release in the last decade, and
401 431 first since the release of IPython 1.0, previous double digit minor release was
402 432 in August 2009.
403 433
404 434 We've been trying to give you regular release on the last Friday of every month
405 435 for a guaranty of rapid access to bug fixes and new features.
406 436
407 437 Unlike the previous first few releases that have seen only a couple of code
408 438 changes, 7.10 bring a number of changes, new features and bugfixes.
409 439
410 440 Stop Support for Python 3.5 – Adopt NEP 29
411 441 ------------------------------------------
412 442
413 443 IPython has decided to follow the informational `NEP 29
414 444 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_ which layout a clear
415 445 policy as to which version of (C)Python and NumPy are supported.
416 446
417 447 We thus dropped support for Python 3.5, and cleaned up a number of code path
418 448 that were Python-version dependant. If you are on 3.5 or earlier pip should
419 449 automatically give you the latest compatible version of IPython so you do not
420 450 need to pin to a given version.
421 451
422 452 Support for Prompt Toolkit 3.0
423 453 ------------------------------
424 454
425 455 Prompt Toolkit 3.0 was release a week before IPython 7.10 and introduces a few
426 456 breaking changes. We believe IPython 7.10 should be compatible with both Prompt
427 457 Toolkit 2.x and 3.x, though it has not been extensively tested with 3.x so
428 458 please report any issues.
429 459
430 460
431 461 Prompt Rendering Performance improvements
432 462 -----------------------------------------
433 463
434 464 Pull Request :ghpull:`11933` introduced an optimisation in the prompt rendering
435 465 logic that should decrease the resource usage of IPython when using the
436 466 _default_ configuration but could potentially introduce a regression of
437 467 functionalities if you are using a custom prompt.
438 468
439 469 We know assume if you haven't changed the default keybindings that the prompt
440 470 **will not change** during the duration of your input – which is for example
441 471 not true when using vi insert mode that switches between `[ins]` and `[nor]`
442 472 for the current mode.
443 473
444 474 If you are experiencing any issue let us know.
445 475
446 476 Code autoformatting
447 477 -------------------
448 478
449 479 The IPython terminal can now auto format your code just before entering a new
450 480 line or executing a command. To do so use the
451 481 ``--TerminalInteractiveShell.autoformatter`` option and set it to ``'black'``;
452 482 if black is installed IPython will use black to format your code when possible.
453 483
454 484 IPython cannot always properly format your code; in particular it will
455 485 auto formatting with *black* will only work if:
456 486
457 487 - Your code does not contains magics or special python syntax.
458 488
459 489 - There is no code after your cursor.
460 490
461 491 The Black API is also still in motion; so this may not work with all versions of
462 492 black.
463 493
464 494 It should be possible to register custom formatter, though the API is till in
465 495 flux.
466 496
467 497 Arbitrary Mimetypes Handing in Terminal (Aka inline images in terminal)
468 498 -----------------------------------------------------------------------
469 499
470 500 When using IPython terminal it is now possible to register function to handle
471 501 arbitrary mimetypes. While rendering non-text based representation was possible in
472 502 many jupyter frontend; it was not possible in terminal IPython, as usually
473 503 terminal are limited to displaying text. As many terminal these days provide
474 504 escape sequences to display non-text; bringing this loved feature to IPython CLI
475 505 made a lot of sens. This functionality will not only allow inline images; but
476 506 allow opening of external program; for example ``mplayer`` to "display" sound
477 507 files.
478 508
479 509 So far only the hooks necessary for this are in place, but no default mime
480 510 renderers added; so inline images will only be available via extensions. We will
481 511 progressively enable these features by default in the next few releases, and
482 512 contribution is welcomed.
483 513
484 514 We welcome any feedback on the API. See :ref:`shell_mimerenderer` for more
485 515 informations.
486 516
487 517 This is originally based on work form in :ghpull:`10610` from @stephanh42
488 518 started over two years ago, and still a lot need to be done.
489 519
490 520 MISC
491 521 ----
492 522
493 523 - Completions can define their own ordering :ghpull:`11855`
494 524 - Enable Plotting in the same cell than the one that import matplotlib
495 525 :ghpull:`11916`
496 526 - Allow to store and restore multiple variables at once :ghpull:`11930`
497 527
498 528 You can see `all pull-requests <https://github.com/ipython/ipython/pulls?q=is%3Apr+milestone%3A7.10+is%3Aclosed>`_ for this release.
499 529
500 530 API Changes
501 531 -----------
502 532
503 533 Change of API and exposed objects automatically detected using `frappuccino <https://pypi.org/project/frappuccino/>`_ (still in beta):
504 534
505 535 The following items are new in IPython 7.10::
506 536
507 537 + IPython.terminal.shortcuts.reformat_text_before_cursor(buffer, document, shell)
508 538 + IPython.terminal.interactiveshell.PTK3
509 539 + IPython.terminal.interactiveshell.black_reformat_handler(text_before_cursor)
510 540 + IPython.terminal.prompts.RichPromptDisplayHook.write_format_data(self, format_dict, md_dict='None')
511 541
512 542 The following items have been removed in 7.10::
513 543
514 544 - IPython.lib.pretty.DICT_IS_ORDERED
515 545
516 546 The following signatures differ between versions::
517 547
518 548 - IPython.extensions.storemagic.restore_aliases(ip)
519 549 + IPython.extensions.storemagic.restore_aliases(ip, alias='None')
520 550
521 551 Special Thanks
522 552 --------------
523 553
524 554 - @stephanh42 who started the work on inline images in terminal 2 years ago
525 555 - @augustogoulart who spent a lot of time triaging issues and responding to
526 556 users.
527 557 - @con-f-use who is my (@Carreau) first sponsor on GitHub, as a reminder if you
528 558 like IPython, Jupyter and many other library of the SciPy stack you can
529 559 donate to numfocus.org non profit
530 560
531 561 .. _version 790:
532 562
533 563 IPython 7.9.0
534 564 =============
535 565
536 566 IPython 7.9 is a small release with a couple of improvement and bug fixes.
537 567
538 568 - Xterm terminal title should be restored on exit :ghpull:`11910`
539 569 - special variables ``_``,``__``, ``___`` are not set anymore when cache size
540 570 is 0 or less. :ghpull:`11877`
541 571 - Autoreload should have regained some speed by using a new heuristic logic to
542 572 find all objects needing reload. This should avoid large objects traversal
543 573 like pandas dataframes. :ghpull:`11876`
544 574 - Get ready for Python 4. :ghpull:`11874`
545 575 - `%env` Magic now has heuristic to hide potentially sensitive values :ghpull:`11896`
546 576
547 577 This is a small release despite a number of Pull Request Pending that need to
548 578 be reviewed/worked on. Many of the core developers have been busy outside of
549 579 IPython/Jupyter and we thanks all contributor for their patience; we'll work on
550 580 these as soon as we have time.
551 581
552 582
553 583 .. _version780:
554 584
555 585 IPython 7.8.0
556 586 =============
557 587
558 588 IPython 7.8.0 contain a few bugfix and 2 new APIs:
559 589
560 590 - Enable changing the font color for LaTeX rendering :ghpull:`11840`
561 591 - and Re-Expose some PDB API (see below)
562 592
563 593 Expose Pdb API
564 594 --------------
565 595
566 596 Expose the built-in ``pdb.Pdb`` API. ``Pdb`` constructor arguments are generically
567 597 exposed, regardless of python version.
568 598 Newly exposed arguments:
569 599
570 600 - ``skip`` - Python 3.1+
571 601 - ``nosiginnt`` - Python 3.2+
572 602 - ``readrc`` - Python 3.6+
573 603
574 604 Try it out::
575 605
576 606 from IPython.terminal.debugger import TerminalPdb
577 607 pdb = TerminalPdb(skip=["skipthismodule"])
578 608
579 609
580 610 See :ghpull:`11840`
581 611
582 612 .. _version770:
583 613
584 614 IPython 7.7.0
585 615 =============
586 616
587 617 IPython 7.7.0 contain multiple bug fixes and documentation updates; Here are a
588 618 few of the outstanding issue fixed:
589 619
590 620 - Fix a bug introduced in 7.6 where the ``%matplotlib`` magic would fail on
591 621 previously acceptable arguments :ghpull:`11814`.
592 622 - Fix the manage location on freebsd :ghpull:`11808`.
593 623 - Fix error message about aliases after ``%reset`` call in ipykernel
594 624 :ghpull:`11806`
595 625 - Fix Duplication completions in emacs :ghpull:`11803`
596 626
597 627 We are planning to adopt `NEP29 <https://github.com/numpy/numpy/pull/14086>`_
598 628 (still currently in draft) which may make this minor version of IPython the
599 629 last one to support Python 3.5 and will make the code base more aggressive
600 630 toward removing compatibility with older versions of Python.
601 631
602 632 GitHub now support to give only "Triage" permissions to users; if you'd like to
603 633 help close stale issues and labels issues please reach to us with your GitHub
604 634 Username and we'll add you to the triage team. It is a great way to start
605 635 contributing and a path toward getting commit rights.
606 636
607 637 .. _version761:
608 638
609 639 IPython 7.6.1
610 640 =============
611 641
612 642 IPython 7.6.1 contain a critical bugfix in the ``%timeit`` magic, which would
613 643 crash on some inputs as a side effect of :ghpull:`11716`. See :ghpull:`11812`
614 644
615 645
616 646 .. _whatsnew760:
617 647
618 648 IPython 7.6.0
619 649 =============
620 650
621 651 IPython 7.6.0 contains a couple of bug fixes and number of small features
622 652 additions as well as some compatibility with the current development version of
623 653 Python 3.8.
624 654
625 655 - Add a ``-l`` option to :magic:`psearch` to list the available search
626 656 types. :ghpull:`11672`
627 657 - Support ``PathLike`` for ``DisplayObject`` and ``Image``. :ghpull:`11764`
628 658 - Configurability of timeout in the test suite for slow platforms.
629 659 :ghpull:`11756`
630 660 - Accept any casing for matplotlib backend. :ghpull:`121748`
631 661 - Properly skip test that requires numpy to be installed :ghpull:`11723`
632 662 - More support for Python 3.8 and positional only arguments (pep570)
633 663 :ghpull:`11720`
634 664 - Unicode names for the completion are loaded lazily on first use which
635 665 should decrease startup time. :ghpull:`11693`
636 666 - Autoreload now update the types of reloaded objects; this for example allow
637 667 pickling of reloaded objects. :ghpull:`11644`
638 668 - Fix a bug where ``%%time`` magic would suppress cell output. :ghpull:`11716`
639 669
640 670
641 671 Prepare migration to pytest (instead of nose) for testing
642 672 ---------------------------------------------------------
643 673
644 674 Most of the work between 7.5 and 7.6 was to prepare the migration from our
645 675 testing framework to pytest. Most of the test suite should now work by simply
646 676 issuing ``pytest`` from the root of the repository.
647 677
648 678 The migration to pytest is just at its beginning. Many of our test still rely
649 679 on IPython-specific plugins for nose using pytest (doctest using IPython syntax
650 680 is one example of this where test appear as "passing", while no code has been
651 681 ran). Many test also need to be updated like ``yield-test`` to be properly
652 682 parametrized tests.
653 683
654 684 Migration to pytest allowed me to discover a number of issues in our test
655 685 suite; which was hiding a number of subtle issues – or not actually running
656 686 some of the tests in our test suite – I have thus corrected many of those; like
657 687 improperly closed resources; or used of deprecated features. I also made use of
658 688 the ``pytest --durations=...`` to find some of our slowest test and speed them
659 689 up (our test suite can now be up to 10% faster). Pytest as also a variety of
660 690 plugins and flags which will make the code quality of IPython and the testing
661 691 experience better.
662 692
663 693 Misc
664 694 ----
665 695
666 696 We skipped the release of 7.6 at the end of May, but will attempt to get back
667 697 on schedule. We are starting to think about making introducing backward
668 698 incompatible change and start the 8.0 series.
669 699
670 700 Special Thanks to Gabriel (@gpotter2 on GitHub), who among other took care many
671 701 of the remaining task for 7.4 and 7.5, like updating the website.
672 702
673 703 .. _whatsnew750:
674 704
675 705 IPython 7.5.0
676 706 =============
677 707
678 708 IPython 7.5.0 consist mostly of bug-fixes, and documentation updates, with one
679 709 minor new feature. The `Audio` display element can now be assigned an element
680 710 id when displayed in browser. See :ghpull:`11670`
681 711
682 712 The major outstanding bug fix correct a change of behavior that was introduce
683 713 in 7.4.0 where some cell magics would not be able to access or modify global
684 714 scope when using the ``@needs_local_scope`` decorator. This was typically
685 715 encountered with the ``%%time`` and ``%%timeit`` magics. See :ghissue:`11659`
686 716 and :ghpull:`11698`.
687 717
688 718 .. _whatsnew740:
689 719
690 720 IPython 7.4.0
691 721 =============
692 722
693 723 Unicode name completions
694 724 ------------------------
695 725
696 726 Previously, we provided completion for a unicode name with its relative symbol.
697 727 With this, now IPython provides complete suggestions to unicode name symbols.
698 728
699 729 As on the PR, if user types ``\LAT<tab>``, IPython provides a list of
700 730 possible completions. In this case, it would be something like::
701 731
702 732 'LATIN CAPITAL LETTER A',
703 733 'LATIN CAPITAL LETTER B',
704 734 'LATIN CAPITAL LETTER C',
705 735 'LATIN CAPITAL LETTER D',
706 736 ....
707 737
708 738 This help to type unicode character that do not have short latex aliases, and
709 739 have long unicode names. for example ``Ν°``, ``\GREEK CAPITAL LETTER HETA``.
710 740
711 741 This feature was contributed by Luciana Marques :ghpull:`11583`.
712 742
713 743 Make audio normalization optional
714 744 ---------------------------------
715 745
716 746 Added 'normalize' argument to `IPython.display.Audio`. This argument applies
717 747 when audio data is given as an array of samples. The default of `normalize=True`
718 748 preserves prior behavior of normalizing the audio to the maximum possible range.
719 749 Setting to `False` disables normalization.
720 750
721 751
722 752 Miscellaneous
723 753 -------------
724 754
725 755 - Fix improper acceptation of ``return`` outside of functions. :ghpull:`11641`.
726 756 - Fixed PyQt 5.11 backwards incompatibility causing sip import failure.
727 757 :ghpull:`11613`.
728 758 - Fix Bug where ``type?`` would crash IPython. :ghpull:`1608`.
729 759 - Allow to apply ``@needs_local_scope`` to cell magics for convenience.
730 760 :ghpull:`11542`.
731 761
732 762 .. _whatsnew730:
733 763
734 764 IPython 7.3.0
735 765 =============
736 766
737 767 .. _whatsnew720:
738 768
739 769 IPython 7.3.0 bring several bug fixes and small improvements that you will
740 770 described bellow.
741 771
742 772 The biggest change to this release is the implementation of the ``%conda`` and
743 773 ``%pip`` magics, that will attempt to install packages in the **current
744 774 environment**. You may still need to restart your interpreter or kernel for the
745 775 change to be taken into account, but it should simplify installation of packages
746 776 into remote environment. Installing using pip/conda from the command line is
747 777 still the prefer method.
748 778
749 779 The ``%pip`` magic was already present, but was only printing a warning; now it
750 780 will actually forward commands to pip.
751 781
752 782 Misc bug fixes and improvements:
753 783
754 784 - Compatibility with Python 3.8.
755 785 - Do not expand shell variable in execution magics, and added the
756 786 ``no_var_expand`` decorator for magic requiring a similar functionality
757 787 :ghpull:`11516`
758 788 - Add ``%pip`` and ``%conda`` magic :ghpull:`11524`
759 789 - Re-initialize posix aliases after a ``%reset`` :ghpull:`11528`
760 790 - Allow the IPython command line to run ``*.ipynb`` files :ghpull:`11529`
761 791
762 792 IPython 7.2.0
763 793 =============
764 794
765 795 IPython 7.2.0 brings minor bugfixes, improvements, and new configuration options:
766 796
767 797 - Fix a bug preventing PySide2 GUI integration from working :ghpull:`11464`
768 798 - Run CI on Mac OS ! :ghpull:`11471`
769 799 - Fix IPython "Demo" mode. :ghpull:`11498`
770 800 - Fix ``%run`` magic with path in name :ghpull:`11499`
771 801 - Fix: add CWD to sys.path *after* stdlib :ghpull:`11502`
772 802 - Better rendering of signatures, especially long ones. :ghpull:`11505`
773 803 - Re-enable jedi by default if it's installed :ghpull:`11506`
774 804 - Add New ``minimal`` exception reporting mode (useful for educational purpose). See :ghpull:`11509`
775 805
776 806
777 807 Added ability to show subclasses when using pinfo and other utilities
778 808 ---------------------------------------------------------------------
779 809
780 810 When using ``?``/``??`` on a class, IPython will now list the first 10 subclasses.
781 811
782 812 Special Thanks to Chris Mentzel of the Moore Foundation for this feature. Chris
783 813 is one of the people who played a critical role in IPython/Jupyter getting
784 814 funding.
785 815
786 816 We are grateful for all the help Chris has given us over the years,
787 817 and we're now proud to have code contributed by Chris in IPython.
788 818
789 819 OSMagics.cd_force_quiet configuration option
790 820 --------------------------------------------
791 821
792 822 You can set this option to force the %cd magic to behave as if ``-q`` was passed:
793 823 ::
794 824
795 825 In [1]: cd /
796 826 /
797 827
798 828 In [2]: %config OSMagics.cd_force_quiet = True
799 829
800 830 In [3]: cd /tmp
801 831
802 832 In [4]:
803 833
804 834 See :ghpull:`11491`
805 835
806 836 In vi editing mode, whether the prompt includes the current vi mode can now be configured
807 837 -----------------------------------------------------------------------------------------
808 838
809 839 Set the ``TerminalInteractiveShell.prompt_includes_vi_mode`` to a boolean value
810 840 (default: True) to control this feature. See :ghpull:`11492`
811 841
812 842 .. _whatsnew710:
813 843
814 844 IPython 7.1.0
815 845 =============
816 846
817 847 IPython 7.1.0 is the first minor release after 7.0.0 and mostly brings fixes to
818 848 new features, internal refactoring, and fixes for regressions that happened during the 6.x->7.x
819 849 transition. It also brings **Compatibility with Python 3.7.1**, as we're
820 850 unwillingly relying on a bug in CPython.
821 851
822 852 New Core Dev:
823 853
824 854 - We welcome Jonathan Slenders to the commiters. Jonathan has done a fantastic
825 855 work on prompt_toolkit, and we'd like to recognise his impact by giving him
826 856 commit rights. :ghissue:`11397`
827 857
828 858 Notable Changes
829 859
830 860 - Major update of "latex to unicode" tab completion map (see below)
831 861
832 862 Notable New Features:
833 863
834 864 - Restore functionality and documentation of the **sphinx directive**, which
835 865 is now stricter (fail on error by daefault), has new configuration options,
836 866 has a brand new documentation page :ref:`ipython_directive` (which needs
837 867 some cleanup). It is also now *tested* so we hope to have less regressions.
838 868 :ghpull:`11402`
839 869
840 870 - ``IPython.display.Video`` now supports ``width`` and ``height`` arguments,
841 871 allowing a custom width and height to be set instead of using the video's
842 872 width and height. :ghpull:`11353`
843 873
844 874 - Warn when using ``HTML('<iframe>')`` instead of ``IFrame`` :ghpull:`11350`
845 875
846 876 - Allow Dynamic switching of editing mode between vi/emacs and show
847 877 normal/input mode in prompt when using vi. :ghpull:`11390`. Use ``%config
848 878 TerminalInteractiveShell.editing_mode = 'vi'`` or ``%config
849 879 TerminalInteractiveShell.editing_mode = 'emacs'`` to dynamically switch
850 880 between modes.
851 881
852 882
853 883 Notable Fixes:
854 884
855 885 - Fix entering of **multi-line blocks in terminal** IPython, and various
856 886 crashes in the new input transformation machinery :ghpull:`11354`,
857 887 :ghpull:`11356`, :ghpull:`11358`. These also fix a **Compatibility bug
858 888 with Python 3.7.1**.
859 889
860 890 - Fix moving through generator stack in ipdb :ghpull:`11266`
861 891
862 892 - %Magic command arguments now support quoting. :ghpull:`11330`
863 893
864 894 - Re-add ``rprint`` and ``rprinte`` aliases. :ghpull:`11331`
865 895
866 896 - Remove implicit dependency on ``ipython_genutils`` :ghpull:`11317`
867 897
868 898 - Make ``nonlocal`` raise ``SyntaxError`` instead of silently failing in async
869 899 mode. :ghpull:`11382`
870 900
871 901 - Fix mishandling of magics and ``= !`` assignment just after a dedent in
872 902 nested code blocks :ghpull:`11418`
873 903
874 904 - Fix instructions for custom shortcuts :ghpull:`11426`
875 905
876 906
877 907 Notable Internals improvements:
878 908
879 909 - Use of ``os.scandir`` (Python 3 only) to speed up some file system operations.
880 910 :ghpull:`11365`
881 911
882 912 - use ``perf_counter`` instead of ``clock`` for more precise
883 913 timing results with ``%time`` :ghpull:`11376`
884 914
885 915 Many thanks to all the contributors and in particular to ``bartskowron`` and
886 916 ``tonyfast`` who handled some pretty complicated bugs in the input machinery. We
887 917 had a number of first time contributors and maybe hacktoberfest participants that
888 918 made significant contributions and helped us free some time to focus on more
889 919 complicated bugs.
890 920
891 921 You
892 922 can see all the closed issues and Merged PR, new features and fixes `here
893 923 <https://github.com/ipython/ipython/issues?utf8=%E2%9C%93&q=+is%3Aclosed+milestone%3A7.1+>`_.
894 924
895 925 Unicode Completion update
896 926 -------------------------
897 927
898 928 In IPython 7.1 the Unicode completion map has been updated and synchronized with
899 929 the Julia language.
900 930
901 931 Added and removed character characters:
902 932
903 933 ``\jmath`` (``Θ·``), ``\\underleftrightarrow`` (U+034D, combining) have been
904 934 added, while ``\\textasciicaron`` have been removed
905 935
906 936 Some sequences have seen their prefix removed:
907 937
908 938 - 6 characters ``\text...<tab>`` should now be inputed with ``\...<tab>`` directly,
909 939 - 45 characters ``\Elz...<tab>`` should now be inputed with ``\...<tab>`` directly,
910 940 - 65 characters ``\B...<tab>`` should now be inputed with ``\...<tab>`` directly,
911 941 - 450 characters ``\m...<tab>`` should now be inputed with ``\...<tab>`` directly,
912 942
913 943 Some sequences have seen their prefix shortened:
914 944
915 945 - 5 characters ``\mitBbb...<tab>`` should now be inputed with ``\bbi...<tab>`` directly,
916 946 - 52 characters ``\mit...<tab>`` should now be inputed with ``\i...<tab>`` directly,
917 947 - 216 characters ``\mbfit...<tab>`` should now be inputed with ``\bi...<tab>`` directly,
918 948 - 222 characters ``\mbf...<tab>`` should now be inputed with ``\b...<tab>`` directly,
919 949
920 950 A couple of characters had their sequence simplified:
921 951
922 952 - ``Γ°``, type ``\dh<tab>``, instead of ``\eth<tab>``
923 953 - ``Δ§``, type ``\hbar<tab>``, instead of ``\Elzxh<tab>``
924 954 - ``ΙΈ``, type ``\ltphi<tab>``, instead of ``\textphi<tab>``
925 955 - ``Ο΄``, type ``\varTheta<tab>``, instead of ``\textTheta<tab>``
926 956 - ``ℇ``, type ``\eulermascheroni<tab>``, instead of ``\Eulerconst<tab>``
927 957 - ``β„Ž``, type ``\planck<tab>``, instead of ``\Planckconst<tab>``
928 958
929 959 - U+0336 (COMBINING LONG STROKE OVERLAY), type ``\strike<tab>``, instead of ``\Elzbar<tab>``.
930 960
931 961 A couple of sequences have been updated:
932 962
933 963 - ``\varepsilon`` now gives ``Ι›`` (GREEK SMALL LETTER EPSILON) instead of ``Ξ΅`` (GREEK LUNATE EPSILON SYMBOL),
934 964 - ``\underbar`` now gives U+0331 (COMBINING MACRON BELOW) instead of U+0332 (COMBINING LOW LINE).
935 965
936 966
937 967 .. _whatsnew700:
938 968
939 969 IPython 7.0.0
940 970 =============
941 971
942 972 Released Thursday September 27th, 2018
943 973
944 974 IPython 7 includes major feature improvements.
945 975 This is also the second major version of IPython to support only
946 976 Python 3 – starting at Python 3.4. Python 2 is still community-supported
947 977 on the bugfix only 5.x branch, but we remind you that Python 2 "end of life"
948 978 is on Jan 1st 2020.
949 979
950 980 We were able to backport bug fixes to the 5.x branch thanks to our backport bot which
951 981 backported more than `70 Pull-Requests
952 982 <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>`_
953 983
954 984 The IPython 6.x branch will likely not see any further release unless critical
955 985 bugs are found.
956 986
957 987 Make sure you have pip > 9.0 before upgrading. You should be able to update by running:
958 988
959 989 .. code::
960 990
961 991 pip install ipython --upgrade
962 992
963 993 .. only:: ipydev
964 994
965 995 If you are trying to install or update an ``alpha``, ``beta``, or ``rc``
966 996 version, use pip ``--pre`` flag.
967 997
968 998 .. code::
969 999
970 1000 pip install ipython --upgrade --pre
971 1001
972 1002
973 1003 Or, if you have conda installed:
974 1004
975 1005 .. code::
976 1006
977 1007 conda install ipython
978 1008
979 1009
980 1010
981 1011 Prompt Toolkit 2.0
982 1012 ------------------
983 1013
984 1014 IPython 7.0+ now uses ``prompt_toolkit 2.0``. If you still need to use an earlier
985 1015 ``prompt_toolkit`` version, you may need to pin IPython to ``<7.0``.
986 1016
987 1017 Autowait: Asynchronous REPL
988 1018 ---------------------------
989 1019
990 1020 Staring with IPython 7.0 on Python 3.6+, IPython can automatically ``await``
991 1021 top level code. You should not need to access an event loop or runner
992 1022 yourself. To learn more, read the :ref:`autoawait` section of our docs, see
993 1023 :ghpull:`11265`, or try the following code::
994 1024
995 1025 Python 3.6.0
996 1026 Type 'copyright', 'credits' or 'license' for more information
997 1027 IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help.
998 1028
999 1029 In [1]: import aiohttp
1000 1030 ...: result = aiohttp.get('https://api.github.com')
1001 1031
1002 1032 In [2]: response = await result
1003 1033 <pause for a few 100s ms>
1004 1034
1005 1035 In [3]: await response.json()
1006 1036 Out[3]:
1007 1037 {'authorizations_url': 'https://api.github.com/authorizations',
1008 1038 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}',
1009 1039 ...
1010 1040 }
1011 1041
1012 1042 .. note::
1013 1043
1014 1044 Async integration is experimental code, behavior may change or be removed
1015 1045 between Python and IPython versions without warnings.
1016 1046
1017 1047 Integration is by default with `asyncio`, but other libraries can be configured --
1018 1048 like ``curio`` or ``trio`` -- to improve concurrency in the REPL::
1019 1049
1020 1050 In [1]: %autoawait trio
1021 1051
1022 1052 In [2]: import trio
1023 1053
1024 1054 In [3]: async def child(i):
1025 1055 ...: print(" child %s goes to sleep"%i)
1026 1056 ...: await trio.sleep(2)
1027 1057 ...: print(" child %s wakes up"%i)
1028 1058
1029 1059 In [4]: print('parent start')
1030 1060 ...: async with trio.open_nursery() as n:
1031 1061 ...: for i in range(3):
1032 1062 ...: n.spawn(child, i)
1033 1063 ...: print('parent end')
1034 1064 parent start
1035 1065 child 2 goes to sleep
1036 1066 child 0 goes to sleep
1037 1067 child 1 goes to sleep
1038 1068 <about 2 seconds pause>
1039 1069 child 2 wakes up
1040 1070 child 1 wakes up
1041 1071 child 0 wakes up
1042 1072 parent end
1043 1073
1044 1074 See :ref:`autoawait` for more information.
1045 1075
1046 1076
1047 1077 Asynchronous code in a Notebook interface or any other frontend using the
1048 1078 Jupyter Protocol will require further updates to the IPykernel package.
1049 1079
1050 1080 Non-Asynchronous code
1051 1081 ~~~~~~~~~~~~~~~~~~~~~
1052 1082
1053 1083 As the internal API of IPython is now asynchronous, IPython needs to run under
1054 1084 an event loop. In order to allow many workflows, (like using the :magic:`%run`
1055 1085 magic, or copy-pasting code that explicitly starts/stop event loop), when
1056 1086 top-level code is detected as not being asynchronous, IPython code is advanced
1057 1087 via a pseudo-synchronous runner, and may not advance pending tasks.
1058 1088
1059 1089 Change to Nested Embed
1060 1090 ~~~~~~~~~~~~~~~~~~~~~~
1061 1091
1062 1092 The introduction of the ability to run async code had some effect on the
1063 1093 ``IPython.embed()`` API. By default, embed will not allow you to run asynchronous
1064 1094 code unless an event loop is specified.
1065 1095
1066 1096 Effects on Magics
1067 1097 ~~~~~~~~~~~~~~~~~
1068 1098
1069 1099 Some magics will not work with async until they're updated.
1070 1100 Contributions welcome.
1071 1101
1072 1102 Expected Future changes
1073 1103 ~~~~~~~~~~~~~~~~~~~~~~~
1074 1104
1075 1105 We expect more internal but public IPython functions to become ``async``, and
1076 1106 will likely end up having a persistent event loop while IPython is running.
1077 1107
1078 1108 Thanks
1079 1109 ~~~~~~
1080 1110
1081 1111 This release took more than a year in the making.
1082 1112 The code was rebased a number of
1083 1113 times; leading to commit authorship that may have been lost in the final
1084 1114 Pull-Request. Huge thanks to many people for contribution, discussion, code,
1085 1115 documentation, use-cases: dalejung, danielballan, ellisonbg, fperez, gnestor,
1086 1116 minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many others.
1087 1117
1088 1118
1089 1119 Autoreload Improvement
1090 1120 ----------------------
1091 1121
1092 1122 The magic :magic:`%autoreload 2 <autoreload>` now captures new methods added to
1093 1123 classes. Earlier, only methods existing as of the initial import were being
1094 1124 tracked and updated.
1095 1125
1096 1126 This new feature helps dual environment development - Jupyter+IDE - where the
1097 1127 code gradually moves from notebook cells to package files as it gets
1098 1128 structured.
1099 1129
1100 1130 **Example**: An instance of the class ``MyClass`` will be able to access the
1101 1131 method ``cube()`` after it is uncommented and the file ``file1.py`` is saved on
1102 1132 disk.
1103 1133
1104 1134
1105 1135 .. code::
1106 1136
1107 1137 # notebook
1108 1138
1109 1139 from mymodule import MyClass
1110 1140 first = MyClass(5)
1111 1141
1112 1142 .. code::
1113 1143
1114 1144 # mymodule/file1.py
1115 1145
1116 1146 class MyClass:
1117 1147
1118 1148 def __init__(self, a=10):
1119 1149 self.a = a
1120 1150
1121 1151 def square(self):
1122 1152 print('compute square')
1123 1153 return self.a*self.a
1124 1154
1125 1155 # def cube(self):
1126 1156 # print('compute cube')
1127 1157 # return self.a*self.a*self.a
1128 1158
1129 1159
1130 1160
1131 1161
1132 1162 Misc
1133 1163 ----
1134 1164
1135 1165 The autoindent feature that was deprecated in 5.x was re-enabled and
1136 1166 un-deprecated in :ghpull:`11257`
1137 1167
1138 1168 Make :magic:`%run -n -i ... <run>` work correctly. Earlier, if :magic:`%run` was
1139 1169 passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308`
1140 1170
1141 1171
1142 1172 The :cellmagic:`%%script` (as well as :cellmagic:`%%bash`,
1143 1173 :cellmagic:`%%ruby`... ) cell magics now raise by default if the return code of
1144 1174 the given code is non-zero (thus halting execution of further cells in a
1145 1175 notebook). The behavior can be disable by passing the ``--no-raise-error`` flag.
1146 1176
1147 1177
1148 1178 Deprecations
1149 1179 ------------
1150 1180
1151 1181 A couple of unused functions and methods have been deprecated and will be removed
1152 1182 in future versions:
1153 1183
1154 1184 - ``IPython.utils.io.raw_print_err``
1155 1185 - ``IPython.utils.io.raw_print``
1156 1186
1157 1187
1158 1188 Backwards incompatible changes
1159 1189 ------------------------------
1160 1190
1161 1191 * The API for transforming input before it is parsed as Python code has been
1162 1192 completely redesigned: any custom input transformations will need to be
1163 1193 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