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