##// END OF EJS Templates
Merge pull request #13461 from ipython/jasongrout-patch-1...
Matthias Bussonnier -
r27427:5f67728a merge
parent child Browse files
Show More
@@ -1,906 +1,897 b''
1 1 ============
2 2 8.x Series
3 3 ============
4 4
5 5 IPython 8.0
6 6 -----------
7 7
8 IPython 8.0 is still in alpha/beta stage. Please help us improve those release notes
9 by sending PRs that modify docs/source/whatsnew/version8.rst
10
11 8 IPython 8.0 is bringing a large number of new features and improvements to both the
12 9 user of the terminal and of the kernel via Jupyter. The removal of compatibility
13 10 with older version of Python is also the opportunity to do a couple of
14 11 performance improvement in particular with respect to startup time.
15 12 The 8.x branch started diverging from its predecessor around IPython 7.12
16 13 (January 2020).
17 14
18 This release contains 250+ Pull Requests, in addition to many of the features
19 and backports that have made it to the 7.x branch. All PRs that went into this
20 released are properly tagged with the 8.0 milestone if you wish to have a more
21 in depth look at the changes.
15 This release contains 250+ pull requests, in addition to many of the features
16 and backports that have made it to the 7.x branch. Please see the
17 `8.0 milestone <https://github.com/ipython/ipython/milestone/73?closed=1>`__ for the full list of pull requests.
22 18
23 Please fell free to send pull-requests to updates those notes after release,
19 Please fell free to send pull requests to updates those notes after release,
24 20 I have likely forgotten a few things reviewing 250+ PRs.
25 21
26 22 Dependencies changes/downstream packaging
27 23 -----------------------------------------
28 24
29 Note that most of our building step have been changes to be (mostly) declarative
30 and follow PEP 517, we are trying to completely remove ``setup.py`` (:ghpull:`13238`) and are
25 Most of our building steps have been changed to be (mostly) declarative
26 and follow PEP 517. We are trying to completely remove ``setup.py`` (:ghpull:`13238`) and are
31 27 looking for help to do so.
32 28
33 - Minimum supported ``traitlets`` version if now 5+
29 - minimum supported ``traitlets`` version is now 5+
34 30 - we now require ``stack_data``
35 - Minimal Python is now 3.8
31 - minimal Python is now 3.8
36 32 - ``nose`` is not a testing requirement anymore
37 33 - ``pytest`` replaces nose.
38 34 - ``iptest``/``iptest3`` cli entrypoints do not exists anymore.
39 35 - minimum officially support ``numpy`` version has been bumped, but this should
40 36 not have much effect on packaging.
41 37
42 38
43 39 Deprecation and removal
44 40 -----------------------
45 41
46 42 We removed almost all features, arguments, functions, and modules that were
47 marked as deprecated between IPython 1.0 and 5.0. As reminder 5.0 was released
48 in 2016, and 1.0 in 2013. Last release of the 5 branch was 5.10.0, in may 2020.
43 marked as deprecated between IPython 1.0 and 5.0. As a reminder, 5.0 was released
44 in 2016, and 1.0 in 2013. Last release of the 5 branch was 5.10.0, in May 2020.
49 45 The few remaining deprecated features we left have better deprecation warnings
50 46 or have been turned into explicit errors for better error messages.
51 47
52 48 I will use this occasion to add the following requests to anyone emitting a
53 49 deprecation warning:
54 50
55 - Please at at least ``stacklevel=2`` so that the warning is emitted into the
51 - Please use at least ``stacklevel=2`` so that the warning is emitted into the
56 52 caller context, and not the callee one.
57 53 - Please add **since which version** something is deprecated.
58 54
59 As a side note it is much easier to deal with conditional comparing to versions
60 numbers than ``try/except`` when a functionality change with version.
55 As a side note, it is much easier to conditionally compare version
56 numbers rather than using ``try/except`` when functionality changes with a version.
61 57
62 58 I won't list all the removed features here, but modules like ``IPython.kernel``,
63 which was just a shim module around ``ipykernel`` for the past 8 years have been
64 remove, and so many other similar things that pre-date the name **Jupyter**
59 which was just a shim module around ``ipykernel`` for the past 8 years, have been
60 removed, and so many other similar things that pre-date the name **Jupyter**
65 61 itself.
66 62
67 We no longer need to add ``IPyhton.extensions`` to the PYTHONPATH because that is being
63 We no longer need to add ``IPython.extensions`` to the PYTHONPATH because that is being
68 64 handled by ``load_extension``.
69 65
70 66 We are also removing ``Cythonmagic``, ``sympyprinting`` and ``rmagic`` as they are now in
71 67 other packages and no longer need to be inside IPython.
72 68
73 69
74 70 Documentation
75 71 -------------
76 72
77 Majority of our docstrings have now been reformatted and automatically fixed by
78 the experimental `VΓ©lin <https://pypi.org/project/velin/>`_ project, to conform
73 The majority of our docstrings have now been reformatted and automatically fixed by
74 the experimental `VΓ©lin <https://pypi.org/project/velin/>`_ project to conform
79 75 to numpydoc.
80 76
81 77 Type annotations
82 78 ----------------
83 79
84 80 While IPython itself is highly dynamic and can't be completely typed, many of
85 the function now have type annotation, and part of the codebase and now checked
81 the functions now have type annotations, and part of the codebase is now checked
86 82 by mypy.
87 83
88 84
89 85 Featured changes
90 86 ----------------
91 87
92 88 Here is a features list of changes in IPython 8.0. This is of course non-exhaustive.
93 89 Please note as well that many features have been added in the 7.x branch as well
94 90 (and hence why you want to read the 7.x what's new notes), in particular
95 features contributed by QuantStack (with respect to debugger protocol, and Xeus
96 Python), as well as many debugger features that I was please to implement as
97 part of my work at QuanSight and Sponsored by DE Shaw.
91 features contributed by QuantStack (with respect to debugger protocol and Xeus
92 Python), as well as many debugger features that I was pleased to implement as
93 part of my work at QuanSight and sponsored by DE Shaw.
98 94
99 95 Traceback improvements
100 96 ~~~~~~~~~~~~~~~~~~~~~~
101 97
102 98 Previously, error tracebacks for errors happening in code cells were showing a
103 99 hash, the one used for compiling the Python AST::
104 100
105 101 In [1]: def foo():
106 102 ...: return 3 / 0
107 103 ...:
108 104
109 105 In [2]: foo()
110 106 ---------------------------------------------------------------------------
111 107 ZeroDivisionError Traceback (most recent call last)
112 108 <ipython-input-2-c19b6d9633cf> in <module>
113 109 ----> 1 foo()
114 110
115 111 <ipython-input-1-1595a74c32d5> in foo()
116 112 1 def foo():
117 113 ----> 2 return 3 / 0
118 114 3
119 115
120 116 ZeroDivisionError: division by zero
121 117
122 118 The error traceback is now correctly formatted, showing the cell number in which the error happened::
123 119
124 120 In [1]: def foo():
125 121 ...: return 3 / 0
126 122 ...:
127 123
128 124 Input In [2]: foo()
129 125 ---------------------------------------------------------------------------
130 126 ZeroDivisionError Traceback (most recent call last)
131 127 input In [2], in <module>
132 128 ----> 1 foo()
133 129
134 130 Input In [1], in foo()
135 131 1 def foo():
136 132 ----> 2 return 3 / 0
137 133
138 134 ZeroDivisionError: division by zero
139 135
140 The Second on is the integration of the ``stack_data`` package;
141 which provide smarter informations in traceback; in particular it will highlight
142 the AST node where an error occurs which can help to quickly narrow down errors.
136 The ``stack_data`` package has been integrated, which provides smarter information in the traceback;
137 in particular it will highlight the AST node where an error occurs which can help to quickly narrow down errors.
143 138
144 139 For example in the following snippet::
145 140
146 141 def foo(i):
147 142 x = [[[0]]]
148 143 return x[0][i][0]
149 144
150 145
151 146 def bar():
152 147 return foo(0) + foo(
153 148 1
154 149 ) + foo(2)
155 150
156 151
157 Calling ``bar()`` would raise an ``IndexError`` on the return line of ``foo``,
158 IPython 8.0 is capable of telling you, where the index error occurs::
152 calling ``bar()`` would raise an ``IndexError`` on the return line of ``foo``,
153 and IPython 8.0 is capable of telling you where the index error occurs::
159 154
160 155
161 156 IndexError
162 157 Input In [2], in <module>
163 158 ----> 1 bar()
164 159 ^^^^^
165 160
166 161 Input In [1], in bar()
167 162 6 def bar():
168 163 ----> 7 return foo(0) + foo(
169 164 ^^^^
170 165 8 1
171 166 ^^^^^^^^
172 167 9 ) + foo(2)
173 168 ^^^^
174 169
175 170 Input In [1], in foo(i)
176 171 1 def foo(i):
177 172 2 x = [[[0]]]
178 173 ----> 3 return x[0][i][0]
179 174 ^^^^^^^
180 175
181 Corresponding location marked here with ``^`` will show up highlighted in
182 terminal and notebooks.
176 The corresponding locations marked here with ``^`` will show up highlighted in
177 the terminal and notebooks.
183 178
184 The Third, which is the most discreet but can have a high impact on
185 productivity, a colon ``::`` and line number is appended after a filename in
179 Finally, a colon ``::`` and line number is appended after a filename in
186 180 traceback::
187 181
188 182
189 183 ZeroDivisionError Traceback (most recent call last)
190 184 File ~/error.py:4, in <module>
191 185 1 def f():
192 186 2 1/0
193 187 ----> 4 f()
194 188
195 189 File ~/error.py:2, in f()
196 190 1 def f():
197 191 ----> 2 1/0
198 192
199 Many terminal and editor have integrations allow to directly jump to the
200 relevant file/line when this syntax is used.
193 Many terminals and editors have integrations enabling you to directly jump to the
194 relevant file/line when this syntax is used, so this small addition may have a high
195 impact on productivity.
201 196
202 197
203 198 Autosuggestons
204 199 ~~~~~~~~~~~~~~
205 200
206 201 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>`__.
207 202
208 203 `Ptpython <https://github.com/prompt-toolkit/ptpython#ptpython>`__ allows users to enable this feature in
209 204 `ptpython/config.py <https://github.com/prompt-toolkit/ptpython/blob/master/examples/ptpython_config/config.py#L90>`__.
210 205
211 206 This feature allows users to accept autosuggestions with ctrl e, ctrl f,
212 207 or right arrow as described below.
213 208
214 209 1. Start ipython
215 210
216 211 .. image:: ../_images/8.0/auto_suggest_1_prompt_no_text.png
217 212
218 213 2. Run ``print("hello")``
219 214
220 215 .. image:: ../_images/8.0/auto_suggest_2_print_hello_suggest.png
221 216
222 217 3. start typing ``print`` again to see the autosuggestion
223 218
224 219 .. image:: ../_images/8.0/auto_suggest_3_print_hello_suggest.png
225 220
226 221 4. Press ``ctrl-f``, or ``ctrl-e``, or ``right-arrow`` to accept the suggestion
227 222
228 223 .. image:: ../_images/8.0/auto_suggest_4_print_hello.png
229 224
230 225 You can also complete word by word:
231 226
232 227 1. Run ``def say_hello(): print("hello")``
233 228
234 229 .. image:: ../_images/8.0/auto_suggest_second_prompt.png
235 230
236 231 2. Start typing the first letter if ``def`` to see the autosuggestion
237 232
238 233 .. image:: ../_images/8.0/auto_suggest_d_phantom.png
239 234
240 235 3. Press ``alt-f`` (or ``escape`` followed by ``f``), to accept the first word of the suggestion
241 236
242 237 .. image:: ../_images/8.0/auto_suggest_def_phantom.png
243 238
244 239 Importantly, this feature does not interfere with tab completion:
245 240
246 241 1. After running ``def say_hello(): print("hello")``, press d
247 242
248 243 .. image:: ../_images/8.0/auto_suggest_d_phantom.png
249 244
250 245 2. Press Tab to start tab completion
251 246
252 247 .. image:: ../_images/8.0/auto_suggest_d_completions.png
253 248
254 249 3A. Press Tab again to select the first option
255 250
256 251 .. image:: ../_images/8.0/auto_suggest_def_completions.png
257 252
258 253 3B. Press ``alt f`` (``escape``, ``f``) to accept to accept the first word of the suggestion
259 254
260 255 .. image:: ../_images/8.0/auto_suggest_def_phantom.png
261 256
262 257 3C. Press ``ctrl-f`` or ``ctrl-e`` to accept the entire suggestion
263 258
264 259 .. image:: ../_images/8.0/auto_suggest_match_parens.png
265 260
266 261
267 262 Currently, autosuggestions are only shown in the emacs or vi insert editing modes:
268 263
269 264 - The ctrl e, ctrl f, and alt f shortcuts work by default in emacs mode.
270 265 - 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/>`__.
271 266
272 267
273 268 Show pinfo information in ipdb using "?" and "??"
274 269 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
275 270
276 271 In IPDB, it is now possible to show the information about an object using "?"
277 and "??", in much the same way it can be done when using the IPython prompt::
272 and "??", in much the same way that it can be done when using the IPython prompt::
278 273
279 274 ipdb> partial?
280 275 Init signature: partial(self, /, *args, **kwargs)
281 276 Docstring:
282 277 partial(func, *args, **keywords) - new function with partial application
283 278 of the given arguments and keywords.
284 279 File: ~/.pyenv/versions/3.8.6/lib/python3.8/functools.py
285 280 Type: type
286 281 Subclasses:
287 282
288 283 Previously, ``pinfo`` or ``pinfo2`` command had to be used for this purpose.
289 284
290 285
291 286 Autoreload 3 feature
292 287 ~~~~~~~~~~~~~~~~~~~~
293 288
294 Example: When an IPython session is ran with the 'autoreload' extension loaded,
295 you will now have the option '3' to select which means the following:
289 Example: When an IPython session is run with the 'autoreload' extension loaded,
290 you will now have the option '3' to select, which means the following:
296 291
297 292 1. replicate all functionality from option 2
298 293 2. autoload all new funcs/classes/enums/globals from the module when they are added
299 294 3. autoload all newly imported funcs/classes/enums/globals from external modules
300 295
301 Try ``%autoreload 3`` in an IPython session after running ``%load_ext autoreload``
296 Try ``%autoreload 3`` in an IPython session after running ``%load_ext autoreload``.
302 297
303 298 For more information please see the following unit test : ``extensions/tests/test_autoreload.py:test_autoload_newly_added_objects``
304 299
305 300 Auto formatting with black in the CLI
306 301 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
307 302
308 303 If ``black`` is installed in the same environment as IPython, terminal IPython
309 304 will now *by default* reformat the code in the CLI when possible. You can
310 305 disable this with ``--TerminalInteractiveShell.autoformatter=None``.
311 306
312 This feature was present in 7.x but disabled by default.
307 This feature was present in 7.x, but disabled by default.
313 308
314 309
315 310 History Range Glob feature
316 311 ~~~~~~~~~~~~~~~~~~~~~~~~~~
317 312
318 313 Previously, when using ``%history``, users could specify either
319 314 a range of sessions and lines, for example:
320 315
321 316 .. code-block:: python
322 317
323 318 ~8/1-~6/5 # see history from the first line of 8 sessions ago,
324 319 # to the fifth line of 6 sessions ago.``
325 320
326 321 Or users could specify a glob pattern:
327 322
328 323 .. code-block:: python
329 324
330 325 -g <pattern> # glob ALL history for the specified pattern.
331 326
332 327 However users could *not* specify both.
333 328
334 329 If a user *did* specify both a range and a glob pattern,
335 330 then the glob pattern would be used (globbing *all* history) *and the range would be ignored*.
336 331
337 332 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.
338 333
339 Don't start a multi line cell with sunken parenthesis
334 Don't start a multi-line cell with sunken parenthesis
340 335 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
341 336
342 From now on IPython will not ask for the next line of input when given a single
337 From now on, IPython will not ask for the next line of input when given a single
343 338 line with more closing than opening brackets. For example, this means that if
344 339 you (mis)type ``]]`` instead of ``[]``, a ``SyntaxError`` will show up, instead of
345 340 the ``...:`` prompt continuation.
346 341
347 342 IPython shell for ipdb interact
348 343 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
349 344
350 345 The ipdb ``interact`` starts an IPython shell instead of Python's built-in ``code.interact()``.
351 346
352 347 Automatic Vi prompt stripping
353 348 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
354 349
355 350 When pasting code into IPython, it will strip the leading prompt characters if
356 351 there are any. For example, you can paste the following code into the console -
357 352 it will still work, even though each line is prefixed with prompts (`In`,
358 353 `Out`)::
359 354
360 355 In [1]: 2 * 2 == 4
361 356 Out[1]: True
362 357
363 358 In [2]: print("This still works as pasted")
364 359
365 360
366 361 Previously, this was not the case for the Vi-mode prompts::
367 362
368 363 In [1]: [ins] In [13]: 2 * 2 == 4
369 364 ...: Out[13]: True
370 365 ...:
371 366 File "<ipython-input-1-727bb88eaf33>", line 1
372 367 [ins] In [13]: 2 * 2 == 4
373 368 ^
374 369 SyntaxError: invalid syntax
375 370
376 371 This is now fixed, and Vi prompt prefixes - ``[ins]`` and ``[nav]`` - are
377 372 skipped just as the normal ``In`` would be.
378 373
379 374 IPython shell can be started in the Vi mode using ``ipython --TerminalInteractiveShell.editing_mode=vi``,
380 375 You should be able to change mode dynamically with ``%config TerminalInteractiveShell.editing_mode='vi'``
381 376
382 377 Empty History Ranges
383 378 ~~~~~~~~~~~~~~~~~~~~
384 379
385 380 A number of magics that take history ranges can now be used with an empty
386 381 range. These magics are:
387 382
388 383 * ``%save``
389 384 * ``%load``
390 385 * ``%pastebin``
391 386 * ``%pycat``
392 387
393 388 Using them this way will make them take the history of the current session up
394 389 to the point of the magic call (such that the magic itself will not be
395 390 included).
396 391
397 Therefore it is now possible to save the whole history to a file using simple
392 Therefore it is now possible to save the whole history to a file using
398 393 ``%save <filename>``, load and edit it using ``%load`` (makes for a nice usage
399 394 when followed with :kbd:`F2`), send it to `dpaste.org <http://dpast.org>`_ using
400 395 ``%pastebin``, or view the whole thing syntax-highlighted with a single
401 396 ``%pycat``.
402 397
403 398
404 Windows time-implementation: Switch to process_time
405 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
406 Timing for example with ``%%time`` on windows is based on ``time.perf_counter``.
407 This is at the end the same as W-All.
408 To be a bit tighter to linux one could change to ``time.process_time`` instead.
409 Thus for example one would no longer count periods of sleep and further.
410
399 Windows timing implementation: Switch to process_time
400 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
401 Timing on Windows, for example with ``%%time``, was changed from being based on ``time.perf_counter``
402 (which counted time even when the process was sleeping) to being based on ``time.process_time`` instead
403 (which only counts CPU time). This brings it closer to the behavior on Linux. See :ghpull:`12984`.
411 404
412 405 Miscellaneous
413 406 ~~~~~~~~~~~~~
414 - Non-text formatters are not disabled in terminal which should simplify
415 writing extension displaying images or other mimetypes supporting terminals.
407 - Non-text formatters are not disabled in the terminal, which should simplify
408 writing extensions displaying images or other mimetypes in supporting terminals.
416 409 :ghpull:`12315`
417 -
418 410 - It is now possible to automatically insert matching brackets in Terminal IPython using the
419 411 ``TerminalInteractiveShell.auto_match=True`` option. :ghpull:`12586`
420 - We are thinking of deprecating the current ``%%javascript`` magic in favor of a better replacement. See :ghpull:`13376`
421 - ``%time`` uses ``process_time`` instead of ``perf_counter``, see :ghpull:`12984`
412 - We are thinking of deprecating the current ``%%javascript`` magic in favor of a better replacement. See :ghpull:`13376`.
422 413 - ``~`` is now expanded when part of a path in most magics :ghpull:`13385`
423 - ``%/%%timeit`` magic now adds comma every thousands to make reading long number easier :ghpull:`13379`
414 - ``%/%%timeit`` magic now adds a comma every thousands to make reading a long number easier :ghpull:`13379`
424 415 - ``"info"`` messages can now be customised to hide some fields :ghpull:`13343`
425 416 - ``collections.UserList`` now pretty-prints :ghpull:`13320`
426 - The debugger now have a persistent history, which should make it less
417 - The debugger now has a persistent history, which should make it less
427 418 annoying to retype commands :ghpull:`13246`
428 - ``!pip`` ``!conda`` ``!cd`` or ``!ls`` are likely doing the wrong thing, we
429 now warn users if they use it. :ghpull:`12954`
430 - make ``%precision`` work for ``numpy.float64`` type :ghpull:`12902`
419 - ``!pip`` ``!conda`` ``!cd`` or ``!ls`` are likely doing the wrong thing. We
420 now warn users if they use one of those commands. :ghpull:`12954`
421 - Make ``%precision`` work for ``numpy.float64`` type :ghpull:`12902`
431 422
432 423 Re-added support for XDG config directories
433 424 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
434 425
435 XDG support through the years did come an go, there is a tension between having
436 identical location in all platforms to have simple instructions. After initial
437 failure a couple of years ago IPython was modified to automatically migrate XDG
438 config files back into ``~/.ipython``, the migration code has now been removed.
439 And IPython now check the XDG locations, so if you _manually_ move your config
426 XDG support through the years comes and goes. There is a tension between having
427 an identical location for configuration in all platforms versus having simple instructions.
428 After initial failures a couple of years ago, IPython was modified to automatically migrate XDG
429 config files back into ``~/.ipython``. That migration code has now been removed.
430 IPython now checks the XDG locations, so if you _manually_ move your config
440 431 files to your preferred location, IPython will not move them back.
441 432
442 433
443 Numfocus Small Developer Grant
444 ------------------------------
434 Preparing for Python 3.10
435 -------------------------
445 436
446 To prepare for Python 3.10 we have also started working on removing reliance and
447 any dependency that is not Python 3.10 compatible; that include migrating our
448 test suite to pytest, and starting to remove nose. This also mean that the
449 ``iptest`` command is now gone, and all testing is via pytest.
437 To prepare for Python 3.10, we have started working on removing reliance and
438 any dependency that is not compatible with Python 3.10. This includes migrating our
439 test suite to pytest and starting to remove nose. This also means that the
440 ``iptest`` command is now gone and all testing is via pytest.
450 441
451 442 This was in large part thanks to the NumFOCUS Small Developer grant, which enabled us to
452 443 allocate \$4000 to hire `Nikita Kniazev (@Kojoley) <https://github.com/Kojoley>`_,
453 444 who did a fantastic job at updating our code base, migrating to pytest, pushing
454 445 our coverage, and fixing a large number of bugs. I highly recommend contacting
455 them if you need help with C++ and Python projects
446 them if you need help with C++ and Python projects.
456 447
457 448 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+>`__
458 449
459 Removing support for Older Python
460 ---------------------------------
450 Removing support for older Python versions
451 ------------------------------------------
461 452
462 453
463 We are also removing support for Python up to 3.7 allowing internal code to use more
464 efficient ``pathlib``, and make better use of type annotations.
454 We are removing support for Python up through 3.7, allowing internal code to use the more
455 efficient ``pathlib`` and to make better use of type annotations.
465 456
466 457 .. image:: ../_images/8.0/pathlib_pathlib_everywhere.jpg
467 458 :alt: "Meme image of Toy Story with Woody and Buzz, with the text 'pathlib, pathlib everywhere'"
468 459
469 460
470 We have about 34 PRs only to update some logic to update some functions from managing strings to
461 We had about 34 PRs only to update some logic to update some functions from managing strings to
471 462 using Pathlib.
472 463
473 The completer has also seen significant updates and make use of newer Jedi API
464 The completer has also seen significant updates and now makes use of newer Jedi APIs,
474 465 offering faster and more reliable tab completion.
475 466
476 467 Misc Statistics
477 468 ---------------
478 469
479 Here are some numbers:
470 Here are some numbers::
480 471
481 472 7.x: 296 files, 12561 blank lines, 20282 comments, 35142 line of code.
482 473 8.0: 252 files, 12053 blank lines, 19232 comments, 34505 line of code.
483 474
484 475 $ git diff --stat 7.x...master | tail -1
485 476 340 files changed, 13399 insertions(+), 12421 deletions(-)
486 477
487 We have commits from 162 authors, who contributed 1916 commits in 23 month, excluding merges to not bias toward
488 maintainers pushing buttons.::
478 We have commits from 162 authors, who contributed 1916 commits in 23 month, excluding merges (to not bias toward
479 maintainers pushing buttons).::
489 480
490 481 $ git shortlog -s --no-merges 7.x...master | sort -nr
491 482 535 Matthias Bussonnier
492 483 86 Nikita Kniazev
493 484 69 Blazej Michalik
494 485 49 Samuel Gaist
495 486 27 Itamar Turner-Trauring
496 487 18 Spas Kalaydzhisyki
497 488 17 Thomas Kluyver
498 489 17 Quentin Peter
499 490 17 James Morris
500 491 17 Artur Svistunov
501 492 15 Bart Skowron
502 493 14 Alex Hall
503 494 13 rushabh-v
504 495 13 Terry Davis
505 496 13 Benjamin Ragan-Kelley
506 497 8 martinRenou
507 498 8 farisachugthai
508 499 7 dswij
509 500 7 Gal B
510 501 7 Corentin Cadiou
511 502 6 yuji96
512 503 6 Martin Skarzynski
513 504 6 Justin Palmer
514 505 6 Daniel Goldfarb
515 506 6 Ben Greiner
516 507 5 Sammy Al Hashemi
517 508 5 Paul Ivanov
518 509 5 Inception95
519 510 5 Eyenpi
520 511 5 Douglas Blank
521 512 5 Coco Mishra
522 513 5 Bibo Hao
523 514 5 AndrΓ© A. Gomes
524 515 5 Ahmed Fasih
525 516 4 takuya fujiwara
526 517 4 palewire
527 518 4 Thomas A Caswell
528 519 4 Talley Lambert
529 520 4 Scott Sanderson
530 521 4 Ram Rachum
531 522 4 Nick Muoh
532 523 4 Nathan Goldbaum
533 524 4 Mithil Poojary
534 525 4 Michael T
535 526 4 Jakub Klus
536 527 4 Ian Castleden
537 528 4 Eli Rykoff
538 529 4 Ashwin Vishnu
539 530 3 谭九鼎
540 531 3 sleeping
541 532 3 Sylvain Corlay
542 533 3 Peter Corke
543 534 3 Paul Bissex
544 535 3 Matthew Feickert
545 536 3 Fernando Perez
546 537 3 Eric Wieser
547 538 3 Daniel Mietchen
548 539 3 Aditya Sathe
549 540 3 007vedant
550 541 2 rchiodo
551 542 2 nicolaslazo
552 543 2 luttik
553 544 2 gorogoroumaru
554 545 2 foobarbyte
555 546 2 bar-hen
556 547 2 Theo Ouzhinski
557 548 2 Strawkage
558 549 2 Samreen Zarroug
559 550 2 Pete Blois
560 551 2 Meysam Azad
561 552 2 Matthieu Ancellin
562 553 2 Mark Schmitz
563 554 2 Maor Kleinberger
564 555 2 MRCWirtz
565 556 2 Lumir Balhar
566 557 2 Julien Rabinow
567 558 2 Juan Luis Cano RodrΓ­guez
568 559 2 Joyce Er
569 560 2 Jakub
570 561 2 Faris A Chugthai
571 562 2 Ethan Madden
572 563 2 Dimitri Papadopoulos
573 564 2 Diego Fernandez
574 565 2 Daniel Shimon
575 566 2 Coco Bennett
576 567 2 Carlos Cordoba
577 568 2 Boyuan Liu
578 569 2 BaoGiang HoangVu
579 570 2 Augusto
580 571 2 Arthur Svistunov
581 572 2 Arthur Moreira
582 573 2 Ali Nabipour
583 574 2 Adam Hackbarth
584 575 1 richard
585 576 1 linar-jether
586 577 1 lbennett
587 578 1 juacrumar
588 579 1 gpotter2
589 580 1 digitalvirtuoso
590 581 1 dalthviz
591 582 1 Yonatan Goldschmidt
592 583 1 Tomasz KΕ‚oczko
593 584 1 Tobias Bengfort
594 585 1 Timur Kushukov
595 586 1 Thomas
596 587 1 Snir Broshi
597 588 1 Shao Yang Hong
598 589 1 Sanjana-03
599 590 1 Romulo Filho
600 591 1 Rodolfo Carvalho
601 592 1 Richard Shadrach
602 593 1 Reilly Tucker Siemens
603 594 1 Rakessh Roshan
604 595 1 Piers Titus van der Torren
605 596 1 PhanatosZou
606 597 1 Pavel Safronov
607 598 1 Paulo S. Costa
608 599 1 Paul McCarthy
609 600 1 NotWearingPants
610 601 1 Naelson Douglas
611 602 1 Michael Tiemann
612 603 1 Matt Wozniski
613 604 1 Markus Wageringel
614 605 1 Marcus Wirtz
615 606 1 Marcio Mazza
616 607 1 LumΓ­r 'Frenzy' Balhar
617 608 1 Lightyagami1
618 609 1 Leon Anavi
619 610 1 LeafyLi
620 611 1 L0uisJ0shua
621 612 1 Kyle Cutler
622 613 1 Krzysztof Cybulski
623 614 1 Kevin Kirsche
624 615 1 KIU Shueng Chuan
625 616 1 Jonathan Slenders
626 617 1 Jay Qi
627 618 1 Jake VanderPlas
628 619 1 Iwan Briquemont
629 620 1 Hussaina Begum Nandyala
630 621 1 Gordon Ball
631 622 1 Gabriel Simonetto
632 623 1 Frank Tobia
633 624 1 Erik
634 625 1 Elliott Sales de Andrade
635 626 1 Daniel Hahler
636 627 1 Dan Green-Leipciger
637 628 1 Dan Green
638 629 1 Damian Yurzola
639 630 1 Coon, Ethan T
640 631 1 Carol Willing
641 632 1 Brian Lee
642 633 1 Brendan Gerrity
643 634 1 Blake Griffin
644 635 1 Bastian Ebeling
645 636 1 Bartosz Telenczuk
646 637 1 Ankitsingh6299
647 638 1 Andrew Port
648 639 1 Andrew J. Hesford
649 640 1 Albert Zhang
650 641 1 Adam Johnson
651 642
652 This does not of course represent non-code contributions.
643 This does not, of course, represent non-code contributions, for which we are also grateful.
653 644
654 645
655 646 API Changes using Frappuccino
656 647 -----------------------------
657 648
658 649 This is an experimental exhaustive API difference using `Frappuccino <https://pypi.org/project/frappuccino/>`_
659 650
660 651
661 652 The following items are new in IPython 8.0 ::
662 653
663 654 + IPython.core.async_helpers.get_asyncio_loop()
664 655 + IPython.core.completer.Dict
665 656 + IPython.core.completer.Pattern
666 657 + IPython.core.completer.Sequence
667 658 + IPython.core.completer.__skip_doctest__
668 659 + IPython.core.debugger.Pdb.precmd(self, line)
669 660 + IPython.core.debugger.__skip_doctest__
670 661 + IPython.core.display.__getattr__(name)
671 662 + IPython.core.display.warn
672 663 + IPython.core.display_functions
673 664 + IPython.core.display_functions.DisplayHandle
674 665 + IPython.core.display_functions.DisplayHandle.display(self, obj, **kwargs)
675 666 + IPython.core.display_functions.DisplayHandle.update(self, obj, **kwargs)
676 667 + IPython.core.display_functions.__all__
677 668 + IPython.core.display_functions.__builtins__
678 669 + IPython.core.display_functions.__cached__
679 670 + IPython.core.display_functions.__doc__
680 671 + IPython.core.display_functions.__file__
681 672 + IPython.core.display_functions.__loader__
682 673 + IPython.core.display_functions.__name__
683 674 + IPython.core.display_functions.__package__
684 675 + IPython.core.display_functions.__spec__
685 676 + IPython.core.display_functions.b2a_hex
686 677 + IPython.core.display_functions.clear_output(wait=False)
687 678 + IPython.core.display_functions.display(*objs, include='None', exclude='None', metadata='None', transient='None', display_id='None', raw=False, clear=False, **kwargs)
688 679 + IPython.core.display_functions.publish_display_data(data, metadata='None', source='<deprecated>', *, transient='None', **kwargs)
689 680 + IPython.core.display_functions.update_display(obj, *, display_id, **kwargs)
690 681 + IPython.core.extensions.BUILTINS_EXTS
691 682 + IPython.core.inputtransformer2.has_sunken_brackets(tokens)
692 683 + IPython.core.interactiveshell.Callable
693 684 + IPython.core.interactiveshell.__annotations__
694 685 + IPython.core.ultratb.List
695 686 + IPython.core.ultratb.Tuple
696 687 + IPython.lib.pretty.CallExpression
697 688 + IPython.lib.pretty.CallExpression.factory(name)
698 689 + IPython.lib.pretty.RawStringLiteral
699 690 + IPython.lib.pretty.RawText
700 691 + IPython.terminal.debugger.TerminalPdb.do_interact(self, arg)
701 692 + IPython.terminal.embed.Set
702 693
703 694 The following items have been removed (or moved to superclass)::
704 695
705 696 - IPython.core.application.BaseIPythonApplication.initialize_subcommand
706 697 - IPython.core.completer.Sentinel
707 698 - IPython.core.completer.skip_doctest
708 699 - IPython.core.debugger.Tracer
709 700 - IPython.core.display.DisplayHandle
710 701 - IPython.core.display.DisplayHandle.display
711 702 - IPython.core.display.DisplayHandle.update
712 703 - IPython.core.display.b2a_hex
713 704 - IPython.core.display.clear_output
714 705 - IPython.core.display.display
715 706 - IPython.core.display.publish_display_data
716 707 - IPython.core.display.update_display
717 708 - IPython.core.excolors.Deprec
718 709 - IPython.core.excolors.ExceptionColors
719 710 - IPython.core.history.warn
720 711 - IPython.core.hooks.late_startup_hook
721 712 - IPython.core.hooks.pre_run_code_hook
722 713 - IPython.core.hooks.shutdown_hook
723 714 - IPython.core.interactiveshell.InteractiveShell.init_deprecation_warnings
724 715 - IPython.core.interactiveshell.InteractiveShell.init_readline
725 716 - IPython.core.interactiveshell.InteractiveShell.write
726 717 - IPython.core.interactiveshell.InteractiveShell.write_err
727 718 - IPython.core.interactiveshell.get_default_colors
728 719 - IPython.core.interactiveshell.removed_co_newlocals
729 720 - IPython.core.magics.execution.ExecutionMagics.profile_missing_notice
730 721 - IPython.core.magics.script.PIPE
731 722 - IPython.core.prefilter.PrefilterManager.init_transformers
732 723 - IPython.core.release.classifiers
733 724 - IPython.core.release.description
734 725 - IPython.core.release.keywords
735 726 - IPython.core.release.long_description
736 727 - IPython.core.release.name
737 728 - IPython.core.release.platforms
738 729 - IPython.core.release.url
739 730 - IPython.core.ultratb.VerboseTB.format_records
740 731 - IPython.core.ultratb.find_recursion
741 732 - IPython.core.ultratb.findsource
742 733 - IPython.core.ultratb.fix_frame_records_filenames
743 734 - IPython.core.ultratb.inspect_error
744 735 - IPython.core.ultratb.is_recursion_error
745 736 - IPython.core.ultratb.with_patch_inspect
746 737 - IPython.external.__all__
747 738 - IPython.external.__builtins__
748 739 - IPython.external.__cached__
749 740 - IPython.external.__doc__
750 741 - IPython.external.__file__
751 742 - IPython.external.__loader__
752 743 - IPython.external.__name__
753 744 - IPython.external.__package__
754 745 - IPython.external.__path__
755 746 - IPython.external.__spec__
756 747 - IPython.kernel.KernelConnectionInfo
757 748 - IPython.kernel.__builtins__
758 749 - IPython.kernel.__cached__
759 750 - IPython.kernel.__warningregistry__
760 751 - IPython.kernel.pkg
761 752 - IPython.kernel.protocol_version
762 753 - IPython.kernel.protocol_version_info
763 754 - IPython.kernel.src
764 755 - IPython.kernel.version_info
765 756 - IPython.kernel.warn
766 757 - IPython.lib.backgroundjobs
767 758 - IPython.lib.backgroundjobs.BackgroundJobBase
768 759 - IPython.lib.backgroundjobs.BackgroundJobBase.run
769 760 - IPython.lib.backgroundjobs.BackgroundJobBase.traceback
770 761 - IPython.lib.backgroundjobs.BackgroundJobExpr
771 762 - IPython.lib.backgroundjobs.BackgroundJobExpr.call
772 763 - IPython.lib.backgroundjobs.BackgroundJobFunc
773 764 - IPython.lib.backgroundjobs.BackgroundJobFunc.call
774 765 - IPython.lib.backgroundjobs.BackgroundJobManager
775 766 - IPython.lib.backgroundjobs.BackgroundJobManager.flush
776 767 - IPython.lib.backgroundjobs.BackgroundJobManager.new
777 768 - IPython.lib.backgroundjobs.BackgroundJobManager.remove
778 769 - IPython.lib.backgroundjobs.BackgroundJobManager.result
779 770 - IPython.lib.backgroundjobs.BackgroundJobManager.status
780 771 - IPython.lib.backgroundjobs.BackgroundJobManager.traceback
781 772 - IPython.lib.backgroundjobs.__builtins__
782 773 - IPython.lib.backgroundjobs.__cached__
783 774 - IPython.lib.backgroundjobs.__doc__
784 775 - IPython.lib.backgroundjobs.__file__
785 776 - IPython.lib.backgroundjobs.__loader__
786 777 - IPython.lib.backgroundjobs.__name__
787 778 - IPython.lib.backgroundjobs.__package__
788 779 - IPython.lib.backgroundjobs.__spec__
789 780 - IPython.lib.kernel.__builtins__
790 781 - IPython.lib.kernel.__cached__
791 782 - IPython.lib.kernel.__doc__
792 783 - IPython.lib.kernel.__file__
793 784 - IPython.lib.kernel.__loader__
794 785 - IPython.lib.kernel.__name__
795 786 - IPython.lib.kernel.__package__
796 787 - IPython.lib.kernel.__spec__
797 788 - IPython.lib.kernel.__warningregistry__
798 789 - IPython.paths.fs_encoding
799 790 - IPython.terminal.debugger.DEFAULT_BUFFER
800 791 - IPython.terminal.debugger.cursor_in_leading_ws
801 792 - IPython.terminal.debugger.emacs_insert_mode
802 793 - IPython.terminal.debugger.has_selection
803 794 - IPython.terminal.debugger.vi_insert_mode
804 795 - IPython.terminal.interactiveshell.DISPLAY_BANNER_DEPRECATED
805 796 - IPython.terminal.ipapp.TerminalIPythonApp.parse_command_line
806 797 - IPython.testing.test
807 798 - IPython.utils.contexts.NoOpContext
808 799 - IPython.utils.io.IOStream
809 800 - IPython.utils.io.IOStream.close
810 801 - IPython.utils.io.IOStream.write
811 802 - IPython.utils.io.IOStream.writelines
812 803 - IPython.utils.io.__warningregistry__
813 804 - IPython.utils.io.atomic_writing
814 805 - IPython.utils.io.stderr
815 806 - IPython.utils.io.stdin
816 807 - IPython.utils.io.stdout
817 808 - IPython.utils.io.unicode_std_stream
818 809 - IPython.utils.path.get_ipython_cache_dir
819 810 - IPython.utils.path.get_ipython_dir
820 811 - IPython.utils.path.get_ipython_module_path
821 812 - IPython.utils.path.get_ipython_package_dir
822 813 - IPython.utils.path.locate_profile
823 814 - IPython.utils.path.unquote_filename
824 815 - IPython.utils.py3compat.PY2
825 816 - IPython.utils.py3compat.PY3
826 817 - IPython.utils.py3compat.buffer_to_bytes
827 818 - IPython.utils.py3compat.builtin_mod_name
828 819 - IPython.utils.py3compat.cast_bytes
829 820 - IPython.utils.py3compat.getcwd
830 821 - IPython.utils.py3compat.isidentifier
831 822 - IPython.utils.py3compat.u_format
832 823
833 824 The following signatures differ between 7.x and 8.0::
834 825
835 826 - IPython.core.completer.IPCompleter.unicode_name_matches(self, text)
836 827 + IPython.core.completer.IPCompleter.unicode_name_matches(text)
837 828
838 829 - IPython.core.completer.match_dict_keys(keys, prefix, delims)
839 830 + IPython.core.completer.match_dict_keys(keys, prefix, delims, extra_prefix='None')
840 831
841 832 - IPython.core.interactiveshell.InteractiveShell.object_inspect_mime(self, oname, detail_level=0)
842 833 + IPython.core.interactiveshell.InteractiveShell.object_inspect_mime(self, oname, detail_level=0, omit_sections='()')
843 834
844 835 - IPython.core.interactiveshell.InteractiveShell.set_hook(self, name, hook, priority=50, str_key='None', re_key='None', _warn_deprecated=True)
845 836 + IPython.core.interactiveshell.InteractiveShell.set_hook(self, name, hook, priority=50, str_key='None', re_key='None')
846 837
847 838 - IPython.core.oinspect.Inspector.info(self, obj, oname='', formatter='None', info='None', detail_level=0)
848 839 + IPython.core.oinspect.Inspector.info(self, obj, oname='', info='None', detail_level=0)
849 840
850 841 - IPython.core.oinspect.Inspector.pinfo(self, obj, oname='', formatter='None', info='None', detail_level=0, enable_html_pager=True)
851 842 + IPython.core.oinspect.Inspector.pinfo(self, obj, oname='', formatter='None', info='None', detail_level=0, enable_html_pager=True, omit_sections='()')
852 843
853 844 - IPython.core.profiledir.ProfileDir.copy_config_file(self, config_file, path='None', overwrite=False)
854 845 + IPython.core.profiledir.ProfileDir.copy_config_file(self, config_file, path, overwrite=False)
855 846
856 847 - IPython.core.ultratb.VerboseTB.format_record(self, frame, file, lnum, func, lines, index)
857 848 + IPython.core.ultratb.VerboseTB.format_record(self, frame_info)
858 849
859 850 - IPython.terminal.embed.InteractiveShellEmbed.mainloop(self, local_ns='None', module='None', stack_depth=0, display_banner='None', global_ns='None', compile_flags='None')
860 851 + IPython.terminal.embed.InteractiveShellEmbed.mainloop(self, local_ns='None', module='None', stack_depth=0, compile_flags='None')
861 852
862 853 - IPython.terminal.embed.embed(**kwargs)
863 854 + IPython.terminal.embed.embed(*, header='', compile_flags='None', **kwargs)
864 855
865 856 - IPython.terminal.interactiveshell.TerminalInteractiveShell.interact(self, display_banner='<object object at 0xffffff>')
866 857 + IPython.terminal.interactiveshell.TerminalInteractiveShell.interact(self)
867 858
868 859 - IPython.terminal.interactiveshell.TerminalInteractiveShell.mainloop(self, display_banner='<object object at 0xffffff>')
869 860 + IPython.terminal.interactiveshell.TerminalInteractiveShell.mainloop(self)
870 861
871 862 - IPython.utils.path.get_py_filename(name, force_win32='None')
872 863 + IPython.utils.path.get_py_filename(name)
873 864
874 865 The following are new attributes (that might be inherited)::
875 866
876 867 + IPython.core.completer.IPCompleter.unicode_names
877 868 + IPython.core.debugger.InterruptiblePdb.precmd
878 869 + IPython.core.debugger.Pdb.precmd
879 870 + IPython.core.ultratb.AutoFormattedTB.has_colors
880 871 + IPython.core.ultratb.ColorTB.has_colors
881 872 + IPython.core.ultratb.FormattedTB.has_colors
882 873 + IPython.core.ultratb.ListTB.has_colors
883 874 + IPython.core.ultratb.SyntaxTB.has_colors
884 875 + IPython.core.ultratb.TBTools.has_colors
885 876 + IPython.core.ultratb.VerboseTB.has_colors
886 877 + IPython.terminal.debugger.TerminalPdb.do_interact
887 878 + IPython.terminal.debugger.TerminalPdb.precmd
888 879
889 880 The following attribute/methods have been removed::
890 881
891 882 - IPython.core.application.BaseIPythonApplication.deprecated_subcommands
892 883 - IPython.core.ultratb.AutoFormattedTB.format_records
893 884 - IPython.core.ultratb.ColorTB.format_records
894 885 - IPython.core.ultratb.FormattedTB.format_records
895 886 - IPython.terminal.embed.InteractiveShellEmbed.init_deprecation_warnings
896 887 - IPython.terminal.embed.InteractiveShellEmbed.init_readline
897 888 - IPython.terminal.embed.InteractiveShellEmbed.write
898 889 - IPython.terminal.embed.InteractiveShellEmbed.write_err
899 890 - IPython.terminal.interactiveshell.TerminalInteractiveShell.init_deprecation_warnings
900 891 - IPython.terminal.interactiveshell.TerminalInteractiveShell.init_readline
901 892 - IPython.terminal.interactiveshell.TerminalInteractiveShell.write
902 893 - IPython.terminal.interactiveshell.TerminalInteractiveShell.write_err
903 894 - IPython.terminal.ipapp.LocateIPythonApp.deprecated_subcommands
904 895 - IPython.terminal.ipapp.LocateIPythonApp.initialize_subcommand
905 896 - IPython.terminal.ipapp.TerminalIPythonApp.deprecated_subcommands
906 897 - IPython.terminal.ipapp.TerminalIPythonApp.initialize_subcommand
General Comments 0
You need to be logged in to leave comments. Login now