##// END OF EJS Templates
whats new 8.13
Matthias Bussonnier -
Show More
@@ -1,1654 +1,1682 b''
1 1 ============
2 2 8.x Series
3 3 ============
4 4
5
6 .. _version 8.13:
7
8 IPython 8.13
9 ------------
10
11 As usual for the end of the month, minor release of IPython. This release is
12 significant in that it not only has a number of bugfixes, but also drop support
13 for Python 3.8 as per NEP 29 (:ghpull:`14023`).
14
15 All the critical bugfixes have been backported onto the 8.12.1 release (see
16 below). In addition to that went into 8.12.1 you'll find:
17
18 - Pretty reprensentation for ``Counter`` has been fixed to match the Python one
19 and be in decreasing order. :ghpull:`14032`
20 - Module completion is better when jedi is disabled :ghpull:`14029`.
21 - Improvment of ``%%bash`` magic that would get stuck :ghpull:`14019`
22
23
24 We hope you enjoy this release an will maybe see you at JupyterCon in less than
25 two weeks.
26
27 As usual you can find the full list of PRs on GitHub under `the 8.12.1 milestone
28 <https://github.com/ipython/ipython/milestone/115?closed=1>`__.
29
30 Thanks to the D.E. Shaw group for the request and sponsoring the work.
31
32
5 33 .. _version 8.12.1:
6 34
7 35 IPython 8.12.1
8 36 --------------
9 37
10 38 This is the twin release of IPython 8.13 that contain only critical UI and bug
11 39 fixes. The next minor version of IPython has dropped support for Python 3.8 – as
12 40 per Nep 29 and this IPython 8.12.x will now only receive bugfixes.
13 41
14 42
15 43 - :ghpull:`14004` Fix a bug introduced in IPython 8.12 that crash when
16 44 inspecting some docstrings.
17 45 - :ghpull:`14010` Fix fast traceback code that was not working in some case.
18 46 - :ghpull:`14014` Fix ``%page`` magic broken in some case.
19 47 - :ghpull:`14026`, :ghpull:`14027` Tweak default shortcut with respect to
20 48 autosuggestions.
21 49 - :ghpull:`14033` add back the ability to use ``.get()`` on OInfo object for
22 50 backward compatibility with h5py (this will be re-deprecated later, and h5py
23 51 will also get a fix).
24 52
25 53 As usual you can find the full list of PRs on GitHub under `the 8.12.1 milestone
26 54 <https://github.com/ipython/ipython/milestone/116?closed=1>`__.
27 55
28 56 Thanks to the D.E. Shaw group for the request and sponsoring the work.
29 57
30 58 .. _version 8.12.0:
31 59
32 60 IPython 8.12
33 61 ------------
34 62
35 63 Hopefully slightly early release for IPython 8.12. Last Thursday of the month,
36 64 even if I guess it's likely already Friday somewhere in the pacific ocean.
37 65
38 66 A number of PRs and bug fixes this month with close to 20 PRs merged !
39 67
40 68
41 69 The IPython repo reached :ghpull:`14000` !! Actually the PR that create those exact release
42 70 note is :ghpull:`14000`. Ok, more issues and PR is not always better, and I'd
43 71 love to have more time to close issues and Pull Requests.
44 72
45 73 Let's note that in less than 2 month JupyterCon is back, in Paris please visit
46 74 `jupytercon.com <https://jupytercon.com>`__, and looking forward to see you
47 75 there.
48 76
49 77 Packagers should take note that ``typing_extension`` is now a mandatory dependency
50 78 for Python versions ``<3.10``.
51 79
52 80
53 81
54 82 Let's note also that according to `NEP29
55 83 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`__, It is soon time to
56 84 stop support for Python 3.8 that will be release more than 3 and 1/2 years ago::
57 85
58 86 On Apr 14, 2023 drop support for Python 3.8 (initially released on Oct 14, 2019)
59 87
60 88 Thus I am likely to stop advertising support for Python 3.8 in the next
61 89 release at the end of April.
62 90
63 91
64 92 Here are some miscellaneous updates of interest:
65 93
66 94 - :ghpull:`13957` brings updates to the Qt integration, particularly for Qt6.
67 95 - :ghpull:`13960` fixes the %debug magic command to give access to the local
68 96 scope.
69 97 - :ghpull:`13964` fixes some crashes with the new fast traceback code. Note that
70 98 there are still some issues with the fast traceback code, and I a, likely
71 99 to fix and tweak behavior.
72 100 - :ghpull:`13973` We are slowly migrating IPython internals to use proper type
73 101 objects/dataclasses instead of dictionaries to allow static typing checks.
74 102 These are technically public API and could lead to breakage, so please let us
75 103 know if that's the case and I'll mitigate.
76 104 - :ghpull:`13990`, :ghpull:`13991`, :ghpull:`13994` all improve keybinding and
77 105 shortcut configurability.
78 106
79 107 As usual you can find the full list of PRs on GitHub under `the 8.12 milestone
80 108 <https://github.com/ipython/ipython/milestone/114?closed=1>`__.
81 109
82 110 We want to thank the D.E. Shaw group for requesting and sponsoring the work on
83 111 the following big feature. We had productive discussions on how to best expose
84 112 this feature
85 113
86 114 Dynamic documentation dispatch
87 115 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
88 116
89 117 We are experimenting with dynamic documentation dispatch for object attribute.
90 118 See :ghissue:`13860`. The goal is to allow object to define documentation for
91 119 their attributes, properties, even when those are dynamically defined with
92 120 `__getattr__`.
93 121
94 122 In particular when those objects are base types it can be useful to show the
95 123 documentation
96 124
97 125
98 126 .. code-block:: ipython
99 127
100 128
101 129 In [1]: class User:
102 130 ...:
103 131 ...: __custom_documentations__ = {
104 132 ...: "first": "The first name of the user.",
105 133 ...: "last": "The last name of the user.",
106 134 ...: }
107 135 ...:
108 136 ...: first:str
109 137 ...: last:str
110 138 ...:
111 139 ...: def __init__(self, first, last):
112 140 ...: self.first = first
113 141 ...: self.last = last
114 142 ...:
115 143 ...: @property
116 144 ...: def full(self):
117 145 ...: """`self.first` and `self.last` joined by a space."""
118 146 ...: return self.first + " " + self.last
119 147 ...:
120 148 ...:
121 149 ...: user = Person('Jane', 'Doe')
122 150
123 151 In [2]: user.first?
124 152 Type: str
125 153 String form: Jane
126 154 Length: 4
127 155 Docstring: the first name of a the person object, a str
128 156 Class docstring:
129 157 ....
130 158
131 159 In [3]: user.last?
132 160 Type: str
133 161 String form: Doe
134 162 Length: 3
135 163 Docstring: the last name, also a str
136 164 ...
137 165
138 166
139 167 We can see here the symmetry with IPython looking for the docstring on the
140 168 properties:
141 169
142 170 .. code-block:: ipython
143 171
144 172
145 173 In [4]: user.full?
146 174 HERE
147 175 Type: property
148 176 String form: <property object at 0x102bb15d0>
149 177 Docstring: first and last join by a space
150 178
151 179
152 180 Note that while in the above example we use a static dictionary, libraries may
153 181 decide to use a custom object that define ``__getitem__``, we caution against
154 182 using objects that would trigger computation to show documentation, but it is
155 183 sometime preferable for highly dynamic code that for example export ans API as
156 184 object.
157 185
158 186
159 187
160 188 .. _version 8.11.0:
161 189
162 190 IPython 8.11
163 191 ------------
164 192
165 193 Back on almost regular monthly schedule for IPython with end-of-month
166 194 really-late-Friday release to make sure some bugs are properly fixed.
167 195 Small addition of with a few new features, bugfix and UX improvements.
168 196
169 197 This is a non-exhaustive list, but among other you will find:
170 198
171 199 Faster Traceback Highlighting
172 200 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
173 201
174 202 Resurrection of pre-IPython-8 traceback highlighting code.
175 203
176 204 Really long and complicated files were slow to highlight in traceback with
177 205 IPython 8 despite upstream improvement that make many case better. Therefore
178 206 starting with IPython 8.11 when one of the highlighted file is more than 10 000
179 207 line long by default, we'll fallback to a faster path that does not have all the
180 208 features of highlighting failing AST nodes.
181 209
182 210 This can be configures by setting the value of
183 211 ``IPython.code.ultratb.FAST_THRESHOLD`` to an arbitrary low or large value.
184 212
185 213
186 214 Autoreload verbosity
187 215 ~~~~~~~~~~~~~~~~~~~~
188 216
189 217 We introduce more descriptive names for the ``%autoreload`` parameter:
190 218
191 219 - ``%autoreload now`` (also ``%autoreload``) - perform autoreload immediately.
192 220 - ``%autoreload off`` (also ``%autoreload 0``) - turn off autoreload.
193 221 - ``%autoreload explicit`` (also ``%autoreload 1``) - turn on autoreload only for modules
194 222 whitelisted by ``%aimport`` statements.
195 223 - ``%autoreload all`` (also ``%autoreload 2``) - turn on autoreload for all modules except those
196 224 blacklisted by ``%aimport`` statements.
197 225 - ``%autoreload complete`` (also ``%autoreload 3``) - all the fatures of ``all`` but also adding new
198 226 objects from the imported modules (see
199 227 IPython/extensions/tests/test_autoreload.py::test_autoload_newly_added_objects).
200 228
201 229 The original designations (e.g. "2") still work, and these new ones are case-insensitive.
202 230
203 231 Additionally, the option ``--print`` or ``-p`` can be added to the line to print the names of
204 232 modules being reloaded. Similarly, ``--log`` or ``-l`` will output the names to the logger at INFO
205 233 level. Both can be used simultaneously.
206 234
207 235 The parsing logic for ``%aimport`` is now improved such that modules can be whitelisted and
208 236 blacklisted in the same line, e.g. it's now possible to call ``%aimport os, -math`` to include
209 237 ``os`` for ``%autoreload explicit`` and exclude ``math`` for modes ``all`` and ``complete``.
210 238
211 239 Terminal shortcuts customization
212 240 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
213 241
214 242 Previously modifying shortcuts was only possible by hooking into startup files
215 243 and practically limited to adding new shortcuts or removing all shortcuts bound
216 244 to a specific key. This release enables users to override existing terminal
217 245 shortcuts, disable them or add new keybindings.
218 246
219 247 For example, to set the :kbd:`right` to accept a single character of auto-suggestion
220 248 you could use::
221 249
222 250 my_shortcuts = [
223 251 {
224 252 "command": "IPython:auto_suggest.accept_character",
225 253 "new_keys": ["right"]
226 254 }
227 255 ]
228 256 %config TerminalInteractiveShell.shortcuts = my_shortcuts
229 257
230 258 You can learn more in :std:configtrait:`TerminalInteractiveShell.shortcuts`
231 259 configuration reference.
232 260
233 261 Miscellaneous
234 262 ~~~~~~~~~~~~~
235 263
236 264 - ``%gui`` should now support PySide6. :ghpull:`13864`
237 265 - Cli shortcuts can now be configured :ghpull:`13928`, see above.
238 266 (note that there might be an issue with prompt_toolkit 3.0.37 and shortcut configuration).
239 267
240 268 - Capture output should now respect ``;`` semicolon to suppress output.
241 269 :ghpull:`13940`
242 270 - Base64 encoded images (in jupyter frontend), will not have trailing newlines.
243 271 :ghpull:`13941`
244 272
245 273 As usual you can find the full list of PRs on GitHub under `the 8.11 milestone
246 274 <https://github.com/ipython/ipython/milestone/113?closed=1>`__.
247 275
248 276 Thanks to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
249 277 work on IPython and related libraries.
250 278
251 279 .. _version 8.10.0:
252 280
253 281 IPython 8.10
254 282 ------------
255 283
256 284 Out of schedule release of IPython with minor fixes to patch a potential CVE-2023-24816.
257 285 This is a really low severity CVE that you most likely are not affected by unless:
258 286
259 287 - You are on windows.
260 288 - You have a custom build of Python without ``_ctypes``
261 289 - You cd or start IPython or Jupyter in untrusted directory which names may be
262 290 valid shell commands.
263 291
264 292 You can read more on `the advisory
265 293 <https://github.com/ipython/ipython/security/advisories/GHSA-29gw-9793-fvw7>`__.
266 294
267 295 In addition to fixing this CVE we also fix a couple of outstanding bugs and issues.
268 296
269 297 As usual you can find the full list of PRs on GitHub under `the 8.10 milestone
270 298 <https://github.com/ipython/ipython/milestone/112?closed=1>`__.
271 299
272 300 In Particular:
273 301
274 302 - bump minimum numpy to `>=1.21` version following NEP29. :ghpull:`13930`
275 303 - fix for compatibility with MyPy 1.0. :ghpull:`13933`
276 304 - fix nbgrader stalling when IPython's ``showtraceback`` function is
277 305 monkeypatched. :ghpull:`13934`
278 306
279 307
280 308
281 309 As this release also contains those minimal changes in addition to fixing the
282 310 CVE I decided to bump the minor version anyway.
283 311
284 312 This will not affect the normal release schedule, so IPython 8.11 is due in
285 313 about 2 weeks.
286 314
287 315 .. _version 8.9.0:
288 316
289 317 IPython 8.9.0
290 318 -------------
291 319
292 320 Second release of IPython in 2023, last Friday of the month, we are back on
293 321 track. This is a small release with a few bug-fixes, and improvements, mostly
294 322 with respect to terminal shortcuts.
295 323
296 324
297 325 The biggest improvement for 8.9 is a drastic amelioration of the
298 326 auto-suggestions sponsored by D.E. Shaw and implemented by the more and more
299 327 active contributor `@krassowski <https://github.com/krassowski>`.
300 328
301 329 - ``right`` accepts a single character from suggestion
302 330 - ``ctrl+right`` accepts a semantic token (macos default shortcuts take
303 331 precedence and need to be disabled to make this work)
304 332 - ``backspace`` deletes a character and resumes hinting autosuggestions
305 333 - ``ctrl-left`` accepts suggestion and moves cursor left one character.
306 334 - ``backspace`` deletes a character and resumes hinting autosuggestions
307 335 - ``down`` moves to suggestion to later in history when no lines are present below the cursors.
308 336 - ``up`` moves to suggestion from earlier in history when no lines are present above the cursor.
309 337
310 338 This is best described by the Gif posted by `@krassowski
311 339 <https://github.com/krassowski>`, and in the PR itself :ghpull:`13888`.
312 340
313 341 .. image:: ../_images/autosuggest.gif
314 342
315 343 Please report any feedback in order for us to improve the user experience.
316 344 In particular we are also working on making the shortcuts configurable.
317 345
318 346 If you are interested in better terminal shortcuts, I also invite you to
319 347 participate in issue `13879
320 348 <https://github.com/ipython/ipython/issues/13879>`__.
321 349
322 350
323 351 As we follow `NEP29
324 352 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`__, next version of
325 353 IPython will officially stop supporting numpy 1.20, and will stop supporting
326 354 Python 3.8 after April release.
327 355
328 356 As usual you can find the full list of PRs on GitHub under `the 8.9 milestone
329 357 <https://github.com/ipython/ipython/milestone/111?closed=1>`__.
330 358
331 359
332 360 Thanks to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
333 361 work on IPython and related libraries.
334 362
335 363 .. _version 8.8.0:
336 364
337 365 IPython 8.8.0
338 366 -------------
339 367
340 368 First release of IPython in 2023 as there was no release at the end of
341 369 December.
342 370
343 371 This is an unusually big release (relatively speaking) with more than 15 Pull
344 372 Requests merged.
345 373
346 374 Of particular interest are:
347 375
348 376 - :ghpull:`13852` that replaces the greedy completer and improves
349 377 completion, in particular for dictionary keys.
350 378 - :ghpull:`13858` that adds ``py.typed`` to ``setup.cfg`` to make sure it is
351 379 bundled in wheels.
352 380 - :ghpull:`13869` that implements tab completions for IPython options in the
353 381 shell when using `argcomplete <https://github.com/kislyuk/argcomplete>`. I
354 382 believe this also needs a recent version of Traitlets.
355 383 - :ghpull:`13865` makes the ``inspector`` class of `InteractiveShell`
356 384 configurable.
357 385 - :ghpull:`13880` that removes minor-version entrypoints as the minor version
358 386 entry points that would be included in the wheel would be the one of the
359 387 Python version that was used to build the ``whl`` file.
360 388
361 389 In no particular order, the rest of the changes update the test suite to be
362 390 compatible with Pygments 2.14, various docfixes, testing on more recent python
363 391 versions and various updates.
364 392
365 393 As usual you can find the full list of PRs on GitHub under `the 8.8 milestone
366 394 <https://github.com/ipython/ipython/milestone/110>`__.
367 395
368 396 Many thanks to @krassowski for the many PRs and @jasongrout for reviewing and
369 397 merging contributions.
370 398
371 399 Thanks to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
372 400 work on IPython and related libraries.
373 401
374 402 .. _version 8.7.0:
375 403
376 404 IPython 8.7.0
377 405 -------------
378 406
379 407
380 408 Small release of IPython with a couple of bug fixes and new features for this
381 409 month. Next month is the end of year, it is unclear if there will be a release
382 410 close to the new year's eve, or if the next release will be at the end of January.
383 411
384 412 Here are a few of the relevant fixes,
385 413 as usual you can find the full list of PRs on GitHub under `the 8.7 milestone
386 414 <https://github.com/ipython/ipython/pulls?q=milestone%3A8.7>`__.
387 415
388 416
389 417 - :ghpull:`13834` bump the minimum prompt toolkit to 3.0.11.
390 418 - IPython shipped with the ``py.typed`` marker now, and we are progressively
391 419 adding more types. :ghpull:`13831`
392 420 - :ghpull:`13817` add configuration of code blacks formatting.
393 421
394 422
395 423 Thanks to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
396 424 work on IPython and related libraries.
397 425
398 426
399 427 .. _version 8.6.0:
400 428
401 429 IPython 8.6.0
402 430 -------------
403 431
404 432 Back to a more regular release schedule (at least I try), as Friday is
405 433 already over by more than 24h hours. This is a slightly bigger release with a
406 434 few new features that contain no less than 25 PRs.
407 435
408 436 We'll notably found a couple of non negligible changes:
409 437
410 438 The ``install_ext`` and related functions have been removed after being
411 439 deprecated for years. You can use pip to install extensions. ``pip`` did not
412 440 exist when ``install_ext`` was introduced. You can still load local extensions
413 441 without installing them. Just set your ``sys.path`` for example. :ghpull:`13744`
414 442
415 443 IPython now has extra entry points that use the major *and minor* version of
416 444 python. For some of you this means that you can do a quick ``ipython3.10`` to
417 445 launch IPython from the Python 3.10 interpreter, while still using Python 3.11
418 446 as your main Python. :ghpull:`13743`
419 447
420 448 The completer matcher API has been improved. See :ghpull:`13745`. This should
421 449 improve the type inference and improve dict keys completions in many use case.
422 450 Thanks ``@krassowski`` for all the work, and the D.E. Shaw group for sponsoring
423 451 it.
424 452
425 453 The color of error nodes in tracebacks can now be customized. See
426 454 :ghpull:`13756`. This is a private attribute until someone finds the time to
427 455 properly add a configuration option. Note that with Python 3.11 that also shows
428 456 the relevant nodes in traceback, it would be good to leverage this information
429 457 (plus the "did you mean" info added on attribute errors). But that's likely work
430 458 I won't have time to do before long, so contributions welcome.
431 459
432 460 As we follow NEP 29, we removed support for numpy 1.19 :ghpull:`13760`.
433 461
434 462
435 463 The ``open()`` function present in the user namespace by default will now refuse
436 464 to open the file descriptors 0,1,2 (stdin, out, err), to avoid crashing IPython.
437 465 This mostly occurs in teaching context when incorrect values get passed around.
438 466
439 467
440 468 The ``?``, ``??``, and corresponding ``pinfo``, ``pinfo2`` magics can now find
441 469 objects inside arrays. That is to say, the following now works::
442 470
443 471
444 472 >>> def my_func(*arg, **kwargs):pass
445 473 >>> container = [my_func]
446 474 >>> container[0]?
447 475
448 476
449 477 If ``container`` define a custom ``getitem``, this __will__ trigger the custom
450 478 method. So don't put side effects in your ``getitems``. Thanks to the D.E. Shaw
451 479 group for the request and sponsoring the work.
452 480
453 481
454 482 As usual you can find the full list of PRs on GitHub under `the 8.6 milestone
455 483 <https://github.com/ipython/ipython/pulls?q=milestone%3A8.6>`__.
456 484
457 485 Thanks to all hacktoberfest contributors, please contribute to
458 486 `closember.org <https://closember.org/>`__.
459 487
460 488 Thanks to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
461 489 work on IPython and related libraries.
462 490
463 491 .. _version 8.5.0:
464 492
465 493 IPython 8.5.0
466 494 -------------
467 495
468 496 First release since a couple of month due to various reasons and timing preventing
469 497 me for sticking to the usual monthly release the last Friday of each month. This
470 498 is of non negligible size as it has more than two dozen PRs with various fixes
471 499 an bug fixes.
472 500
473 501 Many thanks to everybody who contributed PRs for your patience in review and
474 502 merges.
475 503
476 504 Here is a non-exhaustive list of changes that have been implemented for IPython
477 505 8.5.0. As usual you can find the full list of issues and PRs tagged with `the
478 506 8.5 milestone
479 507 <https://github.com/ipython/ipython/pulls?q=is%3Aclosed+milestone%3A8.5+>`__.
480 508
481 509 - Added a shortcut for accepting auto suggestion. The End key shortcut for
482 510 accepting auto-suggestion This binding works in Vi mode too, provided
483 511 ``TerminalInteractiveShell.emacs_bindings_in_vi_insert_mode`` is set to be
484 512 ``True`` :ghpull:`13566`.
485 513
486 514 - No popup in window for latex generation when generating latex (e.g. via
487 515 `_latex_repr_`) no popup window is shows under Windows. :ghpull:`13679`
488 516
489 517 - Fixed error raised when attempting to tab-complete an input string with
490 518 consecutive periods or forward slashes (such as "file:///var/log/...").
491 519 :ghpull:`13675`
492 520
493 521 - Relative filenames in Latex rendering :
494 522 The `latex_to_png_dvipng` command internally generates input and output file
495 523 arguments to `latex` and `dvipis`. These arguments are now generated as
496 524 relative files to the current working directory instead of absolute file
497 525 paths. This solves a problem where the current working directory contains
498 526 characters that are not handled properly by `latex` and `dvips`. There are
499 527 no changes to the user API. :ghpull:`13680`
500 528
501 529 - Stripping decorators bug: Fixed bug which meant that ipython code blocks in
502 530 restructured text documents executed with the ipython-sphinx extension
503 531 skipped any lines of code containing python decorators. :ghpull:`13612`
504 532
505 533 - Allow some modules with frozen dataclasses to be reloaded. :ghpull:`13732`
506 534 - Fix paste magic on wayland. :ghpull:`13671`
507 535 - show maxlen in deque's repr. :ghpull:`13648`
508 536
509 537 Restore line numbers for Input
510 538 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
511 539
512 540 Line number information in tracebacks from input are restored.
513 541 Line numbers from input were removed during the transition to v8 enhanced traceback reporting.
514 542
515 543 So, instead of::
516 544
517 545 ---------------------------------------------------------------------------
518 546 ZeroDivisionError Traceback (most recent call last)
519 547 Input In [3], in <cell line: 1>()
520 548 ----> 1 myfunc(2)
521 549
522 550 Input In [2], in myfunc(z)
523 551 1 def myfunc(z):
524 552 ----> 2 foo.boo(z-1)
525 553
526 554 File ~/code/python/ipython/foo.py:3, in boo(x)
527 555 2 def boo(x):
528 556 ----> 3 return 1/(1-x)
529 557
530 558 ZeroDivisionError: division by zero
531 559
532 560 The error traceback now looks like::
533 561
534 562 ---------------------------------------------------------------------------
535 563 ZeroDivisionError Traceback (most recent call last)
536 564 Cell In [3], line 1
537 565 ----> 1 myfunc(2)
538 566
539 567 Cell In [2], line 2, in myfunc(z)
540 568 1 def myfunc(z):
541 569 ----> 2 foo.boo(z-1)
542 570
543 571 File ~/code/python/ipython/foo.py:3, in boo(x)
544 572 2 def boo(x):
545 573 ----> 3 return 1/(1-x)
546 574
547 575 ZeroDivisionError: division by zero
548 576
549 577 or, with xmode=Plain::
550 578
551 579 Traceback (most recent call last):
552 580 Cell In [12], line 1
553 581 myfunc(2)
554 582 Cell In [6], line 2 in myfunc
555 583 foo.boo(z-1)
556 584 File ~/code/python/ipython/foo.py:3 in boo
557 585 return 1/(1-x)
558 586 ZeroDivisionError: division by zero
559 587
560 588 :ghpull:`13560`
561 589
562 590 New setting to silence warning if working inside a virtual environment
563 591 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
564 592
565 593 Previously, when starting IPython in a virtual environment without IPython installed (so IPython from the global environment is used), the following warning was printed:
566 594
567 595 Attempting to work in a virtualenv. If you encounter problems, please install IPython inside the virtualenv.
568 596
569 597 This warning can be permanently silenced by setting ``c.InteractiveShell.warn_venv`` to ``False`` (the default is ``True``).
570 598
571 599 :ghpull:`13706`
572 600
573 601 -------
574 602
575 603 Thanks to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
576 604 work on IPython and related libraries.
577 605
578 606
579 607 .. _version 8.4.0:
580 608
581 609 IPython 8.4.0
582 610 -------------
583 611
584 612 As for 7.34, this version contains a single fix: fix uncaught BdbQuit exceptions on ipdb
585 613 exit :ghpull:`13668`, and a single typo fix in documentation: :ghpull:`13682`
586 614
587 615 Thanks to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
588 616 work on IPython and related libraries.
589 617
590 618
591 619 .. _version 8.3.0:
592 620
593 621 IPython 8.3.0
594 622 -------------
595 623
596 624 - :ghpull:`13625`, using ``?``, ``??``, ``*?`` will not call
597 625 ``set_next_input`` as most frontend allow proper multiline editing and it was
598 626 causing issues for many users of multi-cell frontends. This has been backported to 7.33
599 627
600 628
601 629 - :ghpull:`13600`, ``pre_run_*``-hooks will now have a ``cell_id`` attribute on
602 630 the info object when frontend provides it. This has been backported to 7.33
603 631
604 632 - :ghpull:`13624`, fixed :kbd:`End` key being broken after accepting an
605 633 auto-suggestion.
606 634
607 635 - :ghpull:`13657` fixed an issue where history from different sessions would be mixed.
608 636
609 637 .. _version 8.2.0:
610 638
611 639 IPython 8.2.0
612 640 -------------
613 641
614 642 IPython 8.2 mostly bring bugfixes to IPython.
615 643
616 644 - Auto-suggestion can now be elected with the ``end`` key. :ghpull:`13566`
617 645 - Some traceback issues with ``assert etb is not None`` have been fixed. :ghpull:`13588`
618 646 - History is now pulled from the sqitel database and not from in-memory.
619 647 In particular when using the ``%paste`` magic, the content of the pasted text will
620 648 be part of the history and not the verbatim text ``%paste`` anymore. :ghpull:`13592`
621 649 - Fix ``Ctrl-\\`` exit cleanup :ghpull:`13603`
622 650 - Fixes to ``ultratb`` ipdb support when used outside of IPython. :ghpull:`13498`
623 651
624 652
625 653 I am still trying to fix and investigate :ghissue:`13598`, which seems to be
626 654 random, and would appreciate help if you find a reproducible minimal case. I've
627 655 tried to make various changes to the codebase to mitigate it, but a proper fix
628 656 will be difficult without understanding the cause.
629 657
630 658
631 659 All the issues on pull-requests for this release can be found in the `8.2
632 660 milestone. <https://github.com/ipython/ipython/milestone/100>`__ . And some
633 661 documentation only PR can be found as part of the `7.33 milestone
634 662 <https://github.com/ipython/ipython/milestone/101>`__ (currently not released).
635 663
636 664 Thanks to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
637 665 work on IPython and related libraries.
638 666
639 667 .. _version 8.1.1:
640 668
641 669 IPython 8.1.1
642 670 -------------
643 671
644 672 Fix an issue with virtualenv and Python 3.8 introduced in 8.1
645 673
646 674 Revert :ghpull:`13537` (fix an issue with symlinks in virtualenv) that raises an
647 675 error in Python 3.8, and fixed in a different way in :ghpull:`13559`.
648 676
649 677 .. _version 8.1:
650 678
651 679 IPython 8.1.0
652 680 -------------
653 681
654 682 IPython 8.1 is the first minor release after 8.0 and fixes a number of bugs and
655 683 updates a few behaviors that were problematic with the 8.0 as with many new major
656 684 release.
657 685
658 686 Note that beyond the changes listed here, IPython 8.1.0 also contains all the
659 687 features listed in :ref:`version 7.32`.
660 688
661 689 - Misc and multiple fixes around quotation auto-closing. It is now disabled by
662 690 default. Run with ``TerminalInteractiveShell.auto_match=True`` to re-enabled
663 691 - Require pygments>=2.4.0 :ghpull:`13459`, this was implicit in the code, but
664 692 is now explicit in ``setup.cfg``/``setup.py``
665 693 - Docs improvement of ``core.magic_arguments`` examples. :ghpull:`13433`
666 694 - Multi-line edit executes too early with await. :ghpull:`13424`
667 695
668 696 - ``black`` is back as an optional dependency, and autoformatting disabled by
669 697 default until some fixes are implemented (black improperly reformat magics).
670 698 :ghpull:`13471` Additionally the ability to use ``yapf`` as a code
671 699 reformatter has been added :ghpull:`13528` . You can use
672 700 ``TerminalInteractiveShell.autoformatter="black"``,
673 701 ``TerminalInteractiveShell.autoformatter="yapf"`` to re-enable auto formating
674 702 with black, or switch to yapf.
675 703
676 704 - Fix and issue where ``display`` was not defined.
677 705
678 706 - Auto suggestions are now configurable. Currently only
679 707 ``AutoSuggestFromHistory`` (default) and ``None``. new provider contribution
680 708 welcomed. :ghpull:`13475`
681 709
682 710 - multiple packaging/testing improvement to simplify downstream packaging
683 711 (xfail with reasons, try to not access network...).
684 712
685 713 - Update deprecation. ``InteractiveShell.magic`` internal method has been
686 714 deprecated for many years but did not emit a warning until now.
687 715
688 716 - internal ``appended_to_syspath`` context manager has been deprecated.
689 717
690 718 - fix an issue with symlinks in virtualenv :ghpull:`13537` (Reverted in 8.1.1)
691 719
692 720 - Fix an issue with vim mode, where cursor would not be reset on exit :ghpull:`13472`
693 721
694 722 - ipython directive now remove only known pseudo-decorators :ghpull:`13532`
695 723
696 724 - ``IPython/lib/security`` which used to be used for jupyter notebook has been
697 725 removed.
698 726
699 727 - Fix an issue where ``async with`` would execute on new lines. :ghpull:`13436`
700 728
701 729
702 730 We want to remind users that IPython is part of the Jupyter organisations, and
703 731 thus governed by a Code of Conduct. Some of the behavior we have seen on GitHub is not acceptable.
704 732 Abuse and non-respectful comments on discussion will not be tolerated.
705 733
706 734 Many thanks to all the contributors to this release, many of the above fixed issues and
707 735 new features were done by first time contributors, showing there is still
708 736 plenty of easy contribution possible in IPython
709 737 . You can find all individual contributions
710 738 to this milestone `on github <https://github.com/ipython/ipython/milestone/91>`__.
711 739
712 740 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
713 741 work on IPython and related libraries. In particular the Lazy autoloading of
714 742 magics that you will find described in the 7.32 release notes.
715 743
716 744
717 745 .. _version 8.0.1:
718 746
719 747 IPython 8.0.1 (CVE-2022-21699)
720 748 ------------------------------
721 749
722 750 IPython 8.0.1, 7.31.1 and 5.11 are security releases that change some default
723 751 values in order to prevent potential Execution with Unnecessary Privileges.
724 752
725 753 Almost all version of IPython looks for configuration and profiles in current
726 754 working directory. Since IPython was developed before pip and environments
727 755 existed it was used a convenient way to load code/packages in a project
728 756 dependant way.
729 757
730 758 In 2022, it is not necessary anymore, and can lead to confusing behavior where
731 759 for example cloning a repository and starting IPython or loading a notebook from
732 760 any Jupyter-Compatible interface that has ipython set as a kernel can lead to
733 761 code execution.
734 762
735 763
736 764 I did not find any standard way for packaged to advertise CVEs they fix, I'm
737 765 thus trying to add a ``__patched_cves__`` attribute to the IPython module that
738 766 list the CVEs that should have been fixed. This attribute is informational only
739 767 as if a executable has a flaw, this value can always be changed by an attacker.
740 768
741 769 .. code::
742 770
743 771 In [1]: import IPython
744 772
745 773 In [2]: IPython.__patched_cves__
746 774 Out[2]: {'CVE-2022-21699'}
747 775
748 776 In [3]: 'CVE-2022-21699' in IPython.__patched_cves__
749 777 Out[3]: True
750 778
751 779 Thus starting with this version:
752 780
753 781 - The current working directory is not searched anymore for profiles or
754 782 configurations files.
755 783 - Added a ``__patched_cves__`` attribute (set of strings) to IPython module that contain
756 784 the list of fixed CVE. This is informational only.
757 785
758 786 Further details can be read on the `GitHub Advisory <https://github.com/ipython/ipython/security/advisories/GHSA-pq7m-3gw7-gq5x>`__
759 787
760 788
761 789 .. _version 8.0:
762 790
763 791 IPython 8.0
764 792 -----------
765 793
766 794 IPython 8.0 is bringing a large number of new features and improvements to both the
767 795 user of the terminal and of the kernel via Jupyter. The removal of compatibility
768 796 with an older version of Python is also the opportunity to do a couple of
769 797 performance improvements in particular with respect to startup time.
770 798 The 8.x branch started diverging from its predecessor around IPython 7.12
771 799 (January 2020).
772 800
773 801 This release contains 250+ pull requests, in addition to many of the features
774 802 and backports that have made it to the 7.x branch. Please see the
775 803 `8.0 milestone <https://github.com/ipython/ipython/milestone/73?closed=1>`__ for the full list of pull requests.
776 804
777 805 Please feel free to send pull requests to update those notes after release,
778 806 I have likely forgotten a few things reviewing 250+ PRs.
779 807
780 808 Dependencies changes/downstream packaging
781 809 -----------------------------------------
782 810
783 811 Most of our building steps have been changed to be (mostly) declarative
784 812 and follow PEP 517. We are trying to completely remove ``setup.py`` (:ghpull:`13238`) and are
785 813 looking for help to do so.
786 814
787 815 - minimum supported ``traitlets`` version is now 5+
788 816 - we now require ``stack_data``
789 817 - minimal Python is now 3.8
790 818 - ``nose`` is not a testing requirement anymore
791 819 - ``pytest`` replaces nose.
792 820 - ``iptest``/``iptest3`` cli entrypoints do not exist anymore.
793 821 - the minimum officially ​supported ``numpy`` version has been bumped, but this should
794 822 not have much effect on packaging.
795 823
796 824
797 825 Deprecation and removal
798 826 -----------------------
799 827
800 828 We removed almost all features, arguments, functions, and modules that were
801 829 marked as deprecated between IPython 1.0 and 5.0. As a reminder, 5.0 was released
802 830 in 2016, and 1.0 in 2013. Last release of the 5 branch was 5.10.0, in May 2020.
803 831 The few remaining deprecated features we left have better deprecation warnings
804 832 or have been turned into explicit errors for better error messages.
805 833
806 834 I will use this occasion to add the following requests to anyone emitting a
807 835 deprecation warning:
808 836
809 837 - Please add at least ``stacklevel=2`` so that the warning is emitted into the
810 838 caller context, and not the callee one.
811 839 - Please add **since which version** something is deprecated.
812 840
813 841 As a side note, it is much easier to conditionally compare version
814 842 numbers rather than using ``try/except`` when functionality changes with a version.
815 843
816 844 I won't list all the removed features here, but modules like ``IPython.kernel``,
817 845 which was just a shim module around ``ipykernel`` for the past 8 years, have been
818 846 removed, and so many other similar things that pre-date the name **Jupyter**
819 847 itself.
820 848
821 849 We no longer need to add ``IPython.extensions`` to the PYTHONPATH because that is being
822 850 handled by ``load_extension``.
823 851
824 852 We are also removing ``Cythonmagic``, ``sympyprinting`` and ``rmagic`` as they are now in
825 853 other packages and no longer need to be inside IPython.
826 854
827 855
828 856 Documentation
829 857 -------------
830 858
831 859 The majority of our docstrings have now been reformatted and automatically fixed by
832 860 the experimental `VΓ©lin <https://pypi.org/project/velin/>`_ project to conform
833 861 to numpydoc.
834 862
835 863 Type annotations
836 864 ----------------
837 865
838 866 While IPython itself is highly dynamic and can't be completely typed, many of
839 867 the functions now have type annotations, and part of the codebase is now checked
840 868 by mypy.
841 869
842 870
843 871 Featured changes
844 872 ----------------
845 873
846 874 Here is a features list of changes in IPython 8.0. This is of course non-exhaustive.
847 875 Please note as well that many features have been added in the 7.x branch as well
848 876 (and hence why you want to read the 7.x what's new notes), in particular
849 877 features contributed by QuantStack (with respect to debugger protocol and Xeus
850 878 Python), as well as many debugger features that I was pleased to implement as
851 879 part of my work at QuanSight and sponsored by DE Shaw.
852 880
853 881 Traceback improvements
854 882 ~~~~~~~~~~~~~~~~~~~~~~
855 883
856 884 Previously, error tracebacks for errors happening in code cells were showing a
857 885 hash, the one used for compiling the Python AST::
858 886
859 887 In [1]: def foo():
860 888 ...: return 3 / 0
861 889 ...:
862 890
863 891 In [2]: foo()
864 892 ---------------------------------------------------------------------------
865 893 ZeroDivisionError Traceback (most recent call last)
866 894 <ipython-input-2-c19b6d9633cf> in <module>
867 895 ----> 1 foo()
868 896
869 897 <ipython-input-1-1595a74c32d5> in foo()
870 898 1 def foo():
871 899 ----> 2 return 3 / 0
872 900 3
873 901
874 902 ZeroDivisionError: division by zero
875 903
876 904 The error traceback is now correctly formatted, showing the cell number in which the error happened::
877 905
878 906 In [1]: def foo():
879 907 ...: return 3 / 0
880 908 ...:
881 909
882 910 Input In [2]: foo()
883 911 ---------------------------------------------------------------------------
884 912 ZeroDivisionError Traceback (most recent call last)
885 913 input In [2], in <module>
886 914 ----> 1 foo()
887 915
888 916 Input In [1], in foo()
889 917 1 def foo():
890 918 ----> 2 return 3 / 0
891 919
892 920 ZeroDivisionError: division by zero
893 921
894 922 The ``stack_data`` package has been integrated, which provides smarter information in the traceback;
895 923 in particular it will highlight the AST node where an error occurs which can help to quickly narrow down errors.
896 924
897 925 For example in the following snippet::
898 926
899 927 def foo(i):
900 928 x = [[[0]]]
901 929 return x[0][i][0]
902 930
903 931
904 932 def bar():
905 933 return foo(0) + foo(
906 934 1
907 935 ) + foo(2)
908 936
909 937
910 938 calling ``bar()`` would raise an ``IndexError`` on the return line of ``foo``,
911 939 and IPython 8.0 is capable of telling you where the index error occurs::
912 940
913 941
914 942 IndexError
915 943 Input In [2], in <module>
916 944 ----> 1 bar()
917 945 ^^^^^
918 946
919 947 Input In [1], in bar()
920 948 6 def bar():
921 949 ----> 7 return foo(0) + foo(
922 950 ^^^^
923 951 8 1
924 952 ^^^^^^^^
925 953 9 ) + foo(2)
926 954 ^^^^
927 955
928 956 Input In [1], in foo(i)
929 957 1 def foo(i):
930 958 2 x = [[[0]]]
931 959 ----> 3 return x[0][i][0]
932 960 ^^^^^^^
933 961
934 962 The corresponding locations marked here with ``^`` will show up highlighted in
935 963 the terminal and notebooks.
936 964
937 965 Finally, a colon ``::`` and line number is appended after a filename in
938 966 traceback::
939 967
940 968
941 969 ZeroDivisionError Traceback (most recent call last)
942 970 File ~/error.py:4, in <module>
943 971 1 def f():
944 972 2 1/0
945 973 ----> 4 f()
946 974
947 975 File ~/error.py:2, in f()
948 976 1 def f():
949 977 ----> 2 1/0
950 978
951 979 Many terminals and editors have integrations enabling you to directly jump to the
952 980 relevant file/line when this syntax is used, so this small addition may have a high
953 981 impact on productivity.
954 982
955 983
956 984 Autosuggestions
957 985 ~~~~~~~~~~~~~~~
958 986
959 987 Autosuggestion is a very useful feature available in `fish <https://fishshell.com/>`__, `zsh <https://en.wikipedia.org/wiki/Z_shell>`__, and `prompt-toolkit <https://python-prompt-toolkit.readthedocs.io/en/master/pages/asking_for_input.html#auto-suggestion>`__.
960 988
961 989 `Ptpython <https://github.com/prompt-toolkit/ptpython#ptpython>`__ allows users to enable this feature in
962 990 `ptpython/config.py <https://github.com/prompt-toolkit/ptpython/blob/master/examples/ptpython_config/config.py#L90>`__.
963 991
964 992 This feature allows users to accept autosuggestions with ctrl e, ctrl f,
965 993 or right arrow as described below.
966 994
967 995 1. Start ipython
968 996
969 997 .. image:: ../_images/8.0/auto_suggest_1_prompt_no_text.png
970 998
971 999 2. Run ``print("hello")``
972 1000
973 1001 .. image:: ../_images/8.0/auto_suggest_2_print_hello_suggest.png
974 1002
975 1003 3. start typing ``print`` again to see the autosuggestion
976 1004
977 1005 .. image:: ../_images/8.0/auto_suggest_3_print_hello_suggest.png
978 1006
979 1007 4. Press ``ctrl-f``, or ``ctrl-e``, or ``right-arrow`` to accept the suggestion
980 1008
981 1009 .. image:: ../_images/8.0/auto_suggest_4_print_hello.png
982 1010
983 1011 You can also complete word by word:
984 1012
985 1013 1. Run ``def say_hello(): print("hello")``
986 1014
987 1015 .. image:: ../_images/8.0/auto_suggest_second_prompt.png
988 1016
989 1017 2. Start typing the first letter if ``def`` to see the autosuggestion
990 1018
991 1019 .. image:: ../_images/8.0/auto_suggest_d_phantom.png
992 1020
993 1021 3. Press ``alt-f`` (or ``escape`` followed by ``f``), to accept the first word of the suggestion
994 1022
995 1023 .. image:: ../_images/8.0/auto_suggest_def_phantom.png
996 1024
997 1025 Importantly, this feature does not interfere with tab completion:
998 1026
999 1027 1. After running ``def say_hello(): print("hello")``, press d
1000 1028
1001 1029 .. image:: ../_images/8.0/auto_suggest_d_phantom.png
1002 1030
1003 1031 2. Press Tab to start tab completion
1004 1032
1005 1033 .. image:: ../_images/8.0/auto_suggest_d_completions.png
1006 1034
1007 1035 3A. Press Tab again to select the first option
1008 1036
1009 1037 .. image:: ../_images/8.0/auto_suggest_def_completions.png
1010 1038
1011 1039 3B. Press ``alt f`` (``escape``, ``f``) to accept to accept the first word of the suggestion
1012 1040
1013 1041 .. image:: ../_images/8.0/auto_suggest_def_phantom.png
1014 1042
1015 1043 3C. Press ``ctrl-f`` or ``ctrl-e`` to accept the entire suggestion
1016 1044
1017 1045 .. image:: ../_images/8.0/auto_suggest_match_parens.png
1018 1046
1019 1047
1020 1048 Currently, autosuggestions are only shown in the emacs or vi insert editing modes:
1021 1049
1022 1050 - The ctrl e, ctrl f, and alt f shortcuts work by default in emacs mode.
1023 1051 - To use these shortcuts in vi insert mode, you will have to create `custom keybindings in your config.py <https://github.com/mskar/setup/commit/2892fcee46f9f80ef7788f0749edc99daccc52f4/>`__.
1024 1052
1025 1053
1026 1054 Show pinfo information in ipdb using "?" and "??"
1027 1055 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1028 1056
1029 1057 In IPDB, it is now possible to show the information about an object using "?"
1030 1058 and "??", in much the same way that it can be done when using the IPython prompt::
1031 1059
1032 1060 ipdb> partial?
1033 1061 Init signature: partial(self, /, *args, **kwargs)
1034 1062 Docstring:
1035 1063 partial(func, *args, **keywords) - new function with partial application
1036 1064 of the given arguments and keywords.
1037 1065 File: ~/.pyenv/versions/3.8.6/lib/python3.8/functools.py
1038 1066 Type: type
1039 1067 Subclasses:
1040 1068
1041 1069 Previously, ``pinfo`` or ``pinfo2`` command had to be used for this purpose.
1042 1070
1043 1071
1044 1072 Autoreload 3 feature
1045 1073 ~~~~~~~~~~~~~~~~~~~~
1046 1074
1047 1075 Example: When an IPython session is run with the 'autoreload' extension loaded,
1048 1076 you will now have the option '3' to select, which means the following:
1049 1077
1050 1078 1. replicate all functionality from option 2
1051 1079 2. autoload all new funcs/classes/enums/globals from the module when they are added
1052 1080 3. autoload all newly imported funcs/classes/enums/globals from external modules
1053 1081
1054 1082 Try ``%autoreload 3`` in an IPython session after running ``%load_ext autoreload``.
1055 1083
1056 1084 For more information please see the following unit test : ``extensions/tests/test_autoreload.py:test_autoload_newly_added_objects``
1057 1085
1058 1086 Auto formatting with black in the CLI
1059 1087 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1060 1088
1061 1089 This feature was present in 7.x, but disabled by default.
1062 1090
1063 1091 In 8.0, input was automatically reformatted with Black when black was installed.
1064 1092 This feature has been reverted for the time being.
1065 1093 You can re-enable it by setting ``TerminalInteractiveShell.autoformatter`` to ``"black"``
1066 1094
1067 1095 History Range Glob feature
1068 1096 ~~~~~~~~~~~~~~~~~~~~~~~~~~
1069 1097
1070 1098 Previously, when using ``%history``, users could specify either
1071 1099 a range of sessions and lines, for example:
1072 1100
1073 1101 .. code-block:: python
1074 1102
1075 1103 ~8/1-~6/5 # see history from the first line of 8 sessions ago,
1076 1104 # to the fifth line of 6 sessions ago.``
1077 1105
1078 1106 Or users could specify a glob pattern:
1079 1107
1080 1108 .. code-block:: python
1081 1109
1082 1110 -g <pattern> # glob ALL history for the specified pattern.
1083 1111
1084 1112 However users could *not* specify both.
1085 1113
1086 1114 If a user *did* specify both a range and a glob pattern,
1087 1115 then the glob pattern would be used (globbing *all* history) *and the range would be ignored*.
1088 1116
1089 1117 With this enhancement, if a user specifies both a range and a glob pattern, then the glob pattern will be applied to the specified range of history.
1090 1118
1091 1119 Don't start a multi-line cell with sunken parenthesis
1092 1120 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1093 1121
1094 1122 From now on, IPython will not ask for the next line of input when given a single
1095 1123 line with more closing than opening brackets. For example, this means that if
1096 1124 you (mis)type ``]]`` instead of ``[]``, a ``SyntaxError`` will show up, instead of
1097 1125 the ``...:`` prompt continuation.
1098 1126
1099 1127 IPython shell for ipdb interact
1100 1128 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1101 1129
1102 1130 The ipdb ``interact`` starts an IPython shell instead of Python's built-in ``code.interact()``.
1103 1131
1104 1132 Automatic Vi prompt stripping
1105 1133 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1106 1134
1107 1135 When pasting code into IPython, it will strip the leading prompt characters if
1108 1136 there are any. For example, you can paste the following code into the console -
1109 1137 it will still work, even though each line is prefixed with prompts (``In``,
1110 1138 ``Out``)::
1111 1139
1112 1140 In [1]: 2 * 2 == 4
1113 1141 Out[1]: True
1114 1142
1115 1143 In [2]: print("This still works as pasted")
1116 1144
1117 1145
1118 1146 Previously, this was not the case for the Vi-mode prompts::
1119 1147
1120 1148 In [1]: [ins] In [13]: 2 * 2 == 4
1121 1149 ...: Out[13]: True
1122 1150 ...:
1123 1151 File "<ipython-input-1-727bb88eaf33>", line 1
1124 1152 [ins] In [13]: 2 * 2 == 4
1125 1153 ^
1126 1154 SyntaxError: invalid syntax
1127 1155
1128 1156 This is now fixed, and Vi prompt prefixes - ``[ins]`` and ``[nav]`` - are
1129 1157 skipped just as the normal ``In`` would be.
1130 1158
1131 1159 IPython shell can be started in the Vi mode using ``ipython --TerminalInteractiveShell.editing_mode=vi``,
1132 1160 You should be able to change mode dynamically with ``%config TerminalInteractiveShell.editing_mode='vi'``
1133 1161
1134 1162 Empty History Ranges
1135 1163 ~~~~~~~~~~~~~~~~~~~~
1136 1164
1137 1165 A number of magics that take history ranges can now be used with an empty
1138 1166 range. These magics are:
1139 1167
1140 1168 * ``%save``
1141 1169 * ``%load``
1142 1170 * ``%pastebin``
1143 1171 * ``%pycat``
1144 1172
1145 1173 Using them this way will make them take the history of the current session up
1146 1174 to the point of the magic call (such that the magic itself will not be
1147 1175 included).
1148 1176
1149 1177 Therefore it is now possible to save the whole history to a file using
1150 1178 ``%save <filename>``, load and edit it using ``%load`` (makes for a nice usage
1151 1179 when followed with :kbd:`F2`), send it to `dpaste.org <http://dpast.org>`_ using
1152 1180 ``%pastebin``, or view the whole thing syntax-highlighted with a single
1153 1181 ``%pycat``.
1154 1182
1155 1183
1156 1184 Windows timing implementation: Switch to process_time
1157 1185 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1158 1186 Timing on Windows, for example with ``%%time``, was changed from being based on ``time.perf_counter``
1159 1187 (which counted time even when the process was sleeping) to being based on ``time.process_time`` instead
1160 1188 (which only counts CPU time). This brings it closer to the behavior on Linux. See :ghpull:`12984`.
1161 1189
1162 1190 Miscellaneous
1163 1191 ~~~~~~~~~~~~~
1164 1192 - Non-text formatters are not disabled in the terminal, which should simplify
1165 1193 writing extensions displaying images or other mimetypes in supporting terminals.
1166 1194 :ghpull:`12315`
1167 1195 - It is now possible to automatically insert matching brackets in Terminal IPython using the
1168 1196 ``TerminalInteractiveShell.auto_match=True`` option. :ghpull:`12586`
1169 1197 - We are thinking of deprecating the current ``%%javascript`` magic in favor of a better replacement. See :ghpull:`13376`.
1170 1198 - ``~`` is now expanded when part of a path in most magics :ghpull:`13385`
1171 1199 - ``%/%%timeit`` magic now adds a comma every thousands to make reading a long number easier :ghpull:`13379`
1172 1200 - ``"info"`` messages can now be customised to hide some fields :ghpull:`13343`
1173 1201 - ``collections.UserList`` now pretty-prints :ghpull:`13320`
1174 1202 - The debugger now has a persistent history, which should make it less
1175 1203 annoying to retype commands :ghpull:`13246`
1176 1204 - ``!pip`` ``!conda`` ``!cd`` or ``!ls`` are likely doing the wrong thing. We
1177 1205 now warn users if they use one of those commands. :ghpull:`12954`
1178 1206 - Make ``%precision`` work for ``numpy.float64`` type :ghpull:`12902`
1179 1207
1180 1208 Re-added support for XDG config directories
1181 1209 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1182 1210
1183 1211 XDG support through the years comes and goes. There is a tension between having
1184 1212 an identical location for configuration in all platforms versus having simple instructions.
1185 1213 After initial failures a couple of years ago, IPython was modified to automatically migrate XDG
1186 1214 config files back into ``~/.ipython``. That migration code has now been removed.
1187 1215 IPython now checks the XDG locations, so if you _manually_ move your config
1188 1216 files to your preferred location, IPython will not move them back.
1189 1217
1190 1218
1191 1219 Preparing for Python 3.10
1192 1220 -------------------------
1193 1221
1194 1222 To prepare for Python 3.10, we have started working on removing reliance and
1195 1223 any dependency that is not compatible with Python 3.10. This includes migrating our
1196 1224 test suite to pytest and starting to remove nose. This also means that the
1197 1225 ``iptest`` command is now gone and all testing is via pytest.
1198 1226
1199 1227 This was in large part thanks to the NumFOCUS Small Developer grant, which enabled us to
1200 1228 allocate \$4000 to hire `Nikita Kniazev (@Kojoley) <https://github.com/Kojoley>`_,
1201 1229 who did a fantastic job at updating our code base, migrating to pytest, pushing
1202 1230 our coverage, and fixing a large number of bugs. I highly recommend contacting
1203 1231 them if you need help with C++ and Python projects.
1204 1232
1205 1233 You can find all relevant issues and PRs with `the SDG 2021 tag <https://github.com/ipython/ipython/issues?q=label%3A%22Numfocus+SDG+2021%22+>`__
1206 1234
1207 1235 Removing support for older Python versions
1208 1236 ------------------------------------------
1209 1237
1210 1238
1211 1239 We are removing support for Python up through 3.7, allowing internal code to use the more
1212 1240 efficient ``pathlib`` and to make better use of type annotations.
1213 1241
1214 1242 .. image:: ../_images/8.0/pathlib_pathlib_everywhere.jpg
1215 1243 :alt: "Meme image of Toy Story with Woody and Buzz, with the text 'pathlib, pathlib everywhere'"
1216 1244
1217 1245
1218 1246 We had about 34 PRs only to update some logic to update some functions from managing strings to
1219 1247 using Pathlib.
1220 1248
1221 1249 The completer has also seen significant updates and now makes use of newer Jedi APIs,
1222 1250 offering faster and more reliable tab completion.
1223 1251
1224 1252 Misc Statistics
1225 1253 ---------------
1226 1254
1227 1255 Here are some numbers::
1228 1256
1229 1257 7.x: 296 files, 12561 blank lines, 20282 comments, 35142 line of code.
1230 1258 8.0: 252 files, 12053 blank lines, 19232 comments, 34505 line of code.
1231 1259
1232 1260 $ git diff --stat 7.x...master | tail -1
1233 1261 340 files changed, 13399 insertions(+), 12421 deletions(-)
1234 1262
1235 1263 We have commits from 162 authors, who contributed 1916 commits in 23 month, excluding merges (to not bias toward
1236 1264 maintainers pushing buttons).::
1237 1265
1238 1266 $ git shortlog -s --no-merges 7.x...master | sort -nr
1239 1267 535 Matthias Bussonnier
1240 1268 86 Nikita Kniazev
1241 1269 69 Blazej Michalik
1242 1270 49 Samuel Gaist
1243 1271 27 Itamar Turner-Trauring
1244 1272 18 Spas Kalaydzhisyki
1245 1273 17 Thomas Kluyver
1246 1274 17 Quentin Peter
1247 1275 17 James Morris
1248 1276 17 Artur Svistunov
1249 1277 15 Bart Skowron
1250 1278 14 Alex Hall
1251 1279 13 rushabh-v
1252 1280 13 Terry Davis
1253 1281 13 Benjamin Ragan-Kelley
1254 1282 8 martinRenou
1255 1283 8 farisachugthai
1256 1284 7 dswij
1257 1285 7 Gal B
1258 1286 7 Corentin Cadiou
1259 1287 6 yuji96
1260 1288 6 Martin Skarzynski
1261 1289 6 Justin Palmer
1262 1290 6 Daniel Goldfarb
1263 1291 6 Ben Greiner
1264 1292 5 Sammy Al Hashemi
1265 1293 5 Paul Ivanov
1266 1294 5 Inception95
1267 1295 5 Eyenpi
1268 1296 5 Douglas Blank
1269 1297 5 Coco Mishra
1270 1298 5 Bibo Hao
1271 1299 5 AndrΓ© A. Gomes
1272 1300 5 Ahmed Fasih
1273 1301 4 takuya fujiwara
1274 1302 4 palewire
1275 1303 4 Thomas A Caswell
1276 1304 4 Talley Lambert
1277 1305 4 Scott Sanderson
1278 1306 4 Ram Rachum
1279 1307 4 Nick Muoh
1280 1308 4 Nathan Goldbaum
1281 1309 4 Mithil Poojary
1282 1310 4 Michael T
1283 1311 4 Jakub Klus
1284 1312 4 Ian Castleden
1285 1313 4 Eli Rykoff
1286 1314 4 Ashwin Vishnu
1287 1315 3 谭九鼎
1288 1316 3 sleeping
1289 1317 3 Sylvain Corlay
1290 1318 3 Peter Corke
1291 1319 3 Paul Bissex
1292 1320 3 Matthew Feickert
1293 1321 3 Fernando Perez
1294 1322 3 Eric Wieser
1295 1323 3 Daniel Mietchen
1296 1324 3 Aditya Sathe
1297 1325 3 007vedant
1298 1326 2 rchiodo
1299 1327 2 nicolaslazo
1300 1328 2 luttik
1301 1329 2 gorogoroumaru
1302 1330 2 foobarbyte
1303 1331 2 bar-hen
1304 1332 2 Theo Ouzhinski
1305 1333 2 Strawkage
1306 1334 2 Samreen Zarroug
1307 1335 2 Pete Blois
1308 1336 2 Meysam Azad
1309 1337 2 Matthieu Ancellin
1310 1338 2 Mark Schmitz
1311 1339 2 Maor Kleinberger
1312 1340 2 MRCWirtz
1313 1341 2 Lumir Balhar
1314 1342 2 Julien Rabinow
1315 1343 2 Juan Luis Cano RodrΓ­guez
1316 1344 2 Joyce Er
1317 1345 2 Jakub
1318 1346 2 Faris A Chugthai
1319 1347 2 Ethan Madden
1320 1348 2 Dimitri Papadopoulos
1321 1349 2 Diego Fernandez
1322 1350 2 Daniel Shimon
1323 1351 2 Coco Bennett
1324 1352 2 Carlos Cordoba
1325 1353 2 Boyuan Liu
1326 1354 2 BaoGiang HoangVu
1327 1355 2 Augusto
1328 1356 2 Arthur Svistunov
1329 1357 2 Arthur Moreira
1330 1358 2 Ali Nabipour
1331 1359 2 Adam Hackbarth
1332 1360 1 richard
1333 1361 1 linar-jether
1334 1362 1 lbennett
1335 1363 1 juacrumar
1336 1364 1 gpotter2
1337 1365 1 digitalvirtuoso
1338 1366 1 dalthviz
1339 1367 1 Yonatan Goldschmidt
1340 1368 1 Tomasz KΕ‚oczko
1341 1369 1 Tobias Bengfort
1342 1370 1 Timur Kushukov
1343 1371 1 Thomas
1344 1372 1 Snir Broshi
1345 1373 1 Shao Yang Hong
1346 1374 1 Sanjana-03
1347 1375 1 Romulo Filho
1348 1376 1 Rodolfo Carvalho
1349 1377 1 Richard Shadrach
1350 1378 1 Reilly Tucker Siemens
1351 1379 1 Rakessh Roshan
1352 1380 1 Piers Titus van der Torren
1353 1381 1 PhanatosZou
1354 1382 1 Pavel Safronov
1355 1383 1 Paulo S. Costa
1356 1384 1 Paul McCarthy
1357 1385 1 NotWearingPants
1358 1386 1 Naelson Douglas
1359 1387 1 Michael Tiemann
1360 1388 1 Matt Wozniski
1361 1389 1 Markus Wageringel
1362 1390 1 Marcus Wirtz
1363 1391 1 Marcio Mazza
1364 1392 1 LumΓ­r 'Frenzy' Balhar
1365 1393 1 Lightyagami1
1366 1394 1 Leon Anavi
1367 1395 1 LeafyLi
1368 1396 1 L0uisJ0shua
1369 1397 1 Kyle Cutler
1370 1398 1 Krzysztof Cybulski
1371 1399 1 Kevin Kirsche
1372 1400 1 KIU Shueng Chuan
1373 1401 1 Jonathan Slenders
1374 1402 1 Jay Qi
1375 1403 1 Jake VanderPlas
1376 1404 1 Iwan Briquemont
1377 1405 1 Hussaina Begum Nandyala
1378 1406 1 Gordon Ball
1379 1407 1 Gabriel Simonetto
1380 1408 1 Frank Tobia
1381 1409 1 Erik
1382 1410 1 Elliott Sales de Andrade
1383 1411 1 Daniel Hahler
1384 1412 1 Dan Green-Leipciger
1385 1413 1 Dan Green
1386 1414 1 Damian Yurzola
1387 1415 1 Coon, Ethan T
1388 1416 1 Carol Willing
1389 1417 1 Brian Lee
1390 1418 1 Brendan Gerrity
1391 1419 1 Blake Griffin
1392 1420 1 Bastian Ebeling
1393 1421 1 Bartosz Telenczuk
1394 1422 1 Ankitsingh6299
1395 1423 1 Andrew Port
1396 1424 1 Andrew J. Hesford
1397 1425 1 Albert Zhang
1398 1426 1 Adam Johnson
1399 1427
1400 1428 This does not, of course, represent non-code contributions, for which we are also grateful.
1401 1429
1402 1430
1403 1431 API Changes using Frappuccino
1404 1432 -----------------------------
1405 1433
1406 1434 This is an experimental exhaustive API difference using `Frappuccino <https://pypi.org/project/frappuccino/>`_
1407 1435
1408 1436
1409 1437 The following items are new in IPython 8.0 ::
1410 1438
1411 1439 + IPython.core.async_helpers.get_asyncio_loop()
1412 1440 + IPython.core.completer.Dict
1413 1441 + IPython.core.completer.Pattern
1414 1442 + IPython.core.completer.Sequence
1415 1443 + IPython.core.completer.__skip_doctest__
1416 1444 + IPython.core.debugger.Pdb.precmd(self, line)
1417 1445 + IPython.core.debugger.__skip_doctest__
1418 1446 + IPython.core.display.__getattr__(name)
1419 1447 + IPython.core.display.warn
1420 1448 + IPython.core.display_functions
1421 1449 + IPython.core.display_functions.DisplayHandle
1422 1450 + IPython.core.display_functions.DisplayHandle.display(self, obj, **kwargs)
1423 1451 + IPython.core.display_functions.DisplayHandle.update(self, obj, **kwargs)
1424 1452 + IPython.core.display_functions.__all__
1425 1453 + IPython.core.display_functions.__builtins__
1426 1454 + IPython.core.display_functions.__cached__
1427 1455 + IPython.core.display_functions.__doc__
1428 1456 + IPython.core.display_functions.__file__
1429 1457 + IPython.core.display_functions.__loader__
1430 1458 + IPython.core.display_functions.__name__
1431 1459 + IPython.core.display_functions.__package__
1432 1460 + IPython.core.display_functions.__spec__
1433 1461 + IPython.core.display_functions.b2a_hex
1434 1462 + IPython.core.display_functions.clear_output(wait=False)
1435 1463 + IPython.core.display_functions.display(*objs, include='None', exclude='None', metadata='None', transient='None', display_id='None', raw=False, clear=False, **kwargs)
1436 1464 + IPython.core.display_functions.publish_display_data(data, metadata='None', source='<deprecated>', *, transient='None', **kwargs)
1437 1465 + IPython.core.display_functions.update_display(obj, *, display_id, **kwargs)
1438 1466 + IPython.core.extensions.BUILTINS_EXTS
1439 1467 + IPython.core.inputtransformer2.has_sunken_brackets(tokens)
1440 1468 + IPython.core.interactiveshell.Callable
1441 1469 + IPython.core.interactiveshell.__annotations__
1442 1470 + IPython.core.ultratb.List
1443 1471 + IPython.core.ultratb.Tuple
1444 1472 + IPython.lib.pretty.CallExpression
1445 1473 + IPython.lib.pretty.CallExpression.factory(name)
1446 1474 + IPython.lib.pretty.RawStringLiteral
1447 1475 + IPython.lib.pretty.RawText
1448 1476 + IPython.terminal.debugger.TerminalPdb.do_interact(self, arg)
1449 1477 + IPython.terminal.embed.Set
1450 1478
1451 1479 The following items have been removed (or moved to superclass)::
1452 1480
1453 1481 - IPython.core.application.BaseIPythonApplication.initialize_subcommand
1454 1482 - IPython.core.completer.Sentinel
1455 1483 - IPython.core.completer.skip_doctest
1456 1484 - IPython.core.debugger.Tracer
1457 1485 - IPython.core.display.DisplayHandle
1458 1486 - IPython.core.display.DisplayHandle.display
1459 1487 - IPython.core.display.DisplayHandle.update
1460 1488 - IPython.core.display.b2a_hex
1461 1489 - IPython.core.display.clear_output
1462 1490 - IPython.core.display.display
1463 1491 - IPython.core.display.publish_display_data
1464 1492 - IPython.core.display.update_display
1465 1493 - IPython.core.excolors.Deprec
1466 1494 - IPython.core.excolors.ExceptionColors
1467 1495 - IPython.core.history.warn
1468 1496 - IPython.core.hooks.late_startup_hook
1469 1497 - IPython.core.hooks.pre_run_code_hook
1470 1498 - IPython.core.hooks.shutdown_hook
1471 1499 - IPython.core.interactiveshell.InteractiveShell.init_deprecation_warnings
1472 1500 - IPython.core.interactiveshell.InteractiveShell.init_readline
1473 1501 - IPython.core.interactiveshell.InteractiveShell.write
1474 1502 - IPython.core.interactiveshell.InteractiveShell.write_err
1475 1503 - IPython.core.interactiveshell.get_default_colors
1476 1504 - IPython.core.interactiveshell.removed_co_newlocals
1477 1505 - IPython.core.magics.execution.ExecutionMagics.profile_missing_notice
1478 1506 - IPython.core.magics.script.PIPE
1479 1507 - IPython.core.prefilter.PrefilterManager.init_transformers
1480 1508 - IPython.core.release.classifiers
1481 1509 - IPython.core.release.description
1482 1510 - IPython.core.release.keywords
1483 1511 - IPython.core.release.long_description
1484 1512 - IPython.core.release.name
1485 1513 - IPython.core.release.platforms
1486 1514 - IPython.core.release.url
1487 1515 - IPython.core.ultratb.VerboseTB.format_records
1488 1516 - IPython.core.ultratb.find_recursion
1489 1517 - IPython.core.ultratb.findsource
1490 1518 - IPython.core.ultratb.fix_frame_records_filenames
1491 1519 - IPython.core.ultratb.inspect_error
1492 1520 - IPython.core.ultratb.is_recursion_error
1493 1521 - IPython.core.ultratb.with_patch_inspect
1494 1522 - IPython.external.__all__
1495 1523 - IPython.external.__builtins__
1496 1524 - IPython.external.__cached__
1497 1525 - IPython.external.__doc__
1498 1526 - IPython.external.__file__
1499 1527 - IPython.external.__loader__
1500 1528 - IPython.external.__name__
1501 1529 - IPython.external.__package__
1502 1530 - IPython.external.__path__
1503 1531 - IPython.external.__spec__
1504 1532 - IPython.kernel.KernelConnectionInfo
1505 1533 - IPython.kernel.__builtins__
1506 1534 - IPython.kernel.__cached__
1507 1535 - IPython.kernel.__warningregistry__
1508 1536 - IPython.kernel.pkg
1509 1537 - IPython.kernel.protocol_version
1510 1538 - IPython.kernel.protocol_version_info
1511 1539 - IPython.kernel.src
1512 1540 - IPython.kernel.version_info
1513 1541 - IPython.kernel.warn
1514 1542 - IPython.lib.backgroundjobs
1515 1543 - IPython.lib.backgroundjobs.BackgroundJobBase
1516 1544 - IPython.lib.backgroundjobs.BackgroundJobBase.run
1517 1545 - IPython.lib.backgroundjobs.BackgroundJobBase.traceback
1518 1546 - IPython.lib.backgroundjobs.BackgroundJobExpr
1519 1547 - IPython.lib.backgroundjobs.BackgroundJobExpr.call
1520 1548 - IPython.lib.backgroundjobs.BackgroundJobFunc
1521 1549 - IPython.lib.backgroundjobs.BackgroundJobFunc.call
1522 1550 - IPython.lib.backgroundjobs.BackgroundJobManager
1523 1551 - IPython.lib.backgroundjobs.BackgroundJobManager.flush
1524 1552 - IPython.lib.backgroundjobs.BackgroundJobManager.new
1525 1553 - IPython.lib.backgroundjobs.BackgroundJobManager.remove
1526 1554 - IPython.lib.backgroundjobs.BackgroundJobManager.result
1527 1555 - IPython.lib.backgroundjobs.BackgroundJobManager.status
1528 1556 - IPython.lib.backgroundjobs.BackgroundJobManager.traceback
1529 1557 - IPython.lib.backgroundjobs.__builtins__
1530 1558 - IPython.lib.backgroundjobs.__cached__
1531 1559 - IPython.lib.backgroundjobs.__doc__
1532 1560 - IPython.lib.backgroundjobs.__file__
1533 1561 - IPython.lib.backgroundjobs.__loader__
1534 1562 - IPython.lib.backgroundjobs.__name__
1535 1563 - IPython.lib.backgroundjobs.__package__
1536 1564 - IPython.lib.backgroundjobs.__spec__
1537 1565 - IPython.lib.kernel.__builtins__
1538 1566 - IPython.lib.kernel.__cached__
1539 1567 - IPython.lib.kernel.__doc__
1540 1568 - IPython.lib.kernel.__file__
1541 1569 - IPython.lib.kernel.__loader__
1542 1570 - IPython.lib.kernel.__name__
1543 1571 - IPython.lib.kernel.__package__
1544 1572 - IPython.lib.kernel.__spec__
1545 1573 - IPython.lib.kernel.__warningregistry__
1546 1574 - IPython.paths.fs_encoding
1547 1575 - IPython.terminal.debugger.DEFAULT_BUFFER
1548 1576 - IPython.terminal.debugger.cursor_in_leading_ws
1549 1577 - IPython.terminal.debugger.emacs_insert_mode
1550 1578 - IPython.terminal.debugger.has_selection
1551 1579 - IPython.terminal.debugger.vi_insert_mode
1552 1580 - IPython.terminal.interactiveshell.DISPLAY_BANNER_DEPRECATED
1553 1581 - IPython.terminal.ipapp.TerminalIPythonApp.parse_command_line
1554 1582 - IPython.testing.test
1555 1583 - IPython.utils.contexts.NoOpContext
1556 1584 - IPython.utils.io.IOStream
1557 1585 - IPython.utils.io.IOStream.close
1558 1586 - IPython.utils.io.IOStream.write
1559 1587 - IPython.utils.io.IOStream.writelines
1560 1588 - IPython.utils.io.__warningregistry__
1561 1589 - IPython.utils.io.atomic_writing
1562 1590 - IPython.utils.io.stderr
1563 1591 - IPython.utils.io.stdin
1564 1592 - IPython.utils.io.stdout
1565 1593 - IPython.utils.io.unicode_std_stream
1566 1594 - IPython.utils.path.get_ipython_cache_dir
1567 1595 - IPython.utils.path.get_ipython_dir
1568 1596 - IPython.utils.path.get_ipython_module_path
1569 1597 - IPython.utils.path.get_ipython_package_dir
1570 1598 - IPython.utils.path.locate_profile
1571 1599 - IPython.utils.path.unquote_filename
1572 1600 - IPython.utils.py3compat.PY2
1573 1601 - IPython.utils.py3compat.PY3
1574 1602 - IPython.utils.py3compat.buffer_to_bytes
1575 1603 - IPython.utils.py3compat.builtin_mod_name
1576 1604 - IPython.utils.py3compat.cast_bytes
1577 1605 - IPython.utils.py3compat.getcwd
1578 1606 - IPython.utils.py3compat.isidentifier
1579 1607 - IPython.utils.py3compat.u_format
1580 1608
1581 1609 The following signatures differ between 7.x and 8.0::
1582 1610
1583 1611 - IPython.core.completer.IPCompleter.unicode_name_matches(self, text)
1584 1612 + IPython.core.completer.IPCompleter.unicode_name_matches(text)
1585 1613
1586 1614 - IPython.core.completer.match_dict_keys(keys, prefix, delims)
1587 1615 + IPython.core.completer.match_dict_keys(keys, prefix, delims, extra_prefix='None')
1588 1616
1589 1617 - IPython.core.interactiveshell.InteractiveShell.object_inspect_mime(self, oname, detail_level=0)
1590 1618 + IPython.core.interactiveshell.InteractiveShell.object_inspect_mime(self, oname, detail_level=0, omit_sections='()')
1591 1619
1592 1620 - IPython.core.interactiveshell.InteractiveShell.set_hook(self, name, hook, priority=50, str_key='None', re_key='None', _warn_deprecated=True)
1593 1621 + IPython.core.interactiveshell.InteractiveShell.set_hook(self, name, hook, priority=50, str_key='None', re_key='None')
1594 1622
1595 1623 - IPython.core.oinspect.Inspector.info(self, obj, oname='', formatter='None', info='None', detail_level=0)
1596 1624 + IPython.core.oinspect.Inspector.info(self, obj, oname='', info='None', detail_level=0)
1597 1625
1598 1626 - IPython.core.oinspect.Inspector.pinfo(self, obj, oname='', formatter='None', info='None', detail_level=0, enable_html_pager=True)
1599 1627 + IPython.core.oinspect.Inspector.pinfo(self, obj, oname='', formatter='None', info='None', detail_level=0, enable_html_pager=True, omit_sections='()')
1600 1628
1601 1629 - IPython.core.profiledir.ProfileDir.copy_config_file(self, config_file, path='None', overwrite=False)
1602 1630 + IPython.core.profiledir.ProfileDir.copy_config_file(self, config_file, path, overwrite=False)
1603 1631
1604 1632 - IPython.core.ultratb.VerboseTB.format_record(self, frame, file, lnum, func, lines, index)
1605 1633 + IPython.core.ultratb.VerboseTB.format_record(self, frame_info)
1606 1634
1607 1635 - IPython.terminal.embed.InteractiveShellEmbed.mainloop(self, local_ns='None', module='None', stack_depth=0, display_banner='None', global_ns='None', compile_flags='None')
1608 1636 + IPython.terminal.embed.InteractiveShellEmbed.mainloop(self, local_ns='None', module='None', stack_depth=0, compile_flags='None')
1609 1637
1610 1638 - IPython.terminal.embed.embed(**kwargs)
1611 1639 + IPython.terminal.embed.embed(*, header='', compile_flags='None', **kwargs)
1612 1640
1613 1641 - IPython.terminal.interactiveshell.TerminalInteractiveShell.interact(self, display_banner='<object object at 0xffffff>')
1614 1642 + IPython.terminal.interactiveshell.TerminalInteractiveShell.interact(self)
1615 1643
1616 1644 - IPython.terminal.interactiveshell.TerminalInteractiveShell.mainloop(self, display_banner='<object object at 0xffffff>')
1617 1645 + IPython.terminal.interactiveshell.TerminalInteractiveShell.mainloop(self)
1618 1646
1619 1647 - IPython.utils.path.get_py_filename(name, force_win32='None')
1620 1648 + IPython.utils.path.get_py_filename(name)
1621 1649
1622 1650 The following are new attributes (that might be inherited)::
1623 1651
1624 1652 + IPython.core.completer.IPCompleter.unicode_names
1625 1653 + IPython.core.debugger.InterruptiblePdb.precmd
1626 1654 + IPython.core.debugger.Pdb.precmd
1627 1655 + IPython.core.ultratb.AutoFormattedTB.has_colors
1628 1656 + IPython.core.ultratb.ColorTB.has_colors
1629 1657 + IPython.core.ultratb.FormattedTB.has_colors
1630 1658 + IPython.core.ultratb.ListTB.has_colors
1631 1659 + IPython.core.ultratb.SyntaxTB.has_colors
1632 1660 + IPython.core.ultratb.TBTools.has_colors
1633 1661 + IPython.core.ultratb.VerboseTB.has_colors
1634 1662 + IPython.terminal.debugger.TerminalPdb.do_interact
1635 1663 + IPython.terminal.debugger.TerminalPdb.precmd
1636 1664
1637 1665 The following attribute/methods have been removed::
1638 1666
1639 1667 - IPython.core.application.BaseIPythonApplication.deprecated_subcommands
1640 1668 - IPython.core.ultratb.AutoFormattedTB.format_records
1641 1669 - IPython.core.ultratb.ColorTB.format_records
1642 1670 - IPython.core.ultratb.FormattedTB.format_records
1643 1671 - IPython.terminal.embed.InteractiveShellEmbed.init_deprecation_warnings
1644 1672 - IPython.terminal.embed.InteractiveShellEmbed.init_readline
1645 1673 - IPython.terminal.embed.InteractiveShellEmbed.write
1646 1674 - IPython.terminal.embed.InteractiveShellEmbed.write_err
1647 1675 - IPython.terminal.interactiveshell.TerminalInteractiveShell.init_deprecation_warnings
1648 1676 - IPython.terminal.interactiveshell.TerminalInteractiveShell.init_readline
1649 1677 - IPython.terminal.interactiveshell.TerminalInteractiveShell.write
1650 1678 - IPython.terminal.interactiveshell.TerminalInteractiveShell.write_err
1651 1679 - IPython.terminal.ipapp.LocateIPythonApp.deprecated_subcommands
1652 1680 - IPython.terminal.ipapp.LocateIPythonApp.initialize_subcommand
1653 1681 - IPython.terminal.ipapp.TerminalIPythonApp.deprecated_subcommands
1654 1682 - IPython.terminal.ipapp.TerminalIPythonApp.initialize_subcommand
General Comments 0
You need to be logged in to leave comments. Login now