##// END OF EJS Templates
Merge pull request #13661 from Carreau/wn83...
Matthias Bussonnier -
r27652:d20dabd2 merge
parent child
Show More
@@ -1,1064 +1,1069
1 ============
1 ============
2 8.x Series
2 8.x Series
3 ============
3 ============
4
4
5
5
6 .. _version 8.3.0:
6 .. _version 8.3.0:
7
7
8 IPython 8.3.0
8 IPython 8.3.0
9 -------------
9 -------------
10
10
11 - :ghpull:`13625`, using ``?``, ``??``, ``*?`` will not call
11 - :ghpull:`13625`, using ``?``, ``??``, ``*?`` will not call
12 ``set_next_input`` as most frontend allow proper multiline editing and it was
12 ``set_next_input`` as most frontend allow proper multiline editing and it was
13 causing issues for many users of multi-cell frontends.
13 causing issues for many users of multi-cell frontends. This has been backported to 7.33
14
14
15
15
16 - :ghpull:`13600`, ``pre_run_*``-hooks will now have a ``cell_id`` attribute on
16 - :ghpull:`13600`, ``pre_run_*``-hooks will now have a ``cell_id`` attribute on
17 the info object when frontend provide it.
17 the info object when frontend provide it. This has been backported to 7.33
18
19 - :ghpull:`13624`, fixed :kbd:`End` key being broken after accepting an
20 auto-suggestion.
21
22 - :ghpull:`13657` fix issue where history from different sessions would be mixed.
18
23
19 .. _version 8.2.0:
24 .. _version 8.2.0:
20
25
21 IPython 8.2.0
26 IPython 8.2.0
22 -------------
27 -------------
23
28
24 IPython 8.2 mostly bring bugfixes to IPython.
29 IPython 8.2 mostly bring bugfixes to IPython.
25
30
26 - Auto-suggestion can now be elected with the ``end`` key. :ghpull:`13566`
31 - Auto-suggestion can now be elected with the ``end`` key. :ghpull:`13566`
27 - Some traceback issues with ``assert etb is not None`` have been fixed. :ghpull:`13588`
32 - Some traceback issues with ``assert etb is not None`` have been fixed. :ghpull:`13588`
28 - History is now pulled from the sqitel database and not from in-memory.
33 - History is now pulled from the sqitel database and not from in-memory.
29 In particular when using the ``%paste`` magic, the content of the pasted text will
34 In particular when using the ``%paste`` magic, the content of the pasted text will
30 be part of the history and not the verbatim text ``%paste`` anymore. :ghpull:`13592`
35 be part of the history and not the verbatim text ``%paste`` anymore. :ghpull:`13592`
31 - Fix ``Ctrl-\\`` exit cleanup :ghpull:`13603`
36 - Fix ``Ctrl-\\`` exit cleanup :ghpull:`13603`
32 - Fixes to ``ultratb`` ipdb support when used outside of IPython. :ghpull:`13498`
37 - Fixes to ``ultratb`` ipdb support when used outside of IPython. :ghpull:`13498`
33
38
34
39
35 I am still trying to fix and investigate :ghissue:`13598`, which seem to be
40 I am still trying to fix and investigate :ghissue:`13598`, which seem to be
36 random, and would appreciate help if you find reproducible minimal case. I've
41 random, and would appreciate help if you find reproducible minimal case. I've
37 tried to make various changes to the codebase to mitigate it, but a proper fix
42 tried to make various changes to the codebase to mitigate it, but a proper fix
38 will be difficult without understanding the cause.
43 will be difficult without understanding the cause.
39
44
40
45
41 All the issues on pull-requests for this release can be found in the `8.2
46 All the issues on pull-requests for this release can be found in the `8.2
42 milestone. <https://github.com/ipython/ipython/milestone/100>`__ . And some
47 milestone. <https://github.com/ipython/ipython/milestone/100>`__ . And some
43 documentation only PR can be found as part of the `7.33 milestone
48 documentation only PR can be found as part of the `7.33 milestone
44 <https://github.com/ipython/ipython/milestone/101>`__ (currently not released).
49 <https://github.com/ipython/ipython/milestone/101>`__ (currently not released).
45
50
46 Thanks to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
51 Thanks to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
47 work on IPython and related libraries.
52 work on IPython and related libraries.
48
53
49 .. _version 8.1.1:
54 .. _version 8.1.1:
50
55
51 IPython 8.1.1
56 IPython 8.1.1
52 -------------
57 -------------
53
58
54 Fix an issue with virtualenv and Python 3.8 introduced in 8.1
59 Fix an issue with virtualenv and Python 3.8 introduced in 8.1
55
60
56 Revert :ghpull:`13537` (fix an issue with symlinks in virtualenv) that raises an
61 Revert :ghpull:`13537` (fix an issue with symlinks in virtualenv) that raises an
57 error in Python 3.8, and fixed in a different way in :ghpull:`13559`.
62 error in Python 3.8, and fixed in a different way in :ghpull:`13559`.
58
63
59 .. _version 8.1:
64 .. _version 8.1:
60
65
61 IPython 8.1.0
66 IPython 8.1.0
62 -------------
67 -------------
63
68
64 IPython 8.1 is the first minor release after 8.0 and fixes a number of bugs and
69 IPython 8.1 is the first minor release after 8.0 and fixes a number of bugs and
65 Update a few behavior that were problematic with the 8.0 as with many new major
70 Update a few behavior that were problematic with the 8.0 as with many new major
66 release.
71 release.
67
72
68 Note that beyond the changes listed here, IPython 8.1.0 also contains all the
73 Note that beyond the changes listed here, IPython 8.1.0 also contains all the
69 features listed in :ref:`version 7.32`.
74 features listed in :ref:`version 7.32`.
70
75
71 - Misc and multiple fixes around quotation auto-closing. It is now disabled by
76 - Misc and multiple fixes around quotation auto-closing. It is now disabled by
72 default. Run with ``TerminalInteractiveShell.auto_match=True`` to re-enabled
77 default. Run with ``TerminalInteractiveShell.auto_match=True`` to re-enabled
73 - Require pygments>=2.4.0 :ghpull:`13459`, this was implicit in the code, but
78 - Require pygments>=2.4.0 :ghpull:`13459`, this was implicit in the code, but
74 is now explicit in ``setup.cfg``/``setup.py``
79 is now explicit in ``setup.cfg``/``setup.py``
75 - Docs improvement of ``core.magic_arguments`` examples. :ghpull:`13433`
80 - Docs improvement of ``core.magic_arguments`` examples. :ghpull:`13433`
76 - Multi-line edit executes too early with await. :ghpull:`13424`
81 - Multi-line edit executes too early with await. :ghpull:`13424`
77
82
78 - ``black`` is back as an optional dependency, and autoformatting disabled by
83 - ``black`` is back as an optional dependency, and autoformatting disabled by
79 default until some fixes are implemented (black improperly reformat magics).
84 default until some fixes are implemented (black improperly reformat magics).
80 :ghpull:`13471` Additionally the ability to use ``yapf`` as a code
85 :ghpull:`13471` Additionally the ability to use ``yapf`` as a code
81 reformatter has been added :ghpull:`13528` . You can use
86 reformatter has been added :ghpull:`13528` . You can use
82 ``TerminalInteractiveShell.autoformatter="black"``,
87 ``TerminalInteractiveShell.autoformatter="black"``,
83 ``TerminalInteractiveShell.autoformatter="yapf"`` to re-enable auto formating
88 ``TerminalInteractiveShell.autoformatter="yapf"`` to re-enable auto formating
84 with black, or switch to yapf.
89 with black, or switch to yapf.
85
90
86 - Fix and issue where ``display`` was not defined.
91 - Fix and issue where ``display`` was not defined.
87
92
88 - Auto suggestions are now configurable. Currently only
93 - Auto suggestions are now configurable. Currently only
89 ``AutoSuggestFromHistory`` (default) and ``None``. new provider contribution
94 ``AutoSuggestFromHistory`` (default) and ``None``. new provider contribution
90 welcomed. :ghpull:`13475`
95 welcomed. :ghpull:`13475`
91
96
92 - multiple packaging/testing improvement to simplify downstream packaging
97 - multiple packaging/testing improvement to simplify downstream packaging
93 (xfail with reasons, try to not access network...).
98 (xfail with reasons, try to not access network...).
94
99
95 - Update deprecation. ``InteractiveShell.magic`` internal method has been
100 - Update deprecation. ``InteractiveShell.magic`` internal method has been
96 deprecated for many years but did not emit a warning until now.
101 deprecated for many years but did not emit a warning until now.
97
102
98 - internal ``appended_to_syspath`` context manager has been deprecated.
103 - internal ``appended_to_syspath`` context manager has been deprecated.
99
104
100 - fix an issue with symlinks in virtualenv :ghpull:`13537` (Reverted in 8.1.1)
105 - fix an issue with symlinks in virtualenv :ghpull:`13537` (Reverted in 8.1.1)
101
106
102 - Fix an issue with vim mode, where cursor would not be reset on exit :ghpull:`13472`
107 - Fix an issue with vim mode, where cursor would not be reset on exit :ghpull:`13472`
103
108
104 - ipython directive now remove only known pseudo-decorators :ghpull:`13532`
109 - ipython directive now remove only known pseudo-decorators :ghpull:`13532`
105
110
106 - ``IPython/lib/security`` which used to be used for jupyter notebook has been
111 - ``IPython/lib/security`` which used to be used for jupyter notebook has been
107 removed.
112 removed.
108
113
109 - Fix an issue where ``async with`` would execute on new lines. :ghpull:`13436`
114 - Fix an issue where ``async with`` would execute on new lines. :ghpull:`13436`
110
115
111
116
112 We want to remind users that IPython is part of the Jupyter organisations, and
117 We want to remind users that IPython is part of the Jupyter organisations, and
113 thus governed by a Code of Conduct. Some of the behavior we have seen on GitHub is not acceptable.
118 thus governed by a Code of Conduct. Some of the behavior we have seen on GitHub is not acceptable.
114 Abuse and non-respectful comments on discussion will not be tolerated.
119 Abuse and non-respectful comments on discussion will not be tolerated.
115
120
116 Many thanks to all the contributors to this release, many of the above fixed issue and
121 Many thanks to all the contributors to this release, many of the above fixed issue and
117 new features where done by first time contributors, showing there is still
122 new features where done by first time contributors, showing there is still
118 plenty of easy contribution possible in IPython
123 plenty of easy contribution possible in IPython
119 . You can find all individual contributions
124 . You can find all individual contributions
120 to this milestone `on github <https://github.com/ipython/ipython/milestone/91>`__.
125 to this milestone `on github <https://github.com/ipython/ipython/milestone/91>`__.
121
126
122 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
127 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
123 work on IPython and related libraries. In particular the Lazy autoloading of
128 work on IPython and related libraries. In particular the Lazy autoloading of
124 magics that you will find described in the 7.32 release notes.
129 magics that you will find described in the 7.32 release notes.
125
130
126
131
127 .. _version 8.0.1:
132 .. _version 8.0.1:
128
133
129 IPython 8.0.1 (CVE-2022-21699)
134 IPython 8.0.1 (CVE-2022-21699)
130 ------------------------------
135 ------------------------------
131
136
132 IPython 8.0.1, 7.31.1 and 5.11 are security releases that change some default
137 IPython 8.0.1, 7.31.1 and 5.11 are security releases that change some default
133 values in order to prevent potential Execution with Unnecessary Privileges.
138 values in order to prevent potential Execution with Unnecessary Privileges.
134
139
135 Almost all version of IPython looks for configuration and profiles in current
140 Almost all version of IPython looks for configuration and profiles in current
136 working directory. Since IPython was developed before pip and environments
141 working directory. Since IPython was developed before pip and environments
137 existed it was used a convenient way to load code/packages in a project
142 existed it was used a convenient way to load code/packages in a project
138 dependant way.
143 dependant way.
139
144
140 In 2022, it is not necessary anymore, and can lead to confusing behavior where
145 In 2022, it is not necessary anymore, and can lead to confusing behavior where
141 for example cloning a repository and starting IPython or loading a notebook from
146 for example cloning a repository and starting IPython or loading a notebook from
142 any Jupyter-Compatible interface that has ipython set as a kernel can lead to
147 any Jupyter-Compatible interface that has ipython set as a kernel can lead to
143 code execution.
148 code execution.
144
149
145
150
146 I did not find any standard way for packaged to advertise CVEs they fix, I'm
151 I did not find any standard way for packaged to advertise CVEs they fix, I'm
147 thus trying to add a ``__patched_cves__`` attribute to the IPython module that
152 thus trying to add a ``__patched_cves__`` attribute to the IPython module that
148 list the CVEs that should have been fixed. This attribute is informational only
153 list the CVEs that should have been fixed. This attribute is informational only
149 as if a executable has a flaw, this value can always be changed by an attacker.
154 as if a executable has a flaw, this value can always be changed by an attacker.
150
155
151 .. code::
156 .. code::
152
157
153 In [1]: import IPython
158 In [1]: import IPython
154
159
155 In [2]: IPython.__patched_cves__
160 In [2]: IPython.__patched_cves__
156 Out[2]: {'CVE-2022-21699'}
161 Out[2]: {'CVE-2022-21699'}
157
162
158 In [3]: 'CVE-2022-21699' in IPython.__patched_cves__
163 In [3]: 'CVE-2022-21699' in IPython.__patched_cves__
159 Out[3]: True
164 Out[3]: True
160
165
161 Thus starting with this version:
166 Thus starting with this version:
162
167
163 - The current working directory is not searched anymore for profiles or
168 - The current working directory is not searched anymore for profiles or
164 configurations files.
169 configurations files.
165 - Added a ``__patched_cves__`` attribute (set of strings) to IPython module that contain
170 - Added a ``__patched_cves__`` attribute (set of strings) to IPython module that contain
166 the list of fixed CVE. This is informational only.
171 the list of fixed CVE. This is informational only.
167
172
168 Further details can be read on the `GitHub Advisory <https://github.com/ipython/ipython/security/advisories/GHSA-pq7m-3gw7-gq5x>`__
173 Further details can be read on the `GitHub Advisory <https://github.com/ipython/ipython/security/advisories/GHSA-pq7m-3gw7-gq5x>`__
169
174
170
175
171 .. _version 8.0:
176 .. _version 8.0:
172
177
173 IPython 8.0
178 IPython 8.0
174 -----------
179 -----------
175
180
176 IPython 8.0 is bringing a large number of new features and improvements to both the
181 IPython 8.0 is bringing a large number of new features and improvements to both the
177 user of the terminal and of the kernel via Jupyter. The removal of compatibility
182 user of the terminal and of the kernel via Jupyter. The removal of compatibility
178 with older version of Python is also the opportunity to do a couple of
183 with older version of Python is also the opportunity to do a couple of
179 performance improvements in particular with respect to startup time.
184 performance improvements in particular with respect to startup time.
180 The 8.x branch started diverging from its predecessor around IPython 7.12
185 The 8.x branch started diverging from its predecessor around IPython 7.12
181 (January 2020).
186 (January 2020).
182
187
183 This release contains 250+ pull requests, in addition to many of the features
188 This release contains 250+ pull requests, in addition to many of the features
184 and backports that have made it to the 7.x branch. Please see the
189 and backports that have made it to the 7.x branch. Please see the
185 `8.0 milestone <https://github.com/ipython/ipython/milestone/73?closed=1>`__ for the full list of pull requests.
190 `8.0 milestone <https://github.com/ipython/ipython/milestone/73?closed=1>`__ for the full list of pull requests.
186
191
187 Please feel free to send pull requests to updates those notes after release,
192 Please feel free to send pull requests to updates those notes after release,
188 I have likely forgotten a few things reviewing 250+ PRs.
193 I have likely forgotten a few things reviewing 250+ PRs.
189
194
190 Dependencies changes/downstream packaging
195 Dependencies changes/downstream packaging
191 -----------------------------------------
196 -----------------------------------------
192
197
193 Most of our building steps have been changed to be (mostly) declarative
198 Most of our building steps have been changed to be (mostly) declarative
194 and follow PEP 517. We are trying to completely remove ``setup.py`` (:ghpull:`13238`) and are
199 and follow PEP 517. We are trying to completely remove ``setup.py`` (:ghpull:`13238`) and are
195 looking for help to do so.
200 looking for help to do so.
196
201
197 - minimum supported ``traitlets`` version is now 5+
202 - minimum supported ``traitlets`` version is now 5+
198 - we now require ``stack_data``
203 - we now require ``stack_data``
199 - minimal Python is now 3.8
204 - minimal Python is now 3.8
200 - ``nose`` is not a testing requirement anymore
205 - ``nose`` is not a testing requirement anymore
201 - ``pytest`` replaces nose.
206 - ``pytest`` replaces nose.
202 - ``iptest``/``iptest3`` cli entrypoints do not exists anymore.
207 - ``iptest``/``iptest3`` cli entrypoints do not exists anymore.
203 - minimum officially support ``numpy`` version has been bumped, but this should
208 - minimum officially support ``numpy`` version has been bumped, but this should
204 not have much effect on packaging.
209 not have much effect on packaging.
205
210
206
211
207 Deprecation and removal
212 Deprecation and removal
208 -----------------------
213 -----------------------
209
214
210 We removed almost all features, arguments, functions, and modules that were
215 We removed almost all features, arguments, functions, and modules that were
211 marked as deprecated between IPython 1.0 and 5.0. As a reminder, 5.0 was released
216 marked as deprecated between IPython 1.0 and 5.0. As a reminder, 5.0 was released
212 in 2016, and 1.0 in 2013. Last release of the 5 branch was 5.10.0, in May 2020.
217 in 2016, and 1.0 in 2013. Last release of the 5 branch was 5.10.0, in May 2020.
213 The few remaining deprecated features we left have better deprecation warnings
218 The few remaining deprecated features we left have better deprecation warnings
214 or have been turned into explicit errors for better error messages.
219 or have been turned into explicit errors for better error messages.
215
220
216 I will use this occasion to add the following requests to anyone emitting a
221 I will use this occasion to add the following requests to anyone emitting a
217 deprecation warning:
222 deprecation warning:
218
223
219 - Please add at least ``stacklevel=2`` so that the warning is emitted into the
224 - Please add at least ``stacklevel=2`` so that the warning is emitted into the
220 caller context, and not the callee one.
225 caller context, and not the callee one.
221 - Please add **since which version** something is deprecated.
226 - Please add **since which version** something is deprecated.
222
227
223 As a side note, it is much easier to conditionally compare version
228 As a side note, it is much easier to conditionally compare version
224 numbers rather than using ``try/except`` when functionality changes with a version.
229 numbers rather than using ``try/except`` when functionality changes with a version.
225
230
226 I won't list all the removed features here, but modules like ``IPython.kernel``,
231 I won't list all the removed features here, but modules like ``IPython.kernel``,
227 which was just a shim module around ``ipykernel`` for the past 8 years, have been
232 which was just a shim module around ``ipykernel`` for the past 8 years, have been
228 removed, and so many other similar things that pre-date the name **Jupyter**
233 removed, and so many other similar things that pre-date the name **Jupyter**
229 itself.
234 itself.
230
235
231 We no longer need to add ``IPython.extensions`` to the PYTHONPATH because that is being
236 We no longer need to add ``IPython.extensions`` to the PYTHONPATH because that is being
232 handled by ``load_extension``.
237 handled by ``load_extension``.
233
238
234 We are also removing ``Cythonmagic``, ``sympyprinting`` and ``rmagic`` as they are now in
239 We are also removing ``Cythonmagic``, ``sympyprinting`` and ``rmagic`` as they are now in
235 other packages and no longer need to be inside IPython.
240 other packages and no longer need to be inside IPython.
236
241
237
242
238 Documentation
243 Documentation
239 -------------
244 -------------
240
245
241 The majority of our docstrings have now been reformatted and automatically fixed by
246 The majority of our docstrings have now been reformatted and automatically fixed by
242 the experimental `Vélin <https://pypi.org/project/velin/>`_ project to conform
247 the experimental `Vélin <https://pypi.org/project/velin/>`_ project to conform
243 to numpydoc.
248 to numpydoc.
244
249
245 Type annotations
250 Type annotations
246 ----------------
251 ----------------
247
252
248 While IPython itself is highly dynamic and can't be completely typed, many of
253 While IPython itself is highly dynamic and can't be completely typed, many of
249 the functions now have type annotations, and part of the codebase is now checked
254 the functions now have type annotations, and part of the codebase is now checked
250 by mypy.
255 by mypy.
251
256
252
257
253 Featured changes
258 Featured changes
254 ----------------
259 ----------------
255
260
256 Here is a features list of changes in IPython 8.0. This is of course non-exhaustive.
261 Here is a features list of changes in IPython 8.0. This is of course non-exhaustive.
257 Please note as well that many features have been added in the 7.x branch as well
262 Please note as well that many features have been added in the 7.x branch as well
258 (and hence why you want to read the 7.x what's new notes), in particular
263 (and hence why you want to read the 7.x what's new notes), in particular
259 features contributed by QuantStack (with respect to debugger protocol and Xeus
264 features contributed by QuantStack (with respect to debugger protocol and Xeus
260 Python), as well as many debugger features that I was pleased to implement as
265 Python), as well as many debugger features that I was pleased to implement as
261 part of my work at QuanSight and sponsored by DE Shaw.
266 part of my work at QuanSight and sponsored by DE Shaw.
262
267
263 Traceback improvements
268 Traceback improvements
264 ~~~~~~~~~~~~~~~~~~~~~~
269 ~~~~~~~~~~~~~~~~~~~~~~
265
270
266 Previously, error tracebacks for errors happening in code cells were showing a
271 Previously, error tracebacks for errors happening in code cells were showing a
267 hash, the one used for compiling the Python AST::
272 hash, the one used for compiling the Python AST::
268
273
269 In [1]: def foo():
274 In [1]: def foo():
270 ...: return 3 / 0
275 ...: return 3 / 0
271 ...:
276 ...:
272
277
273 In [2]: foo()
278 In [2]: foo()
274 ---------------------------------------------------------------------------
279 ---------------------------------------------------------------------------
275 ZeroDivisionError Traceback (most recent call last)
280 ZeroDivisionError Traceback (most recent call last)
276 <ipython-input-2-c19b6d9633cf> in <module>
281 <ipython-input-2-c19b6d9633cf> in <module>
277 ----> 1 foo()
282 ----> 1 foo()
278
283
279 <ipython-input-1-1595a74c32d5> in foo()
284 <ipython-input-1-1595a74c32d5> in foo()
280 1 def foo():
285 1 def foo():
281 ----> 2 return 3 / 0
286 ----> 2 return 3 / 0
282 3
287 3
283
288
284 ZeroDivisionError: division by zero
289 ZeroDivisionError: division by zero
285
290
286 The error traceback is now correctly formatted, showing the cell number in which the error happened::
291 The error traceback is now correctly formatted, showing the cell number in which the error happened::
287
292
288 In [1]: def foo():
293 In [1]: def foo():
289 ...: return 3 / 0
294 ...: return 3 / 0
290 ...:
295 ...:
291
296
292 Input In [2]: foo()
297 Input In [2]: foo()
293 ---------------------------------------------------------------------------
298 ---------------------------------------------------------------------------
294 ZeroDivisionError Traceback (most recent call last)
299 ZeroDivisionError Traceback (most recent call last)
295 input In [2], in <module>
300 input In [2], in <module>
296 ----> 1 foo()
301 ----> 1 foo()
297
302
298 Input In [1], in foo()
303 Input In [1], in foo()
299 1 def foo():
304 1 def foo():
300 ----> 2 return 3 / 0
305 ----> 2 return 3 / 0
301
306
302 ZeroDivisionError: division by zero
307 ZeroDivisionError: division by zero
303
308
304 The ``stack_data`` package has been integrated, which provides smarter information in the traceback;
309 The ``stack_data`` package has been integrated, which provides smarter information in the traceback;
305 in particular it will highlight the AST node where an error occurs which can help to quickly narrow down errors.
310 in particular it will highlight the AST node where an error occurs which can help to quickly narrow down errors.
306
311
307 For example in the following snippet::
312 For example in the following snippet::
308
313
309 def foo(i):
314 def foo(i):
310 x = [[[0]]]
315 x = [[[0]]]
311 return x[0][i][0]
316 return x[0][i][0]
312
317
313
318
314 def bar():
319 def bar():
315 return foo(0) + foo(
320 return foo(0) + foo(
316 1
321 1
317 ) + foo(2)
322 ) + foo(2)
318
323
319
324
320 calling ``bar()`` would raise an ``IndexError`` on the return line of ``foo``,
325 calling ``bar()`` would raise an ``IndexError`` on the return line of ``foo``,
321 and IPython 8.0 is capable of telling you where the index error occurs::
326 and IPython 8.0 is capable of telling you where the index error occurs::
322
327
323
328
324 IndexError
329 IndexError
325 Input In [2], in <module>
330 Input In [2], in <module>
326 ----> 1 bar()
331 ----> 1 bar()
327 ^^^^^
332 ^^^^^
328
333
329 Input In [1], in bar()
334 Input In [1], in bar()
330 6 def bar():
335 6 def bar():
331 ----> 7 return foo(0) + foo(
336 ----> 7 return foo(0) + foo(
332 ^^^^
337 ^^^^
333 8 1
338 8 1
334 ^^^^^^^^
339 ^^^^^^^^
335 9 ) + foo(2)
340 9 ) + foo(2)
336 ^^^^
341 ^^^^
337
342
338 Input In [1], in foo(i)
343 Input In [1], in foo(i)
339 1 def foo(i):
344 1 def foo(i):
340 2 x = [[[0]]]
345 2 x = [[[0]]]
341 ----> 3 return x[0][i][0]
346 ----> 3 return x[0][i][0]
342 ^^^^^^^
347 ^^^^^^^
343
348
344 The corresponding locations marked here with ``^`` will show up highlighted in
349 The corresponding locations marked here with ``^`` will show up highlighted in
345 the terminal and notebooks.
350 the terminal and notebooks.
346
351
347 Finally, a colon ``::`` and line number is appended after a filename in
352 Finally, a colon ``::`` and line number is appended after a filename in
348 traceback::
353 traceback::
349
354
350
355
351 ZeroDivisionError Traceback (most recent call last)
356 ZeroDivisionError Traceback (most recent call last)
352 File ~/error.py:4, in <module>
357 File ~/error.py:4, in <module>
353 1 def f():
358 1 def f():
354 2 1/0
359 2 1/0
355 ----> 4 f()
360 ----> 4 f()
356
361
357 File ~/error.py:2, in f()
362 File ~/error.py:2, in f()
358 1 def f():
363 1 def f():
359 ----> 2 1/0
364 ----> 2 1/0
360
365
361 Many terminals and editors have integrations enabling you to directly jump to the
366 Many terminals and editors have integrations enabling you to directly jump to the
362 relevant file/line when this syntax is used, so this small addition may have a high
367 relevant file/line when this syntax is used, so this small addition may have a high
363 impact on productivity.
368 impact on productivity.
364
369
365
370
366 Autosuggestions
371 Autosuggestions
367 ~~~~~~~~~~~~~~~
372 ~~~~~~~~~~~~~~~
368
373
369 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>`__.
374 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>`__.
370
375
371 `Ptpython <https://github.com/prompt-toolkit/ptpython#ptpython>`__ allows users to enable this feature in
376 `Ptpython <https://github.com/prompt-toolkit/ptpython#ptpython>`__ allows users to enable this feature in
372 `ptpython/config.py <https://github.com/prompt-toolkit/ptpython/blob/master/examples/ptpython_config/config.py#L90>`__.
377 `ptpython/config.py <https://github.com/prompt-toolkit/ptpython/blob/master/examples/ptpython_config/config.py#L90>`__.
373
378
374 This feature allows users to accept autosuggestions with ctrl e, ctrl f,
379 This feature allows users to accept autosuggestions with ctrl e, ctrl f,
375 or right arrow as described below.
380 or right arrow as described below.
376
381
377 1. Start ipython
382 1. Start ipython
378
383
379 .. image:: ../_images/8.0/auto_suggest_1_prompt_no_text.png
384 .. image:: ../_images/8.0/auto_suggest_1_prompt_no_text.png
380
385
381 2. Run ``print("hello")``
386 2. Run ``print("hello")``
382
387
383 .. image:: ../_images/8.0/auto_suggest_2_print_hello_suggest.png
388 .. image:: ../_images/8.0/auto_suggest_2_print_hello_suggest.png
384
389
385 3. start typing ``print`` again to see the autosuggestion
390 3. start typing ``print`` again to see the autosuggestion
386
391
387 .. image:: ../_images/8.0/auto_suggest_3_print_hello_suggest.png
392 .. image:: ../_images/8.0/auto_suggest_3_print_hello_suggest.png
388
393
389 4. Press ``ctrl-f``, or ``ctrl-e``, or ``right-arrow`` to accept the suggestion
394 4. Press ``ctrl-f``, or ``ctrl-e``, or ``right-arrow`` to accept the suggestion
390
395
391 .. image:: ../_images/8.0/auto_suggest_4_print_hello.png
396 .. image:: ../_images/8.0/auto_suggest_4_print_hello.png
392
397
393 You can also complete word by word:
398 You can also complete word by word:
394
399
395 1. Run ``def say_hello(): print("hello")``
400 1. Run ``def say_hello(): print("hello")``
396
401
397 .. image:: ../_images/8.0/auto_suggest_second_prompt.png
402 .. image:: ../_images/8.0/auto_suggest_second_prompt.png
398
403
399 2. Start typing the first letter if ``def`` to see the autosuggestion
404 2. Start typing the first letter if ``def`` to see the autosuggestion
400
405
401 .. image:: ../_images/8.0/auto_suggest_d_phantom.png
406 .. image:: ../_images/8.0/auto_suggest_d_phantom.png
402
407
403 3. Press ``alt-f`` (or ``escape`` followed by ``f``), to accept the first word of the suggestion
408 3. Press ``alt-f`` (or ``escape`` followed by ``f``), to accept the first word of the suggestion
404
409
405 .. image:: ../_images/8.0/auto_suggest_def_phantom.png
410 .. image:: ../_images/8.0/auto_suggest_def_phantom.png
406
411
407 Importantly, this feature does not interfere with tab completion:
412 Importantly, this feature does not interfere with tab completion:
408
413
409 1. After running ``def say_hello(): print("hello")``, press d
414 1. After running ``def say_hello(): print("hello")``, press d
410
415
411 .. image:: ../_images/8.0/auto_suggest_d_phantom.png
416 .. image:: ../_images/8.0/auto_suggest_d_phantom.png
412
417
413 2. Press Tab to start tab completion
418 2. Press Tab to start tab completion
414
419
415 .. image:: ../_images/8.0/auto_suggest_d_completions.png
420 .. image:: ../_images/8.0/auto_suggest_d_completions.png
416
421
417 3A. Press Tab again to select the first option
422 3A. Press Tab again to select the first option
418
423
419 .. image:: ../_images/8.0/auto_suggest_def_completions.png
424 .. image:: ../_images/8.0/auto_suggest_def_completions.png
420
425
421 3B. Press ``alt f`` (``escape``, ``f``) to accept to accept the first word of the suggestion
426 3B. Press ``alt f`` (``escape``, ``f``) to accept to accept the first word of the suggestion
422
427
423 .. image:: ../_images/8.0/auto_suggest_def_phantom.png
428 .. image:: ../_images/8.0/auto_suggest_def_phantom.png
424
429
425 3C. Press ``ctrl-f`` or ``ctrl-e`` to accept the entire suggestion
430 3C. Press ``ctrl-f`` or ``ctrl-e`` to accept the entire suggestion
426
431
427 .. image:: ../_images/8.0/auto_suggest_match_parens.png
432 .. image:: ../_images/8.0/auto_suggest_match_parens.png
428
433
429
434
430 Currently, autosuggestions are only shown in the emacs or vi insert editing modes:
435 Currently, autosuggestions are only shown in the emacs or vi insert editing modes:
431
436
432 - The ctrl e, ctrl f, and alt f shortcuts work by default in emacs mode.
437 - The ctrl e, ctrl f, and alt f shortcuts work by default in emacs mode.
433 - 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/>`__.
438 - 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/>`__.
434
439
435
440
436 Show pinfo information in ipdb using "?" and "??"
441 Show pinfo information in ipdb using "?" and "??"
437 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
442 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
438
443
439 In IPDB, it is now possible to show the information about an object using "?"
444 In IPDB, it is now possible to show the information about an object using "?"
440 and "??", in much the same way that it can be done when using the IPython prompt::
445 and "??", in much the same way that it can be done when using the IPython prompt::
441
446
442 ipdb> partial?
447 ipdb> partial?
443 Init signature: partial(self, /, *args, **kwargs)
448 Init signature: partial(self, /, *args, **kwargs)
444 Docstring:
449 Docstring:
445 partial(func, *args, **keywords) - new function with partial application
450 partial(func, *args, **keywords) - new function with partial application
446 of the given arguments and keywords.
451 of the given arguments and keywords.
447 File: ~/.pyenv/versions/3.8.6/lib/python3.8/functools.py
452 File: ~/.pyenv/versions/3.8.6/lib/python3.8/functools.py
448 Type: type
453 Type: type
449 Subclasses:
454 Subclasses:
450
455
451 Previously, ``pinfo`` or ``pinfo2`` command had to be used for this purpose.
456 Previously, ``pinfo`` or ``pinfo2`` command had to be used for this purpose.
452
457
453
458
454 Autoreload 3 feature
459 Autoreload 3 feature
455 ~~~~~~~~~~~~~~~~~~~~
460 ~~~~~~~~~~~~~~~~~~~~
456
461
457 Example: When an IPython session is run with the 'autoreload' extension loaded,
462 Example: When an IPython session is run with the 'autoreload' extension loaded,
458 you will now have the option '3' to select, which means the following:
463 you will now have the option '3' to select, which means the following:
459
464
460 1. replicate all functionality from option 2
465 1. replicate all functionality from option 2
461 2. autoload all new funcs/classes/enums/globals from the module when they are added
466 2. autoload all new funcs/classes/enums/globals from the module when they are added
462 3. autoload all newly imported funcs/classes/enums/globals from external modules
467 3. autoload all newly imported funcs/classes/enums/globals from external modules
463
468
464 Try ``%autoreload 3`` in an IPython session after running ``%load_ext autoreload``.
469 Try ``%autoreload 3`` in an IPython session after running ``%load_ext autoreload``.
465
470
466 For more information please see the following unit test : ``extensions/tests/test_autoreload.py:test_autoload_newly_added_objects``
471 For more information please see the following unit test : ``extensions/tests/test_autoreload.py:test_autoload_newly_added_objects``
467
472
468 Auto formatting with black in the CLI
473 Auto formatting with black in the CLI
469 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
474 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
470
475
471 This feature was present in 7.x, but disabled by default.
476 This feature was present in 7.x, but disabled by default.
472
477
473 In 8.0, input was automatically reformatted with Black when black was installed.
478 In 8.0, input was automatically reformatted with Black when black was installed.
474 This feature has been reverted for the time being.
479 This feature has been reverted for the time being.
475 You can re-enable it by setting ``TerminalInteractiveShell.autoformatter`` to ``"black"``
480 You can re-enable it by setting ``TerminalInteractiveShell.autoformatter`` to ``"black"``
476
481
477 History Range Glob feature
482 History Range Glob feature
478 ~~~~~~~~~~~~~~~~~~~~~~~~~~
483 ~~~~~~~~~~~~~~~~~~~~~~~~~~
479
484
480 Previously, when using ``%history``, users could specify either
485 Previously, when using ``%history``, users could specify either
481 a range of sessions and lines, for example:
486 a range of sessions and lines, for example:
482
487
483 .. code-block:: python
488 .. code-block:: python
484
489
485 ~8/1-~6/5 # see history from the first line of 8 sessions ago,
490 ~8/1-~6/5 # see history from the first line of 8 sessions ago,
486 # to the fifth line of 6 sessions ago.``
491 # to the fifth line of 6 sessions ago.``
487
492
488 Or users could specify a glob pattern:
493 Or users could specify a glob pattern:
489
494
490 .. code-block:: python
495 .. code-block:: python
491
496
492 -g <pattern> # glob ALL history for the specified pattern.
497 -g <pattern> # glob ALL history for the specified pattern.
493
498
494 However users could *not* specify both.
499 However users could *not* specify both.
495
500
496 If a user *did* specify both a range and a glob pattern,
501 If a user *did* specify both a range and a glob pattern,
497 then the glob pattern would be used (globbing *all* history) *and the range would be ignored*.
502 then the glob pattern would be used (globbing *all* history) *and the range would be ignored*.
498
503
499 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.
504 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.
500
505
501 Don't start a multi-line cell with sunken parenthesis
506 Don't start a multi-line cell with sunken parenthesis
502 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
507 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
503
508
504 From now on, IPython will not ask for the next line of input when given a single
509 From now on, IPython will not ask for the next line of input when given a single
505 line with more closing than opening brackets. For example, this means that if
510 line with more closing than opening brackets. For example, this means that if
506 you (mis)type ``]]`` instead of ``[]``, a ``SyntaxError`` will show up, instead of
511 you (mis)type ``]]`` instead of ``[]``, a ``SyntaxError`` will show up, instead of
507 the ``...:`` prompt continuation.
512 the ``...:`` prompt continuation.
508
513
509 IPython shell for ipdb interact
514 IPython shell for ipdb interact
510 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
515 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
511
516
512 The ipdb ``interact`` starts an IPython shell instead of Python's built-in ``code.interact()``.
517 The ipdb ``interact`` starts an IPython shell instead of Python's built-in ``code.interact()``.
513
518
514 Automatic Vi prompt stripping
519 Automatic Vi prompt stripping
515 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
520 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
516
521
517 When pasting code into IPython, it will strip the leading prompt characters if
522 When pasting code into IPython, it will strip the leading prompt characters if
518 there are any. For example, you can paste the following code into the console -
523 there are any. For example, you can paste the following code into the console -
519 it will still work, even though each line is prefixed with prompts (``In``,
524 it will still work, even though each line is prefixed with prompts (``In``,
520 ``Out``)::
525 ``Out``)::
521
526
522 In [1]: 2 * 2 == 4
527 In [1]: 2 * 2 == 4
523 Out[1]: True
528 Out[1]: True
524
529
525 In [2]: print("This still works as pasted")
530 In [2]: print("This still works as pasted")
526
531
527
532
528 Previously, this was not the case for the Vi-mode prompts::
533 Previously, this was not the case for the Vi-mode prompts::
529
534
530 In [1]: [ins] In [13]: 2 * 2 == 4
535 In [1]: [ins] In [13]: 2 * 2 == 4
531 ...: Out[13]: True
536 ...: Out[13]: True
532 ...:
537 ...:
533 File "<ipython-input-1-727bb88eaf33>", line 1
538 File "<ipython-input-1-727bb88eaf33>", line 1
534 [ins] In [13]: 2 * 2 == 4
539 [ins] In [13]: 2 * 2 == 4
535 ^
540 ^
536 SyntaxError: invalid syntax
541 SyntaxError: invalid syntax
537
542
538 This is now fixed, and Vi prompt prefixes - ``[ins]`` and ``[nav]`` - are
543 This is now fixed, and Vi prompt prefixes - ``[ins]`` and ``[nav]`` - are
539 skipped just as the normal ``In`` would be.
544 skipped just as the normal ``In`` would be.
540
545
541 IPython shell can be started in the Vi mode using ``ipython --TerminalInteractiveShell.editing_mode=vi``,
546 IPython shell can be started in the Vi mode using ``ipython --TerminalInteractiveShell.editing_mode=vi``,
542 You should be able to change mode dynamically with ``%config TerminalInteractiveShell.editing_mode='vi'``
547 You should be able to change mode dynamically with ``%config TerminalInteractiveShell.editing_mode='vi'``
543
548
544 Empty History Ranges
549 Empty History Ranges
545 ~~~~~~~~~~~~~~~~~~~~
550 ~~~~~~~~~~~~~~~~~~~~
546
551
547 A number of magics that take history ranges can now be used with an empty
552 A number of magics that take history ranges can now be used with an empty
548 range. These magics are:
553 range. These magics are:
549
554
550 * ``%save``
555 * ``%save``
551 * ``%load``
556 * ``%load``
552 * ``%pastebin``
557 * ``%pastebin``
553 * ``%pycat``
558 * ``%pycat``
554
559
555 Using them this way will make them take the history of the current session up
560 Using them this way will make them take the history of the current session up
556 to the point of the magic call (such that the magic itself will not be
561 to the point of the magic call (such that the magic itself will not be
557 included).
562 included).
558
563
559 Therefore it is now possible to save the whole history to a file using
564 Therefore it is now possible to save the whole history to a file using
560 ``%save <filename>``, load and edit it using ``%load`` (makes for a nice usage
565 ``%save <filename>``, load and edit it using ``%load`` (makes for a nice usage
561 when followed with :kbd:`F2`), send it to `dpaste.org <http://dpast.org>`_ using
566 when followed with :kbd:`F2`), send it to `dpaste.org <http://dpast.org>`_ using
562 ``%pastebin``, or view the whole thing syntax-highlighted with a single
567 ``%pastebin``, or view the whole thing syntax-highlighted with a single
563 ``%pycat``.
568 ``%pycat``.
564
569
565
570
566 Windows timing implementation: Switch to process_time
571 Windows timing implementation: Switch to process_time
567 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
572 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
568 Timing on Windows, for example with ``%%time``, was changed from being based on ``time.perf_counter``
573 Timing on Windows, for example with ``%%time``, was changed from being based on ``time.perf_counter``
569 (which counted time even when the process was sleeping) to being based on ``time.process_time`` instead
574 (which counted time even when the process was sleeping) to being based on ``time.process_time`` instead
570 (which only counts CPU time). This brings it closer to the behavior on Linux. See :ghpull:`12984`.
575 (which only counts CPU time). This brings it closer to the behavior on Linux. See :ghpull:`12984`.
571
576
572 Miscellaneous
577 Miscellaneous
573 ~~~~~~~~~~~~~
578 ~~~~~~~~~~~~~
574 - Non-text formatters are not disabled in the terminal, which should simplify
579 - Non-text formatters are not disabled in the terminal, which should simplify
575 writing extensions displaying images or other mimetypes in supporting terminals.
580 writing extensions displaying images or other mimetypes in supporting terminals.
576 :ghpull:`12315`
581 :ghpull:`12315`
577 - It is now possible to automatically insert matching brackets in Terminal IPython using the
582 - It is now possible to automatically insert matching brackets in Terminal IPython using the
578 ``TerminalInteractiveShell.auto_match=True`` option. :ghpull:`12586`
583 ``TerminalInteractiveShell.auto_match=True`` option. :ghpull:`12586`
579 - We are thinking of deprecating the current ``%%javascript`` magic in favor of a better replacement. See :ghpull:`13376`.
584 - We are thinking of deprecating the current ``%%javascript`` magic in favor of a better replacement. See :ghpull:`13376`.
580 - ``~`` is now expanded when part of a path in most magics :ghpull:`13385`
585 - ``~`` is now expanded when part of a path in most magics :ghpull:`13385`
581 - ``%/%%timeit`` magic now adds a comma every thousands to make reading a long number easier :ghpull:`13379`
586 - ``%/%%timeit`` magic now adds a comma every thousands to make reading a long number easier :ghpull:`13379`
582 - ``"info"`` messages can now be customised to hide some fields :ghpull:`13343`
587 - ``"info"`` messages can now be customised to hide some fields :ghpull:`13343`
583 - ``collections.UserList`` now pretty-prints :ghpull:`13320`
588 - ``collections.UserList`` now pretty-prints :ghpull:`13320`
584 - The debugger now has a persistent history, which should make it less
589 - The debugger now has a persistent history, which should make it less
585 annoying to retype commands :ghpull:`13246`
590 annoying to retype commands :ghpull:`13246`
586 - ``!pip`` ``!conda`` ``!cd`` or ``!ls`` are likely doing the wrong thing. We
591 - ``!pip`` ``!conda`` ``!cd`` or ``!ls`` are likely doing the wrong thing. We
587 now warn users if they use one of those commands. :ghpull:`12954`
592 now warn users if they use one of those commands. :ghpull:`12954`
588 - Make ``%precision`` work for ``numpy.float64`` type :ghpull:`12902`
593 - Make ``%precision`` work for ``numpy.float64`` type :ghpull:`12902`
589
594
590 Re-added support for XDG config directories
595 Re-added support for XDG config directories
591 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
596 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
592
597
593 XDG support through the years comes and goes. There is a tension between having
598 XDG support through the years comes and goes. There is a tension between having
594 an identical location for configuration in all platforms versus having simple instructions.
599 an identical location for configuration in all platforms versus having simple instructions.
595 After initial failures a couple of years ago, IPython was modified to automatically migrate XDG
600 After initial failures a couple of years ago, IPython was modified to automatically migrate XDG
596 config files back into ``~/.ipython``. That migration code has now been removed.
601 config files back into ``~/.ipython``. That migration code has now been removed.
597 IPython now checks the XDG locations, so if you _manually_ move your config
602 IPython now checks the XDG locations, so if you _manually_ move your config
598 files to your preferred location, IPython will not move them back.
603 files to your preferred location, IPython will not move them back.
599
604
600
605
601 Preparing for Python 3.10
606 Preparing for Python 3.10
602 -------------------------
607 -------------------------
603
608
604 To prepare for Python 3.10, we have started working on removing reliance and
609 To prepare for Python 3.10, we have started working on removing reliance and
605 any dependency that is not compatible with Python 3.10. This includes migrating our
610 any dependency that is not compatible with Python 3.10. This includes migrating our
606 test suite to pytest and starting to remove nose. This also means that the
611 test suite to pytest and starting to remove nose. This also means that the
607 ``iptest`` command is now gone and all testing is via pytest.
612 ``iptest`` command is now gone and all testing is via pytest.
608
613
609 This was in large part thanks to the NumFOCUS Small Developer grant, which enabled us to
614 This was in large part thanks to the NumFOCUS Small Developer grant, which enabled us to
610 allocate \$4000 to hire `Nikita Kniazev (@Kojoley) <https://github.com/Kojoley>`_,
615 allocate \$4000 to hire `Nikita Kniazev (@Kojoley) <https://github.com/Kojoley>`_,
611 who did a fantastic job at updating our code base, migrating to pytest, pushing
616 who did a fantastic job at updating our code base, migrating to pytest, pushing
612 our coverage, and fixing a large number of bugs. I highly recommend contacting
617 our coverage, and fixing a large number of bugs. I highly recommend contacting
613 them if you need help with C++ and Python projects.
618 them if you need help with C++ and Python projects.
614
619
615 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+>`__
620 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+>`__
616
621
617 Removing support for older Python versions
622 Removing support for older Python versions
618 ------------------------------------------
623 ------------------------------------------
619
624
620
625
621 We are removing support for Python up through 3.7, allowing internal code to use the more
626 We are removing support for Python up through 3.7, allowing internal code to use the more
622 efficient ``pathlib`` and to make better use of type annotations.
627 efficient ``pathlib`` and to make better use of type annotations.
623
628
624 .. image:: ../_images/8.0/pathlib_pathlib_everywhere.jpg
629 .. image:: ../_images/8.0/pathlib_pathlib_everywhere.jpg
625 :alt: "Meme image of Toy Story with Woody and Buzz, with the text 'pathlib, pathlib everywhere'"
630 :alt: "Meme image of Toy Story with Woody and Buzz, with the text 'pathlib, pathlib everywhere'"
626
631
627
632
628 We had about 34 PRs only to update some logic to update some functions from managing strings to
633 We had about 34 PRs only to update some logic to update some functions from managing strings to
629 using Pathlib.
634 using Pathlib.
630
635
631 The completer has also seen significant updates and now makes use of newer Jedi APIs,
636 The completer has also seen significant updates and now makes use of newer Jedi APIs,
632 offering faster and more reliable tab completion.
637 offering faster and more reliable tab completion.
633
638
634 Misc Statistics
639 Misc Statistics
635 ---------------
640 ---------------
636
641
637 Here are some numbers::
642 Here are some numbers::
638
643
639 7.x: 296 files, 12561 blank lines, 20282 comments, 35142 line of code.
644 7.x: 296 files, 12561 blank lines, 20282 comments, 35142 line of code.
640 8.0: 252 files, 12053 blank lines, 19232 comments, 34505 line of code.
645 8.0: 252 files, 12053 blank lines, 19232 comments, 34505 line of code.
641
646
642 $ git diff --stat 7.x...master | tail -1
647 $ git diff --stat 7.x...master | tail -1
643 340 files changed, 13399 insertions(+), 12421 deletions(-)
648 340 files changed, 13399 insertions(+), 12421 deletions(-)
644
649
645 We have commits from 162 authors, who contributed 1916 commits in 23 month, excluding merges (to not bias toward
650 We have commits from 162 authors, who contributed 1916 commits in 23 month, excluding merges (to not bias toward
646 maintainers pushing buttons).::
651 maintainers pushing buttons).::
647
652
648 $ git shortlog -s --no-merges 7.x...master | sort -nr
653 $ git shortlog -s --no-merges 7.x...master | sort -nr
649 535 Matthias Bussonnier
654 535 Matthias Bussonnier
650 86 Nikita Kniazev
655 86 Nikita Kniazev
651 69 Blazej Michalik
656 69 Blazej Michalik
652 49 Samuel Gaist
657 49 Samuel Gaist
653 27 Itamar Turner-Trauring
658 27 Itamar Turner-Trauring
654 18 Spas Kalaydzhisyki
659 18 Spas Kalaydzhisyki
655 17 Thomas Kluyver
660 17 Thomas Kluyver
656 17 Quentin Peter
661 17 Quentin Peter
657 17 James Morris
662 17 James Morris
658 17 Artur Svistunov
663 17 Artur Svistunov
659 15 Bart Skowron
664 15 Bart Skowron
660 14 Alex Hall
665 14 Alex Hall
661 13 rushabh-v
666 13 rushabh-v
662 13 Terry Davis
667 13 Terry Davis
663 13 Benjamin Ragan-Kelley
668 13 Benjamin Ragan-Kelley
664 8 martinRenou
669 8 martinRenou
665 8 farisachugthai
670 8 farisachugthai
666 7 dswij
671 7 dswij
667 7 Gal B
672 7 Gal B
668 7 Corentin Cadiou
673 7 Corentin Cadiou
669 6 yuji96
674 6 yuji96
670 6 Martin Skarzynski
675 6 Martin Skarzynski
671 6 Justin Palmer
676 6 Justin Palmer
672 6 Daniel Goldfarb
677 6 Daniel Goldfarb
673 6 Ben Greiner
678 6 Ben Greiner
674 5 Sammy Al Hashemi
679 5 Sammy Al Hashemi