##// END OF EJS Templates
Backport PR #13551: whatsnew 7.32
Matthias Bussonnier -
Show More
@@ -1,1765 +1,1784 b''
1 ============
1 ============
2 7.x Series
2 7.x Series
3 ============
3 ============
4
4
5 .. _version 7.31.1:
5 .. _version 7.31.1:
6
6
7 IPython 7.31.1 (CVE-2022-21699)
7 IPython 7.31.1 (CVE-2022-21699)
8 ===============================
8 ===============================
9
9
10 Fixed CVE-2022-21699, see IPython 8.0.1 release notes for informations.
10 Fixed CVE-2022-21699, see IPython 8.0.1 release notes for informations.
11
11
12
12
13 .. _version 7.32:
13 .. _version 7.32:
14
14
15 IPython 7.32
15 IPython 7.32
16 ============
16 ============
17
17
18
18
19
20 Autoload magic lazily
21 ---------------------
22
19 The ability to configure magics to be lazily loaded has been added to IPython.
23 The ability to configure magics to be lazily loaded has been added to IPython.
20 See the ``ipython --help-all`` section on ``MagicsManager.lazy_magic``.
24 See the ``ipython --help-all`` section on ``MagicsManager.lazy_magic``.
21 One can now use::
25 One can now use::
22
26
23 c.MagicsManger.lazy_magics = {
27 c.MagicsManger.lazy_magics = {
24 "my_magic": "slow.to.import",
28 "my_magic": "slow.to.import",
25 "my_other_magic": "also.slow",
29 "my_other_magic": "also.slow",
26 }
30 }
27
31
28 And on first use of ``%my_magic``, or corresponding cell magic, or other line magic,
32 And on first use of ``%my_magic``, or corresponding cell magic, or other line magic,
29 the corresponding ``load_ext`` will be called just before trying to invoke the magic.
33 the corresponding ``load_ext`` will be called just before trying to invoke the magic.
30
34
35 Misc
36 ----
37
38 - Update sphinxify for Docrepr 0.2.0 :ghpull:`13503`.
39 - Set co_name for cells run line by line (to fix debugging with Python 3.10)
40 :ghpull:`13535`
41
42
43 Many thanks to all the contributors to this release. You can find all individual
44 contributions to this milestone `on github
45 <https://github.com/ipython/ipython/milestone/99>`__.
46
47 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
48 work on IPython and related libraries.
49
31 .. _version 7.31:
50 .. _version 7.31:
32
51
33 IPython 7.31
52 IPython 7.31
34 ============
53 ============
35
54
36 IPython 7.31 brings a couple of backports and fixes from the 8.0 branches,
55 IPython 7.31 brings a couple of backports and fixes from the 8.0 branches,
37 it is likely one of the last releases of the 7.x series, as 8.0 will probably be released
56 it is likely one of the last releases of the 7.x series, as 8.0 will probably be released
38 between this release and what would have been 7.32.
57 between this release and what would have been 7.32.
39
58
40 Please test 8.0 beta/rc releases in addition to this release.
59 Please test 8.0 beta/rc releases in addition to this release.
41
60
42 This Releases:
61 This Releases:
43 - Backport some fixes for Python 3.10 (:ghpull:`13412`)
62 - Backport some fixes for Python 3.10 (:ghpull:`13412`)
44 - use full-alpha transparency on dvipng rendered LaTeX (:ghpull:`13372`)
63 - use full-alpha transparency on dvipng rendered LaTeX (:ghpull:`13372`)
45
64
46 Many thanks to all the contributors to this release. You can find all individual
65 Many thanks to all the contributors to this release. You can find all individual
47 contributions to this milestone `on github
66 contributions to this milestone `on github
48 <https://github.com/ipython/ipython/milestone/95>`__.
67 <https://github.com/ipython/ipython/milestone/95>`__.
49
68
50 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
69 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
51 work on IPython and related libraries.
70 work on IPython and related libraries.
52
71
53
72
54 .. _version 7.30:
73 .. _version 7.30:
55
74
56 IPython 7.30
75 IPython 7.30
57 ============
76 ============
58
77
59 IPython 7.30 fixes a couple of bugs introduce in previous releases (in
78 IPython 7.30 fixes a couple of bugs introduce in previous releases (in
60 particular with respect to path handling), and introduce a few features and
79 particular with respect to path handling), and introduce a few features and
61 improvements:
80 improvements:
62
81
63 Notably we will highlight :ghpull:`13267` "Document that ``%run`` can execute
82 Notably we will highlight :ghpull:`13267` "Document that ``%run`` can execute
64 notebooks and ipy scripts.", which is the first commit of Fernando PΓ©rez since
83 notebooks and ipy scripts.", which is the first commit of Fernando PΓ©rez since
65 mid 2016 (IPython 5.1). If you are new to IPython, Fernando created IPython in
84 mid 2016 (IPython 5.1). If you are new to IPython, Fernando created IPython in
66 2001. The other most recent contribution of Fernando to IPython itself was
85 2001. The other most recent contribution of Fernando to IPython itself was
67 May 2018, by reviewing and merging PRs. I want to note that Fernando is still
86 May 2018, by reviewing and merging PRs. I want to note that Fernando is still
68 active but mostly as a mentor and leader of the whole Jupyter organisation, but
87 active but mostly as a mentor and leader of the whole Jupyter organisation, but
69 we're still happy to see him contribute code !
88 we're still happy to see him contribute code !
70
89
71 :ghpull:`13290` "Use sphinxify (if available) in object_inspect_mime path"
90 :ghpull:`13290` "Use sphinxify (if available) in object_inspect_mime path"
72 should allow richer Repr of docstrings when using jupyterlab inspector.
91 should allow richer Repr of docstrings when using jupyterlab inspector.
73
92
74 :ghpull:`13311` make the debugger use ``ThreadPoolExecutor`` for debugger cmdloop.
93 :ghpull:`13311` make the debugger use ``ThreadPoolExecutor`` for debugger cmdloop.
75 This should fix some issues/infinite loop, but let us know if you come across
94 This should fix some issues/infinite loop, but let us know if you come across
76 any regressions. In particular this fixes issues with `kmaork/madbg <https://github.com/kmaork/madbg>`_,
95 any regressions. In particular this fixes issues with `kmaork/madbg <https://github.com/kmaork/madbg>`_,
77 a remote debugger for IPython.
96 a remote debugger for IPython.
78
97
79 Note that this is likely the ante-penultimate release of IPython 7.x as a stable
98 Note that this is likely the ante-penultimate release of IPython 7.x as a stable
80 branch, as I hope to release IPython 8.0 as well as IPython 7.31 next
99 branch, as I hope to release IPython 8.0 as well as IPython 7.31 next
81 month/early 2022.
100 month/early 2022.
82
101
83 IPython 8.0 will drop support for Python 3.7, removed nose as a dependency, and
102 IPython 8.0 will drop support for Python 3.7, removed nose as a dependency, and
84 7.x will only get critical bug fixes with 8.x becoming the new stable. This will
103 7.x will only get critical bug fixes with 8.x becoming the new stable. This will
85 not be possible without `NumFOCUS Small Development Grants
104 not be possible without `NumFOCUS Small Development Grants
86 <https://numfocus.org/programs/small-development-grants>`_ Which allowed us to
105 <https://numfocus.org/programs/small-development-grants>`_ Which allowed us to
87 hire `Nikita Kniazev <https://github.com/Kojoley>`_ who provide Python and C++
106 hire `Nikita Kniazev <https://github.com/Kojoley>`_ who provide Python and C++
88 help and contracting work.
107 help and contracting work.
89
108
90
109
91 Many thanks to all the contributors to this release. You can find all individual
110 Many thanks to all the contributors to this release. You can find all individual
92 contributions to this milestone `on github
111 contributions to this milestone `on github
93 <https://github.com/ipython/ipython/milestone/94?closed=1>`__.
112 <https://github.com/ipython/ipython/milestone/94?closed=1>`__.
94
113
95 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
114 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
96 work on IPython and related libraries.
115 work on IPython and related libraries.
97
116
98
117
99 .. _version 7.29:
118 .. _version 7.29:
100
119
101 IPython 7.29
120 IPython 7.29
102 ============
121 ============
103
122
104
123
105 IPython 7.29 brings a couple of new functionalities to IPython and a number of bugfixes.
124 IPython 7.29 brings a couple of new functionalities to IPython and a number of bugfixes.
106 It is one of the largest recent release, relatively speaking, with close to 15 Pull Requests.
125 It is one of the largest recent release, relatively speaking, with close to 15 Pull Requests.
107
126
108
127
109 - fix an issue where base64 was returned instead of bytes when showing figures :ghpull:`13162`
128 - fix an issue where base64 was returned instead of bytes when showing figures :ghpull:`13162`
110 - fix compatibility with PyQt6, PySide 6 :ghpull:`13172`. This may be of
129 - fix compatibility with PyQt6, PySide 6 :ghpull:`13172`. This may be of
111 interest if you are running on Apple Silicon as only qt6.2+ is natively
130 interest if you are running on Apple Silicon as only qt6.2+ is natively
112 compatible.
131 compatible.
113 - fix matplotlib qtagg eventloop :ghpull:`13179`
132 - fix matplotlib qtagg eventloop :ghpull:`13179`
114 - Multiple docs fixes, typos, ... etc.
133 - Multiple docs fixes, typos, ... etc.
115 - Debugger will now exit by default on SigInt :ghpull:`13218`, this will be
134 - Debugger will now exit by default on SigInt :ghpull:`13218`, this will be
116 useful in notebook/lab if you forgot to exit the debugger. "Interrupt Kernel"
135 useful in notebook/lab if you forgot to exit the debugger. "Interrupt Kernel"
117 will now exist the debugger.
136 will now exist the debugger.
118
137
119 It give Pdb the ability to skip code in decorators. If functions contain a
138 It give Pdb the ability to skip code in decorators. If functions contain a
120 special value names ``__debuggerskip__ = True|False``, the function will not be
139 special value names ``__debuggerskip__ = True|False``, the function will not be
121 stepped into, and Pdb will step into lower frames only if the value is set to
140 stepped into, and Pdb will step into lower frames only if the value is set to
122 ``False``. The exact behavior is still likely to have corner cases and will be
141 ``False``. The exact behavior is still likely to have corner cases and will be
123 refined in subsequent releases. Feedback welcome. See the debugger module
142 refined in subsequent releases. Feedback welcome. See the debugger module
124 documentation for more info. Thanks to the `D. E. Shaw
143 documentation for more info. Thanks to the `D. E. Shaw
125 group <https://deshaw.com/>`__ for funding this feature.
144 group <https://deshaw.com/>`__ for funding this feature.
126
145
127 The main branch of IPython is receiving a number of changes as we received a
146 The main branch of IPython is receiving a number of changes as we received a
128 `NumFOCUS SDG <https://numfocus.org/programs/small-development-grants>`__
147 `NumFOCUS SDG <https://numfocus.org/programs/small-development-grants>`__
129 ($4800), to help us finish replacing ``nose`` by ``pytest``, and make IPython
148 ($4800), to help us finish replacing ``nose`` by ``pytest``, and make IPython
130 future proof with an 8.0 release.
149 future proof with an 8.0 release.
131
150
132
151
133 Many thanks to all the contributors to this release. You can find all individual
152 Many thanks to all the contributors to this release. You can find all individual
134 contributions to this milestone `on github
153 contributions to this milestone `on github
135 <https://github.com/ipython/ipython/milestone/93>`__.
154 <https://github.com/ipython/ipython/milestone/93>`__.
136
155
137 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
156 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
138 work on IPython and related libraries.
157 work on IPython and related libraries.
139
158
140
159
141 .. _version 7.28:
160 .. _version 7.28:
142
161
143 IPython 7.28
162 IPython 7.28
144 ============
163 ============
145
164
146
165
147 IPython 7.28 is again a minor release that mostly bring bugfixes, and couple of
166 IPython 7.28 is again a minor release that mostly bring bugfixes, and couple of
148 improvement. Many thanks to MrMino, who again did all the work this month, and
167 improvement. Many thanks to MrMino, who again did all the work this month, and
149 made a number of documentation improvements.
168 made a number of documentation improvements.
150
169
151 Here is a non-exhaustive list of changes,
170 Here is a non-exhaustive list of changes,
152
171
153 Fixes:
172 Fixes:
154
173
155 - async with doesn't allow newlines :ghpull:`13090`
174 - async with doesn't allow newlines :ghpull:`13090`
156 - Dynamically changing to vi mode via %config magic) :ghpull:`13091`
175 - Dynamically changing to vi mode via %config magic) :ghpull:`13091`
157
176
158 Virtualenv handling fixes:
177 Virtualenv handling fixes:
159
178
160 - init_virtualenv now uses Pathlib :ghpull:`12548`
179 - init_virtualenv now uses Pathlib :ghpull:`12548`
161 - Fix Improper path comparison of virtualenv directories :ghpull:`13140`
180 - Fix Improper path comparison of virtualenv directories :ghpull:`13140`
162 - Fix virtual environment user warning for lower case pathes :ghpull:`13094`
181 - Fix virtual environment user warning for lower case pathes :ghpull:`13094`
163 - Adapt to all sorts of drive names for cygwin :ghpull:`13153`
182 - Adapt to all sorts of drive names for cygwin :ghpull:`13153`
164
183
165 New Features:
184 New Features:
166
185
167 - enable autoplay in embed YouTube player :ghpull:`13133`
186 - enable autoplay in embed YouTube player :ghpull:`13133`
168
187
169 Documentation:
188 Documentation:
170
189
171 - Fix formatting for the core.interactiveshell documentation :ghpull:`13118`
190 - Fix formatting for the core.interactiveshell documentation :ghpull:`13118`
172 - Fix broken ipyparallel's refs :ghpull:`13138`
191 - Fix broken ipyparallel's refs :ghpull:`13138`
173 - Improve formatting of %time documentation :ghpull:`13125`
192 - Improve formatting of %time documentation :ghpull:`13125`
174 - Reword the YouTubeVideo autoplay WN :ghpull:`13147`
193 - Reword the YouTubeVideo autoplay WN :ghpull:`13147`
175
194
176
195
177 Highlighted features
196 Highlighted features
178 --------------------
197 --------------------
179
198
180
199
181 ``YouTubeVideo`` autoplay and the ability to add extra attributes to ``IFrame``
200 ``YouTubeVideo`` autoplay and the ability to add extra attributes to ``IFrame``
182 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
201 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
183
202
184 You can add any extra attributes to the ``<iframe>`` tag using the new
203 You can add any extra attributes to the ``<iframe>`` tag using the new
185 ``extras`` argument in the ``IFrame`` class. For example::
204 ``extras`` argument in the ``IFrame`` class. For example::
186
205
187 In [1]: from IPython.display import IFrame
206 In [1]: from IPython.display import IFrame
188
207
189 In [2]: IFrame(src="src", width=300, height=300, extras=['loading="eager"'])
208 In [2]: IFrame(src="src", width=300, height=300, extras=['loading="eager"'])
190
209
191 The above cells will result in the following HTML code being displayed in a
210 The above cells will result in the following HTML code being displayed in a
192 notebook::
211 notebook::
193
212
194 <iframe
213 <iframe
195 width="300"
214 width="300"
196 height="300"
215 height="300"
197 src="src"
216 src="src"
198 frameborder="0"
217 frameborder="0"
199 allowfullscreen
218 allowfullscreen
200 loading="eager"
219 loading="eager"
201 ></iframe>
220 ></iframe>
202
221
203 Related to the above, the ``YouTubeVideo`` class now takes an
222 Related to the above, the ``YouTubeVideo`` class now takes an
204 ``allow_autoplay`` flag, which sets up the iframe of the embedded YouTube video
223 ``allow_autoplay`` flag, which sets up the iframe of the embedded YouTube video
205 such that it allows autoplay.
224 such that it allows autoplay.
206
225
207 .. note::
226 .. note::
208 Whether this works depends on the autoplay policy of the browser rendering
227 Whether this works depends on the autoplay policy of the browser rendering
209 the HTML allowing it. It also could get blocked by some browser extensions.
228 the HTML allowing it. It also could get blocked by some browser extensions.
210
229
211 Try it out!
230 Try it out!
212 ::
231 ::
213
232
214 In [1]: from IPython.display import YouTubeVideo
233 In [1]: from IPython.display import YouTubeVideo
215
234
216 In [2]: YouTubeVideo("dQw4w9WgXcQ", allow_autoplay=True)
235 In [2]: YouTubeVideo("dQw4w9WgXcQ", allow_autoplay=True)
217
236
218
237
219
238
220 Thanks
239 Thanks
221 ------
240 ------
222
241
223 Many thanks to all the contributors to this release. You can find all individual
242 Many thanks to all the contributors to this release. You can find all individual
224 contributions to this milestone `on github
243 contributions to this milestone `on github
225 <https://github.com/ipython/ipython/milestone/92>`__.
244 <https://github.com/ipython/ipython/milestone/92>`__.
226
245
227 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
246 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
228 work on IPython and related libraries.
247 work on IPython and related libraries.
229
248
230
249
231 .. _version 7.27:
250 .. _version 7.27:
232
251
233 IPython 7.27
252 IPython 7.27
234 ============
253 ============
235
254
236 IPython 7.27 is a minor release that fixes a couple of issues and compatibility.
255 IPython 7.27 is a minor release that fixes a couple of issues and compatibility.
237
256
238 - Add support for GTK4 :ghpull:`131011`
257 - Add support for GTK4 :ghpull:`131011`
239 - Add support for Qt6 :ghpull:`13085`
258 - Add support for Qt6 :ghpull:`13085`
240 - Fix an issue with pip magic on windows :ghpull:`13093`
259 - Fix an issue with pip magic on windows :ghpull:`13093`
241
260
242 Thanks
261 Thanks
243 ------
262 ------
244
263
245 Many thanks to all the contributors to this release. You can find all individual
264 Many thanks to all the contributors to this release. You can find all individual
246 contributions to this milestone `on github
265 contributions to this milestone `on github
247 <https://github.com/ipython/ipython/milestone/91>`__.
266 <https://github.com/ipython/ipython/milestone/91>`__.
248
267
249 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
268 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
250 work on IPython and related libraries.
269 work on IPython and related libraries.
251
270
252 .. _version 7.26:
271 .. _version 7.26:
253
272
254 IPython 7.26
273 IPython 7.26
255 ============
274 ============
256
275
257 IPython 7.26 is a minor release that fixes a couple of issues, updates in API
276 IPython 7.26 is a minor release that fixes a couple of issues, updates in API
258 and Copyright/Licenses issues around various part of the codebase.
277 and Copyright/Licenses issues around various part of the codebase.
259
278
260 We'll highlight `this issue <https://github.com/ipython/ipython/issues/13039>`
279 We'll highlight `this issue <https://github.com/ipython/ipython/issues/13039>`
261 pointing out we were including and refereeing to code from Stack Overflow which
280 pointing out we were including and refereeing to code from Stack Overflow which
262 was CC-BY-SA, hence incompatible with the BSD license of IPython. This lead us
281 was CC-BY-SA, hence incompatible with the BSD license of IPython. This lead us
263 to a rewriting of the corresponding logic which in our case was done in a more
282 to a rewriting of the corresponding logic which in our case was done in a more
264 efficient way (in our case we were searching string prefixes instead of full
283 efficient way (in our case we were searching string prefixes instead of full
265 strings).
284 strings).
266
285
267 You will notice also a number of documentation improvements and cleanup.
286 You will notice also a number of documentation improvements and cleanup.
268
287
269 Of particular interest are the following Pull-requests:
288 Of particular interest are the following Pull-requests:
270
289
271
290
272 - The IPython directive now uses Sphinx logging for warnings. :ghpull:`13030`.
291 - The IPython directive now uses Sphinx logging for warnings. :ghpull:`13030`.
273 - Add expiry days option to pastebin magic and change http protocol to https.
292 - Add expiry days option to pastebin magic and change http protocol to https.
274 :ghpull:`13056`
293 :ghpull:`13056`
275 - Make Ipython.utils.timing work with jupyterlite :ghpull:`13050`.
294 - Make Ipython.utils.timing work with jupyterlite :ghpull:`13050`.
276
295
277 Pastebin magic expiry days option
296 Pastebin magic expiry days option
278 ---------------------------------
297 ---------------------------------
279
298
280 The Pastebin magic now has ``-e`` option to determine
299 The Pastebin magic now has ``-e`` option to determine
281 the number of days for paste expiration. For example
300 the number of days for paste expiration. For example
282 the paste that created with ``%pastebin -e 20 1`` magic will
301 the paste that created with ``%pastebin -e 20 1`` magic will
283 be available for next 20 days.
302 be available for next 20 days.
284
303
285
304
286
305
287
306
288
307
289 Thanks
308 Thanks
290 ------
309 ------
291
310
292 Many thanks to all the contributors to this release and in particular MrMino who
311 Many thanks to all the contributors to this release and in particular MrMino who
293 is doing most of the work those days. You can find all individual contributions
312 is doing most of the work those days. You can find all individual contributions
294 to this milestone `on github <https://github.com/ipython/ipython/milestone/90>`__.
313 to this milestone `on github <https://github.com/ipython/ipython/milestone/90>`__.
295
314
296 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
315 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
297 work on IPython and related libraries.
316 work on IPython and related libraries.
298
317
299
318
300 .. _version 7.25:
319 .. _version 7.25:
301
320
302 IPython 7.25
321 IPython 7.25
303 ============
322 ============
304
323
305 IPython 7.25 is a minor release that contains a single bugfix, which is highly
324 IPython 7.25 is a minor release that contains a single bugfix, which is highly
306 recommended for all users of ipdb, ipython debugger %debug magic and similar.
325 recommended for all users of ipdb, ipython debugger %debug magic and similar.
307
326
308 Issuing commands like ``where`` from within the debugger would reset the
327 Issuing commands like ``where`` from within the debugger would reset the
309 local variables changes made by the user. It is interesting to look at the root
328 local variables changes made by the user. It is interesting to look at the root
310 cause of the issue as accessing an attribute (``frame.f_locals``) would trigger
329 cause of the issue as accessing an attribute (``frame.f_locals``) would trigger
311 this side effects.
330 this side effects.
312
331
313 Thanks in particular to the patience from the reporters at D.E. Shaw for their
332 Thanks in particular to the patience from the reporters at D.E. Shaw for their
314 initial bug report that was due to a similar coding oversight in an extension,
333 initial bug report that was due to a similar coding oversight in an extension,
315 and who took time to debug and narrow down the problem.
334 and who took time to debug and narrow down the problem.
316
335
317 Thanks
336 Thanks
318 ------
337 ------
319
338
320 Many thanks to all the contributors to this release you can find all individual
339 Many thanks to all the contributors to this release you can find all individual
321 contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/89>`__.
340 contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/89>`__.
322
341
323 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
342 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
324 work on IPython and related libraries.
343 work on IPython and related libraries.
325
344
326
345
327 .. _version 7.24:
346 .. _version 7.24:
328
347
329 IPython 7.24
348 IPython 7.24
330 ============
349 ============
331
350
332 Third release of IPython for 2021, mostly containing bug fixes. A couple of not
351 Third release of IPython for 2021, mostly containing bug fixes. A couple of not
333 typical updates:
352 typical updates:
334
353
335 Misc
354 Misc
336 ----
355 ----
337
356
338
357
339 - Fix an issue where ``%recall`` would both succeeded and print an error message
358 - Fix an issue where ``%recall`` would both succeeded and print an error message
340 it failed. :ghpull:`12952`
359 it failed. :ghpull:`12952`
341 - Drop support for NumPy 1.16 – practically has no effect beyond indicating in
360 - Drop support for NumPy 1.16 – practically has no effect beyond indicating in
342 package metadata that we do not support it. :ghpull:`12937`
361 package metadata that we do not support it. :ghpull:`12937`
343
362
344 Debugger improvements
363 Debugger improvements
345 ---------------------
364 ---------------------
346
365
347 The debugger (and ``%debug`` magic) have been improved and can skip or hide frames
366 The debugger (and ``%debug`` magic) have been improved and can skip or hide frames
348 originating from files that are not writable to the user, as these are less
367 originating from files that are not writable to the user, as these are less
349 likely to be the source of errors, or be part of system files this can be a useful
368 likely to be the source of errors, or be part of system files this can be a useful
350 addition when debugging long errors.
369 addition when debugging long errors.
351
370
352 In addition to the global ``skip_hidden True|False`` command, the debugger has
371 In addition to the global ``skip_hidden True|False`` command, the debugger has
353 gained finer grained control of predicates as to whether to a frame should be
372 gained finer grained control of predicates as to whether to a frame should be
354 considered hidden. So far 3 predicates are available :
373 considered hidden. So far 3 predicates are available :
355
374
356 - ``tbhide``: frames containing the local variable ``__tracebackhide__`` set to
375 - ``tbhide``: frames containing the local variable ``__tracebackhide__`` set to
357 True.
376 True.
358 - ``readonly``: frames originating from readonly files, set to False.
377 - ``readonly``: frames originating from readonly files, set to False.
359 - ``ipython_internal``: frames that are likely to be from IPython internal
378 - ``ipython_internal``: frames that are likely to be from IPython internal
360 code, set to True.
379 code, set to True.
361
380
362 You can toggle individual predicates during a session with
381 You can toggle individual predicates during a session with
363
382
364 .. code-block::
383 .. code-block::
365
384
366 ipdb> skip_predicates readonly True
385 ipdb> skip_predicates readonly True
367
386
368 Read-only files will now be considered hidden frames.
387 Read-only files will now be considered hidden frames.
369
388
370
389
371 You can call ``skip_predicates`` without arguments to see the states of current
390 You can call ``skip_predicates`` without arguments to see the states of current
372 predicates:
391 predicates:
373
392
374 .. code-block::
393 .. code-block::
375
394
376 ipdb> skip_predicates
395 ipdb> skip_predicates
377 current predicates:
396 current predicates:
378 tbhide : True
397 tbhide : True
379 readonly : False
398 readonly : False
380 ipython_internal : True
399 ipython_internal : True
381
400
382 If all predicates are set to ``False``, ``skip_hidden`` will practically have
401 If all predicates are set to ``False``, ``skip_hidden`` will practically have
383 no effect. We attempt to warn you when all predicates are False.
402 no effect. We attempt to warn you when all predicates are False.
384
403
385 Note that the ``readonly`` predicate may increase disk access as we check for
404 Note that the ``readonly`` predicate may increase disk access as we check for
386 file access permission for all frames on many command invocation, but is usually
405 file access permission for all frames on many command invocation, but is usually
387 cached by operating systems. Let us know if you encounter any issues.
406 cached by operating systems. Let us know if you encounter any issues.
388
407
389 As the IPython debugger does not use the traitlets infrastructure for
408 As the IPython debugger does not use the traitlets infrastructure for
390 configuration, by editing your ``.pdbrc`` files and appending commands you would
409 configuration, by editing your ``.pdbrc`` files and appending commands you would
391 like to be executed just before entering the interactive prompt. For example:
410 like to be executed just before entering the interactive prompt. For example:
392
411
393
412
394 .. code::
413 .. code::
395
414
396 # file : ~/.pdbrc
415 # file : ~/.pdbrc
397 skip_predicates readonly True
416 skip_predicates readonly True
398 skip_predicates tbhide False
417 skip_predicates tbhide False
399
418
400 Will hide read only frames by default and show frames marked with
419 Will hide read only frames by default and show frames marked with
401 ``__tracebackhide__``.
420 ``__tracebackhide__``.
402
421
403
422
404
423
405
424
406 Thanks
425 Thanks
407 ------
426 ------
408
427
409 Many thanks to all the contributors to this release you can find all individual
428 Many thanks to all the contributors to this release you can find all individual
410 contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/87>`__.
429 contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/87>`__.
411
430
412 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
431 Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring
413 work on IPython and related libraries, in particular above mentioned
432 work on IPython and related libraries, in particular above mentioned
414 improvements to the debugger.
433 improvements to the debugger.
415
434
416
435
417
436
418
437
419 .. _version 7.23:
438 .. _version 7.23:
420
439
421 IPython 7.23 and 7.23.1
440 IPython 7.23 and 7.23.1
422 =======================
441 =======================
423
442
424
443
425 Third release of IPython for 2021, mostly containing bug fixes. A couple of not
444 Third release of IPython for 2021, mostly containing bug fixes. A couple of not
426 typical updates:
445 typical updates:
427
446
428 - We moved to GitHub actions away from Travis-CI, the transition may not be
447 - We moved to GitHub actions away from Travis-CI, the transition may not be
429 100% complete (not testing on nightly anymore), but as we ran out of
448 100% complete (not testing on nightly anymore), but as we ran out of
430 Travis-Ci hours on the IPython organisation that was a necessary step.
449 Travis-Ci hours on the IPython organisation that was a necessary step.
431 :ghpull:`12900`.
450 :ghpull:`12900`.
432
451
433 - We have a new dependency: ``matplotlib-inline``, which try to extract
452 - We have a new dependency: ``matplotlib-inline``, which try to extract
434 matplotlib inline backend specific behavior. It is available on PyPI and
453 matplotlib inline backend specific behavior. It is available on PyPI and
435 conda-forge thus should not be a problem to upgrade to this version. If you
454 conda-forge thus should not be a problem to upgrade to this version. If you
436 are a package maintainer that might be an extra dependency to package first.
455 are a package maintainer that might be an extra dependency to package first.
437 :ghpull:`12817` (IPython 7.23.1 fix a typo that made this change fail)
456 :ghpull:`12817` (IPython 7.23.1 fix a typo that made this change fail)
438
457
439 In the addition/new feature category, ``display()`` now have a ``clear=True``
458 In the addition/new feature category, ``display()`` now have a ``clear=True``
440 option to clear the display if any further outputs arrives, allowing users to
459 option to clear the display if any further outputs arrives, allowing users to
441 avoid having to use ``clear_output()`` directly. :ghpull:`12823`.
460 avoid having to use ``clear_output()`` directly. :ghpull:`12823`.
442
461
443 In bug fixes category, this release fix an issue when printing tracebacks
462 In bug fixes category, this release fix an issue when printing tracebacks
444 containing Unicode characters :ghpull:`12758`.
463 containing Unicode characters :ghpull:`12758`.
445
464
446 In code cleanup category :ghpull:`12932` remove usage of some deprecated
465 In code cleanup category :ghpull:`12932` remove usage of some deprecated
447 functionality for compatibility with Python 3.10.
466 functionality for compatibility with Python 3.10.
448
467
449
468
450
469
451 Thanks
470 Thanks
452 ------
471 ------
453
472
454 Many thanks to all the contributors to this release you can find all individual
473 Many thanks to all the contributors to this release you can find all individual
455 contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/86>`__.
474 contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/86>`__.
456 In particular MrMino for responding to almost all new issues, and triaging many
475 In particular MrMino for responding to almost all new issues, and triaging many
457 of the old ones, as well as takluyver, minrk, willingc for reacting quikly when
476 of the old ones, as well as takluyver, minrk, willingc for reacting quikly when
458 we ran out of CI Hours.
477 we ran out of CI Hours.
459
478
460 Thanks as well to organisations, QuantStack (martinRenou and SylvainCorlay) for
479 Thanks as well to organisations, QuantStack (martinRenou and SylvainCorlay) for
461 extracting matplotlib inline backend into its own package, and the `D. E. Shaw group
480 extracting matplotlib inline backend into its own package, and the `D. E. Shaw group
462 <https://deshaw.com/>`__ for sponsoring work on IPython and related libraries.
481 <https://deshaw.com/>`__ for sponsoring work on IPython and related libraries.
463
482
464
483
465 .. _version 7.22:
484 .. _version 7.22:
466
485
467 IPython 7.22
486 IPython 7.22
468 ============
487 ============
469
488
470 Second release of IPython for 2021, mostly containing bug fixes. Here is a quick
489 Second release of IPython for 2021, mostly containing bug fixes. Here is a quick
471 rundown of the few changes.
490 rundown of the few changes.
472
491
473 - Fix some ``sys.excepthook`` shenanigan when embedding with qt, recommended if
492 - Fix some ``sys.excepthook`` shenanigan when embedding with qt, recommended if
474 you – for example – use `napari <https://napari.org>`__. :ghpull:`12842`.
493 you – for example – use `napari <https://napari.org>`__. :ghpull:`12842`.
475 - Fix bug when using the new ipdb ``%context`` magic :ghpull:`12844`
494 - Fix bug when using the new ipdb ``%context`` magic :ghpull:`12844`
476 - Couples of deprecation cleanup :ghpull:`12868`
495 - Couples of deprecation cleanup :ghpull:`12868`
477 - Update for new dpast.com api if you use the ``%pastbin`` magic. :ghpull:`12712`
496 - Update for new dpast.com api if you use the ``%pastbin`` magic. :ghpull:`12712`
478 - Remove support for numpy before 1.16. :ghpull:`12836`
497 - Remove support for numpy before 1.16. :ghpull:`12836`
479
498
480
499
481 Thanks
500 Thanks
482 ------
501 ------
483
502
484 We have a new team member that you should see more often on the IPython
503 We have a new team member that you should see more often on the IPython
485 repository, BΕ‚aΕΌej Michalik (@MrMino) have been doing regular contributions to
504 repository, BΕ‚aΕΌej Michalik (@MrMino) have been doing regular contributions to
486 IPython, and spent time replying to many issues and guiding new users to the
505 IPython, and spent time replying to many issues and guiding new users to the
487 codebase; they now have triage permissions to the IPython repository and we'll
506 codebase; they now have triage permissions to the IPython repository and we'll
488 work toward giving them more permission in the future.
507 work toward giving them more permission in the future.
489
508
490 Many thanks to all the contributors to this release you can find all individual
509 Many thanks to all the contributors to this release you can find all individual
491 contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/84>`__.
510 contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/84>`__.
492
511
493 Thanks as well to organisations, QuantStack for working on debugger
512 Thanks as well to organisations, QuantStack for working on debugger
494 compatibility for Xeus_python, and the `D. E. Shaw group
513 compatibility for Xeus_python, and the `D. E. Shaw group
495 <https://deshaw.com/>`__ for sponsoring work on IPython and related libraries.
514 <https://deshaw.com/>`__ for sponsoring work on IPython and related libraries.
496
515
497 .. _version 721:
516 .. _version 721:
498
517
499 IPython 7.21
518 IPython 7.21
500 ============
519 ============
501
520
502 IPython 7.21 is the first release we have back on schedule of one release every
521 IPython 7.21 is the first release we have back on schedule of one release every
503 month; it contains a number of minor fixes and improvements, notably, the new
522 month; it contains a number of minor fixes and improvements, notably, the new
504 context command for ipdb
523 context command for ipdb
505
524
506
525
507 New "context" command in ipdb
526 New "context" command in ipdb
508 -----------------------------
527 -----------------------------
509
528
510 It is now possible to change the number of lines shown in the backtrace
529 It is now possible to change the number of lines shown in the backtrace
511 information in ipdb using "context" command. :ghpull:`12826`
530 information in ipdb using "context" command. :ghpull:`12826`
512
531
513 (thanks @MrMino, there are other improvement from them on master).
532 (thanks @MrMino, there are other improvement from them on master).
514
533
515 Other notable changes in IPython 7.21
534 Other notable changes in IPython 7.21
516 -------------------------------------
535 -------------------------------------
517
536
518 - Fix some issues on new osx-arm64 :ghpull:`12804`, :ghpull:`12807`.
537 - Fix some issues on new osx-arm64 :ghpull:`12804`, :ghpull:`12807`.
519 - Compatibility with Xeus-Python for debugger protocol, :ghpull:`12809`
538 - Compatibility with Xeus-Python for debugger protocol, :ghpull:`12809`
520 - Misc docs fixes for compatibility and uniformity with Numpydoc.
539 - Misc docs fixes for compatibility and uniformity with Numpydoc.
521 :ghpull:`12824`
540 :ghpull:`12824`
522
541
523
542
524 Thanks
543 Thanks
525 ------
544 ------
526
545
527 Many thanks to all the contributors to this release you can find all individual
546 Many thanks to all the contributors to this release you can find all individual
528 contribution to this milestone `on github <https://github.com/ipython/ipython/milestone/83>`__.
547 contribution to this milestone `on github <https://github.com/ipython/ipython/milestone/83>`__.
529
548
530
549
531 .. _version 720:
550 .. _version 720:
532
551
533 IPython 7.20
552 IPython 7.20
534 ============
553 ============
535
554
536 IPython 7.20 is the accumulation of 3 month of work on IPython, spacing between
555 IPython 7.20 is the accumulation of 3 month of work on IPython, spacing between
537 IPython release have been increased from the usual once a month for various
556 IPython release have been increased from the usual once a month for various
538 reason.
557 reason.
539
558
540 - Mainly as I'm too busy and the effectively sole maintainer, and
559 - Mainly as I'm too busy and the effectively sole maintainer, and
541 - Second because not much changes happened before mid December.
560 - Second because not much changes happened before mid December.
542
561
543 The main driver for this release was the new version of Jedi 0.18 breaking API;
562 The main driver for this release was the new version of Jedi 0.18 breaking API;
544 which was taken care of in the master branch early in 2020 but not in 7.x as I
563 which was taken care of in the master branch early in 2020 but not in 7.x as I
545 though that by now 8.0 would be out.
564 though that by now 8.0 would be out.
546
565
547 The inclusion of a resolver in pip did not help and actually made things worse.
566 The inclusion of a resolver in pip did not help and actually made things worse.
548 If usually I would have simply pinned Jedi to ``<0.18``; this is not a solution
567 If usually I would have simply pinned Jedi to ``<0.18``; this is not a solution
549 anymore as now pip is free to install Jedi 0.18, and downgrade IPython.
568 anymore as now pip is free to install Jedi 0.18, and downgrade IPython.
550
569
551 I'll do my best to keep the regular release, but as the 8.0-dev branch and 7.x
570 I'll do my best to keep the regular release, but as the 8.0-dev branch and 7.x
552 are starting to diverge this is becoming difficult in particular with my limited
571 are starting to diverge this is becoming difficult in particular with my limited
553 time, so if you have any cycles to spare I'll appreciate your help to respond to
572 time, so if you have any cycles to spare I'll appreciate your help to respond to
554 issues and pushing 8.0 forward.
573 issues and pushing 8.0 forward.
555
574
556 Here are thus some of the changes for IPython 7.20.
575 Here are thus some of the changes for IPython 7.20.
557
576
558 - Support for PyQt5 >= 5.11 :ghpull:`12715`
577 - Support for PyQt5 >= 5.11 :ghpull:`12715`
559 - ``%reset`` remove imports more agressively :ghpull:`12718`
578 - ``%reset`` remove imports more agressively :ghpull:`12718`
560 - fix the ``%conda`` magic :ghpull:`12739`
579 - fix the ``%conda`` magic :ghpull:`12739`
561 - compatibility with Jedi 0.18, and bump minimum Jedi version. :ghpull:`12793`
580 - compatibility with Jedi 0.18, and bump minimum Jedi version. :ghpull:`12793`
562
581
563
582
564 .. _version 719:
583 .. _version 719:
565
584
566 IPython 7.19
585 IPython 7.19
567 ============
586 ============
568
587
569 IPython 7.19 accumulative two month of works, bug fixes and improvements, there
588 IPython 7.19 accumulative two month of works, bug fixes and improvements, there
570 was exceptionally no release last month.
589 was exceptionally no release last month.
571
590
572 - Fix to restore the ability to specify more than one extension using command
591 - Fix to restore the ability to specify more than one extension using command
573 line flags when using traitlets 5.0 :ghpull:`12543`
592 line flags when using traitlets 5.0 :ghpull:`12543`
574 - Docs docs formatting that make the install commands work on zsh
593 - Docs docs formatting that make the install commands work on zsh
575 :ghpull:`12587`
594 :ghpull:`12587`
576 - Always display the last frame in tracebacks even if hidden with
595 - Always display the last frame in tracebacks even if hidden with
577 ``__tracebackhide__`` :ghpull:`12601`
596 ``__tracebackhide__`` :ghpull:`12601`
578 - Avoid an issue where a callback can be registered multiple times.
597 - Avoid an issue where a callback can be registered multiple times.
579 :ghpull:`12625`
598 :ghpull:`12625`
580 - Avoid an issue in debugger mode where frames changes could be lost.
599 - Avoid an issue in debugger mode where frames changes could be lost.
581 :ghpull:`12627`
600 :ghpull:`12627`
582
601
583 - Never hide the frames that invoke a debugger, even if marked as hidden by
602 - Never hide the frames that invoke a debugger, even if marked as hidden by
584 ``__tracebackhide__`` :ghpull:`12631`
603 ``__tracebackhide__`` :ghpull:`12631`
585 - Fix calling the debugger in a recursive manner :ghpull:`12659`
604 - Fix calling the debugger in a recursive manner :ghpull:`12659`
586
605
587
606
588 A number of code changes have landed on master and we are getting close to
607 A number of code changes have landed on master and we are getting close to
589 enough new features and codebase improvement that a 8.0 start to make sens.
608 enough new features and codebase improvement that a 8.0 start to make sens.
590 For downstream packages, please start working on migrating downstream testing
609 For downstream packages, please start working on migrating downstream testing
591 away from iptest and using pytest, as nose will not work on Python 3.10 and we
610 away from iptest and using pytest, as nose will not work on Python 3.10 and we
592 will likely start removing it as a dependency for testing.
611 will likely start removing it as a dependency for testing.
593
612
594 .. _version 718:
613 .. _version 718:
595
614
596 IPython 7.18
615 IPython 7.18
597 ============
616 ============
598
617
599 IPython 7.18 is a minor release that mostly contains bugfixes.
618 IPython 7.18 is a minor release that mostly contains bugfixes.
600
619
601 - ``CRLF`` is now handled by magics my default; solving some issues due to copy
620 - ``CRLF`` is now handled by magics my default; solving some issues due to copy
602 pasting on windows. :ghpull:`12475`
621 pasting on windows. :ghpull:`12475`
603
622
604 - Requiring pexpect ``>=4.3`` as we are Python 3.7+ only and earlier version of
623 - Requiring pexpect ``>=4.3`` as we are Python 3.7+ only and earlier version of
605 pexpect will be incompatible. :ghpull:`12510`
624 pexpect will be incompatible. :ghpull:`12510`
606
625
607 - Minimum jedi version is now 0.16. :ghpull:`12488`
626 - Minimum jedi version is now 0.16. :ghpull:`12488`
608
627
609
628
610
629
611 .. _version 717:
630 .. _version 717:
612
631
613 IPython 7.17
632 IPython 7.17
614 ============
633 ============
615
634
616 IPython 7.17 brings a couple of new improvements to API and a couple of user
635 IPython 7.17 brings a couple of new improvements to API and a couple of user
617 facing changes to make the terminal experience more user friendly.
636 facing changes to make the terminal experience more user friendly.
618
637
619 :ghpull:`12407` introduces the ability to pass extra argument to the IPython
638 :ghpull:`12407` introduces the ability to pass extra argument to the IPython
620 debugger class; this is to help a new project from ``kmaork``
639 debugger class; this is to help a new project from ``kmaork``
621 (https://github.com/kmaork/madbg) to feature a fully remote debugger.
640 (https://github.com/kmaork/madbg) to feature a fully remote debugger.
622
641
623 :ghpull:`12410` finally remove support for 3.6, while the codebase is still
642 :ghpull:`12410` finally remove support for 3.6, while the codebase is still
624 technically compatible; IPython will not install on Python 3.6.
643 technically compatible; IPython will not install on Python 3.6.
625
644
626 lots of work on the debugger and hidden frames from ``@impact27`` in
645 lots of work on the debugger and hidden frames from ``@impact27`` in
627 :ghpull:`12437`, :ghpull:`12445`, :ghpull:`12460` and in particular
646 :ghpull:`12437`, :ghpull:`12445`, :ghpull:`12460` and in particular
628 :ghpull:`12453` which make the debug magic more robust at handling spaces.
647 :ghpull:`12453` which make the debug magic more robust at handling spaces.
629
648
630 Biggest API addition is code transformation which is done before code execution;
649 Biggest API addition is code transformation which is done before code execution;
631 IPython allows a number of hooks to catch non-valid Python syntax (magic, prompt
650 IPython allows a number of hooks to catch non-valid Python syntax (magic, prompt
632 stripping...etc). Transformers are usually called many time; typically:
651 stripping...etc). Transformers are usually called many time; typically:
633
652
634 - When trying to figure out whether the code is complete and valid (should we
653 - When trying to figure out whether the code is complete and valid (should we
635 insert a new line or execute ?)
654 insert a new line or execute ?)
636 - During actual code execution pass before giving the code to Python's
655 - During actual code execution pass before giving the code to Python's
637 ``exec``.
656 ``exec``.
638
657
639 This lead to issues when transformer might have had side effects; or do external
658 This lead to issues when transformer might have had side effects; or do external
640 queries. Starting with IPython 7.17 you can expect your transformer to be called
659 queries. Starting with IPython 7.17 you can expect your transformer to be called
641 less time.
660 less time.
642
661
643 Input transformers are now called only once in the execution path of
662 Input transformers are now called only once in the execution path of
644 `InteractiveShell`, allowing to register transformer that potentially have side
663 `InteractiveShell`, allowing to register transformer that potentially have side
645 effects (note that this is not recommended). Internal methods `should_run_async`, and
664 effects (note that this is not recommended). Internal methods `should_run_async`, and
646 `run_cell_async` now take a recommended optional `transformed_cell`, and
665 `run_cell_async` now take a recommended optional `transformed_cell`, and
647 `preprocessing_exc_tuple` parameters that will become mandatory at some point in
666 `preprocessing_exc_tuple` parameters that will become mandatory at some point in
648 the future; that is to say cells need to be explicitly transformed to be valid
667 the future; that is to say cells need to be explicitly transformed to be valid
649 Python syntax ahead of trying to run them. :ghpull:`12440`;
668 Python syntax ahead of trying to run them. :ghpull:`12440`;
650
669
651 ``input_transformers`` can now also have an attribute ``has_side_effects`` set
670 ``input_transformers`` can now also have an attribute ``has_side_effects`` set
652 to `True`, when this attribute is present; this will prevent the transformers
671 to `True`, when this attribute is present; this will prevent the transformers
653 from being ran when IPython is trying to guess whether the user input is
672 from being ran when IPython is trying to guess whether the user input is
654 complete. Note that this may means you will need to explicitly execute in some
673 complete. Note that this may means you will need to explicitly execute in some
655 case where your transformations are now not ran; but will not affect users with
674 case where your transformations are now not ran; but will not affect users with
656 no custom extensions.
675 no custom extensions.
657
676
658
677
659 API Changes
678 API Changes
660 -----------
679 -----------
661
680
662 Change of API and exposed objects automatically detected using `frappuccino
681 Change of API and exposed objects automatically detected using `frappuccino
663 <https://pypi.org/project/frappuccino/>`_
682 <https://pypi.org/project/frappuccino/>`_
664
683
665
684
666 The following items are new since 7.16.0::
685 The following items are new since 7.16.0::
667
686
668 + IPython.core.interactiveshell.InteractiveShell.get_local_scope(self, stack_depth)
687 + IPython.core.interactiveshell.InteractiveShell.get_local_scope(self, stack_depth)
669
688
670 The following signatures differ since 7.16.0::
689 The following signatures differ since 7.16.0::
671
690
672 - IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True)
691 - IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True)
673 + IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True, *, transformed_cell=None, preprocessing_exc_tuple=None)
692 + IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True, *, transformed_cell=None, preprocessing_exc_tuple=None)
674
693
675 - IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell)
694 - IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell)
676 + IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell, *, transformed_cell=None, preprocessing_exc_tuple=None)
695 + IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell, *, transformed_cell=None, preprocessing_exc_tuple=None)
677
696
678 - IPython.terminal.debugger.TerminalPdb.pt_init(self)
697 - IPython.terminal.debugger.TerminalPdb.pt_init(self)
679 + IPython.terminal.debugger.TerminalPdb.pt_init(self, pt_session_options=None)
698 + IPython.terminal.debugger.TerminalPdb.pt_init(self, pt_session_options=None)
680
699
681 This method was added::
700 This method was added::
682
701
683 + IPython.core.interactiveshell.InteractiveShell.get_local_scope
702 + IPython.core.interactiveshell.InteractiveShell.get_local_scope
684
703
685 Which is now also present on subclasses::
704 Which is now also present on subclasses::
686
705
687 + IPython.terminal.embed.InteractiveShellEmbed.get_local_scope
706 + IPython.terminal.embed.InteractiveShellEmbed.get_local_scope
688 + IPython.terminal.interactiveshell.TerminalInteractiveShell.get_local_scope
707 + IPython.terminal.interactiveshell.TerminalInteractiveShell.get_local_scope
689
708
690
709
691 .. _version 716:
710 .. _version 716:
692
711
693 IPython 7.16.1, 7.16.2
712 IPython 7.16.1, 7.16.2
694 ======================
713 ======================
695
714
696 IPython 7.16.1 was release immediately after 7.16.0 to fix a conda packaging issue.
715 IPython 7.16.1 was release immediately after 7.16.0 to fix a conda packaging issue.
697 The source is identical to 7.16.0 but the file permissions in the tar are different.
716 The source is identical to 7.16.0 but the file permissions in the tar are different.
698
717
699 IPython 7.16.2 pins jedi dependency to "<=0.17.2" which should prevent some
718 IPython 7.16.2 pins jedi dependency to "<=0.17.2" which should prevent some
700 issues for users still on python 3.6. This may not be sufficient as pip may
719 issues for users still on python 3.6. This may not be sufficient as pip may
701 still allow to downgrade IPython.
720 still allow to downgrade IPython.
702
721
703 Compatibility with Jedi > 0.17.2 was not added as this would have meant bumping
722 Compatibility with Jedi > 0.17.2 was not added as this would have meant bumping
704 the minimal version to >0.16.
723 the minimal version to >0.16.
705
724
706 IPython 7.16
725 IPython 7.16
707 ============
726 ============
708
727
709
728
710 The default traceback mode will now skip frames that are marked with
729 The default traceback mode will now skip frames that are marked with
711 ``__tracebackhide__ = True`` and show how many traceback frames have been
730 ``__tracebackhide__ = True`` and show how many traceback frames have been
712 skipped. This can be toggled by using :magic:`xmode` with the ``--show`` or
731 skipped. This can be toggled by using :magic:`xmode` with the ``--show`` or
713 ``--hide`` attribute. It will have no effect on non verbose traceback modes.
732 ``--hide`` attribute. It will have no effect on non verbose traceback modes.
714
733
715 The ipython debugger also now understands ``__tracebackhide__`` as well and will
734 The ipython debugger also now understands ``__tracebackhide__`` as well and will
716 skip hidden frames when displaying. Movement up and down the stack will skip the
735 skip hidden frames when displaying. Movement up and down the stack will skip the
717 hidden frames and will show how many frames were hidden. Internal IPython frames
736 hidden frames and will show how many frames were hidden. Internal IPython frames
718 are also now hidden by default. The behavior can be changed with the
737 are also now hidden by default. The behavior can be changed with the
719 ``skip_hidden`` while in the debugger, command and accepts "yes", "no", "true"
738 ``skip_hidden`` while in the debugger, command and accepts "yes", "no", "true"
720 and "false" case insensitive parameters.
739 and "false" case insensitive parameters.
721
740
722
741
723 Misc Noticeable changes:
742 Misc Noticeable changes:
724 ------------------------
743 ------------------------
725
744
726 - Exceptions are now (re)raised when running notebooks via the :magic:`%run`, helping to catch issues in workflows and
745 - Exceptions are now (re)raised when running notebooks via the :magic:`%run`, helping to catch issues in workflows and
727 pipelines. :ghpull:`12301`
746 pipelines. :ghpull:`12301`
728 - Fix inputhook for qt 5.15.0 :ghpull:`12355`
747 - Fix inputhook for qt 5.15.0 :ghpull:`12355`
729 - Fix wx inputhook :ghpull:`12375`
748 - Fix wx inputhook :ghpull:`12375`
730 - Add handling for malformed pathext env var (Windows) :ghpull:`12367`
749 - Add handling for malformed pathext env var (Windows) :ghpull:`12367`
731 - use $SHELL in system_piped :ghpull:`12360` for uniform behavior with
750 - use $SHELL in system_piped :ghpull:`12360` for uniform behavior with
732 ipykernel.
751 ipykernel.
733
752
734 Reproducible Build
753 Reproducible Build
735 ------------------
754 ------------------
736
755
737 IPython 7.15 reproducible build did not work, so we try again this month
756 IPython 7.15 reproducible build did not work, so we try again this month
738 :ghpull:`12358`.
757 :ghpull:`12358`.
739
758
740
759
741 API Changes
760 API Changes
742 -----------
761 -----------
743
762
744 Change of API and exposed objects automatically detected using `frappuccino
763 Change of API and exposed objects automatically detected using `frappuccino
745 <https://pypi.org/project/frappuccino/>`_ (still in beta):
764 <https://pypi.org/project/frappuccino/>`_ (still in beta):
746
765
747
766
748 The following items are new and mostly related to understanding ``__tracebackhide__``::
767 The following items are new and mostly related to understanding ``__tracebackhide__``::
749
768
750 + IPython.core.debugger.Pdb.do_down(self, arg)
769 + IPython.core.debugger.Pdb.do_down(self, arg)
751 + IPython.core.debugger.Pdb.do_skip_hidden(self, arg)
770 + IPython.core.debugger.Pdb.do_skip_hidden(self, arg)
752 + IPython.core.debugger.Pdb.do_up(self, arg)
771 + IPython.core.debugger.Pdb.do_up(self, arg)
753 + IPython.core.debugger.Pdb.hidden_frames(self, stack)
772 + IPython.core.debugger.Pdb.hidden_frames(self, stack)
754 + IPython.core.debugger.Pdb.stop_here(self, frame)
773 + IPython.core.debugger.Pdb.stop_here(self, frame)
755
774
756
775
757 The following items have been removed::
776 The following items have been removed::
758
777
759 - IPython.core.debugger.Pdb.new_do_down
778 - IPython.core.debugger.Pdb.new_do_down
760 - IPython.core.debugger.Pdb.new_do_up
779 - IPython.core.debugger.Pdb.new_do_up
761
780
762 Those were implementation details.
781 Those were implementation details.
763
782
764
783
765 .. _version 715:
784 .. _version 715:
766
785
767 IPython 7.15
786 IPython 7.15
768 ============
787 ============
769
788
770 IPython 7.15 brings a number of bug fixes and user facing improvements.
789 IPython 7.15 brings a number of bug fixes and user facing improvements.
771
790
772 Misc Noticeable changes:
791 Misc Noticeable changes:
773 ------------------------
792 ------------------------
774
793
775 - Long completion name have better elision in terminal :ghpull:`12284`
794 - Long completion name have better elision in terminal :ghpull:`12284`
776 - I've started to test on Python 3.9 :ghpull:`12307` and fix some errors.
795 - I've started to test on Python 3.9 :ghpull:`12307` and fix some errors.
777 - Hi DPI scaling of figures when using qt eventloop :ghpull:`12314`
796 - Hi DPI scaling of figures when using qt eventloop :ghpull:`12314`
778 - Document the ability to have systemwide configuration for IPython.
797 - Document the ability to have systemwide configuration for IPython.
779 :ghpull:`12328`
798 :ghpull:`12328`
780 - Fix issues with input autoformatting :ghpull:`12336`
799 - Fix issues with input autoformatting :ghpull:`12336`
781 - ``IPython.core.debugger.Pdb`` is now interruptible (:ghpull:`12168`, in 7.14
800 - ``IPython.core.debugger.Pdb`` is now interruptible (:ghpull:`12168`, in 7.14
782 but forgotten in release notes)
801 but forgotten in release notes)
783 - Video HTML attributes (:ghpull:`12212`, in 7.14 but forgotten in release
802 - Video HTML attributes (:ghpull:`12212`, in 7.14 but forgotten in release
784 notes)
803 notes)
785
804
786 Reproducible Build
805 Reproducible Build
787 ------------------
806 ------------------
788
807
789 Starting with IPython 7.15, I am attempting to provide reproducible builds,
808 Starting with IPython 7.15, I am attempting to provide reproducible builds,
790 that is to say you should be able from the source tree to generate an sdist
809 that is to say you should be able from the source tree to generate an sdist
791 and wheel that are identical byte for byte with the publish version on PyPI.
810 and wheel that are identical byte for byte with the publish version on PyPI.
792
811
793 I've only tested on a couple of machines so far and the process is relatively
812 I've only tested on a couple of machines so far and the process is relatively
794 straightforward, so this mean that IPython not only have a deterministic build
813 straightforward, so this mean that IPython not only have a deterministic build
795 process, but also I have either removed, or put under control all effects of
814 process, but also I have either removed, or put under control all effects of
796 the build environments on the final artifact. I encourage you to attempt the
815 the build environments on the final artifact. I encourage you to attempt the
797 build process on your machine as documented in :ref:`core_developer_guide`
816 build process on your machine as documented in :ref:`core_developer_guide`
798 and let me know if you do not obtain an identical artifact.
817 and let me know if you do not obtain an identical artifact.
799
818
800 While reproducible builds is critical to check that the supply chain of (open
819 While reproducible builds is critical to check that the supply chain of (open
801 source) software has not been compromised, it can also help to speedup many
820 source) software has not been compromised, it can also help to speedup many
802 of the build processes in large environment (conda, apt...) by allowing
821 of the build processes in large environment (conda, apt...) by allowing
803 better caching of intermediate build steps.
822 better caching of intermediate build steps.
804
823
805 Learn more on `<https://reproducible-builds.org/>`_. `Reflections on trusting
824 Learn more on `<https://reproducible-builds.org/>`_. `Reflections on trusting
806 trust <https://dl.acm.org/doi/10.1145/358198.358210>`_ is also one of the
825 trust <https://dl.acm.org/doi/10.1145/358198.358210>`_ is also one of the
807 cornerstone and recommended reads on this subject.
826 cornerstone and recommended reads on this subject.
808
827
809 .. note::
828 .. note::
810
829
811 The build commit from which the sdist is generated is also `signed
830 The build commit from which the sdist is generated is also `signed
812 <https://en.wikipedia.org/wiki/Digital_signature>`_, so you should be able to
831 <https://en.wikipedia.org/wiki/Digital_signature>`_, so you should be able to
813 check it has not been compromised, and the git repository is a `merkle-tree
832 check it has not been compromised, and the git repository is a `merkle-tree
814 <https://en.wikipedia.org/wiki/Merkle_tree>`_, you can check the consistency
833 <https://en.wikipedia.org/wiki/Merkle_tree>`_, you can check the consistency
815 with `git-fsck <https://git-scm.com/docs/git-fsck>`_ which you likely `want
834 with `git-fsck <https://git-scm.com/docs/git-fsck>`_ which you likely `want
816 to enable by default
835 to enable by default
817 <https://gist.github.com/mbbx6spp/14b86437e794bffb4120>`_.
836 <https://gist.github.com/mbbx6spp/14b86437e794bffb4120>`_.
818
837
819 NEP29: Last version to support Python 3.6
838 NEP29: Last version to support Python 3.6
820 -----------------------------------------
839 -----------------------------------------
821
840
822 IPython 7.15 will be the Last IPython version to officially support Python
841 IPython 7.15 will be the Last IPython version to officially support Python
823 3.6, as stated by `NumPy Enhancement Proposal 29
842 3.6, as stated by `NumPy Enhancement Proposal 29
824 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_. Starting with
843 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_. Starting with
825 next minor version of IPython I may stop testing on Python 3.6 and may stop
844 next minor version of IPython I may stop testing on Python 3.6 and may stop
826 publishing release artifacts that install on Python 3.6
845 publishing release artifacts that install on Python 3.6
827
846
828 Highlighted features
847 Highlighted features
829 --------------------
848 --------------------
830
849
831 Highlighted features are not new, but seem to not be widely known, this
850 Highlighted features are not new, but seem to not be widely known, this
832 section will help you discover in more narrative form what you can do with
851 section will help you discover in more narrative form what you can do with
833 IPython.
852 IPython.
834
853
835 Increase Tab Completion Menu Height
854 Increase Tab Completion Menu Height
836 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
855 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
837
856
838 In terminal IPython it is possible to increase the hight of the tab-completion
857 In terminal IPython it is possible to increase the hight of the tab-completion
839 menu. To do so set the value of
858 menu. To do so set the value of
840 :configtrait:`TerminalInteractiveShell.space_for_menu`, this will reserve more
859 :configtrait:`TerminalInteractiveShell.space_for_menu`, this will reserve more
841 space at the bottom of the screen for various kind of menus in IPython including
860 space at the bottom of the screen for various kind of menus in IPython including
842 tab completion and searching in history.
861 tab completion and searching in history.
843
862
844 Autoformat Code in the terminal
863 Autoformat Code in the terminal
845 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
864 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
846
865
847 If you have a preferred code formatter, you can configure IPython to
866 If you have a preferred code formatter, you can configure IPython to
848 reformat your code. Set the value of
867 reformat your code. Set the value of
849 :configtrait:`TerminalInteractiveShell.autoformatter` to for example ``'black'``
868 :configtrait:`TerminalInteractiveShell.autoformatter` to for example ``'black'``
850 and IPython will auto format your code when possible.
869 and IPython will auto format your code when possible.
851
870
852
871
853 .. _version 714:
872 .. _version 714:
854
873
855 IPython 7.14
874 IPython 7.14
856 ============
875 ============
857
876
858 IPython 7.14 is a minor release that fix a couple of bugs and prepare
877 IPython 7.14 is a minor release that fix a couple of bugs and prepare
859 compatibility with new or future versions of some libraries.
878 compatibility with new or future versions of some libraries.
860
879
861 Important changes:
880 Important changes:
862 ------------------
881 ------------------
863
882
864 - Fix compatibility with Sphinx 3+ :ghpull:`12235`
883 - Fix compatibility with Sphinx 3+ :ghpull:`12235`
865 - Remove deprecated matplotlib parameter usage, compatibility with matplotlib
884 - Remove deprecated matplotlib parameter usage, compatibility with matplotlib
866 3.3+ :`122250`
885 3.3+ :`122250`
867
886
868 Misc Changes
887 Misc Changes
869 ------------
888 ------------
870
889
871 - set ``.py`` extension when editing current buffer in vi/emacs. :ghpull:`12167`
890 - set ``.py`` extension when editing current buffer in vi/emacs. :ghpull:`12167`
872 - support for unicode identifiers in ``?``/``??`` :ghpull:`12208`
891 - support for unicode identifiers in ``?``/``??`` :ghpull:`12208`
873 - add extra options to the ``Video`` Rich objects :ghpull:`12212`
892 - add extra options to the ``Video`` Rich objects :ghpull:`12212`
874 - add pretty-printing to ``SimpleNamespace`` :ghpull:`12230`
893 - add pretty-printing to ``SimpleNamespace`` :ghpull:`12230`
875
894
876 IPython.core.debugger.Pdb is now interruptible
895 IPython.core.debugger.Pdb is now interruptible
877 ----------------------------------------------
896 ----------------------------------------------
878
897
879 A ``KeyboardInterrupt`` will now interrupt IPython's extended debugger, in order to make Jupyter able to interrupt it. (:ghpull:`12168`)
898 A ``KeyboardInterrupt`` will now interrupt IPython's extended debugger, in order to make Jupyter able to interrupt it. (:ghpull:`12168`)
880
899
881 Video HTML attributes
900 Video HTML attributes
882 ---------------------
901 ---------------------
883
902
884 Add an option to `IPython.display.Video` to change the attributes of the HTML display of the video (:ghpull:`12212`)
903 Add an option to `IPython.display.Video` to change the attributes of the HTML display of the video (:ghpull:`12212`)
885
904
886
905
887 Pending deprecated imports
906 Pending deprecated imports
888 --------------------------
907 --------------------------
889
908
890 Many object present in ``IPython.core.display`` are there for internal use only,
909 Many object present in ``IPython.core.display`` are there for internal use only,
891 and should already been imported from ``IPython.display`` by users and external
910 and should already been imported from ``IPython.display`` by users and external
892 libraries. Trying to import those from ``IPython.core.display`` is still possible
911 libraries. Trying to import those from ``IPython.core.display`` is still possible
893 but will trigger a
912 but will trigger a
894 deprecation warning in later versions of IPython and will become errors in the
913 deprecation warning in later versions of IPython and will become errors in the
895 future.
914 future.
896
915
897 This will simplify compatibility with other Python kernels (like Xeus-Python),
916 This will simplify compatibility with other Python kernels (like Xeus-Python),
898 and simplify code base.
917 and simplify code base.
899
918
900
919
901
920
902
921
903 .. _version 713:
922 .. _version 713:
904
923
905 IPython 7.13
924 IPython 7.13
906 ============
925 ============
907
926
908 IPython 7.13 is the final release of the 7.x branch since master is diverging
927 IPython 7.13 is the final release of the 7.x branch since master is diverging
909 toward an 8.0. Exiting new features have already been merged in 8.0 and will
928 toward an 8.0. Exiting new features have already been merged in 8.0 and will
910 not be available on the 7.x branch. All the changes below have been backported
929 not be available on the 7.x branch. All the changes below have been backported
911 from the master branch.
930 from the master branch.
912
931
913
932
914 - Fix inability to run PDB when inside an event loop :ghpull:`12141`
933 - Fix inability to run PDB when inside an event loop :ghpull:`12141`
915 - Fix ability to interrupt some processes on windows :ghpull:`12137`
934 - Fix ability to interrupt some processes on windows :ghpull:`12137`
916 - Fix debugger shortcuts :ghpull:`12132`
935 - Fix debugger shortcuts :ghpull:`12132`
917 - improve tab completion when inside a string by removing irrelevant elements :ghpull:`12128`
936 - improve tab completion when inside a string by removing irrelevant elements :ghpull:`12128`
918 - Fix display of filename tab completion when the path is long :ghpull:`12122`
937 - Fix display of filename tab completion when the path is long :ghpull:`12122`
919 - Many removal of Python 2 specific code path :ghpull:`12110`
938 - Many removal of Python 2 specific code path :ghpull:`12110`
920 - displaying wav files do not require NumPy anymore, and is 5x to 30x faster :ghpull:`12113`
939 - displaying wav files do not require NumPy anymore, and is 5x to 30x faster :ghpull:`12113`
921
940
922 See the list of all closed issues and pull request on `github
941 See the list of all closed issues and pull request on `github
923 <https://github.com/ipython/ipython/pulls?q=is%3Aclosed+milestone%3A7.13>`_.
942 <https://github.com/ipython/ipython/pulls?q=is%3Aclosed+milestone%3A7.13>`_.
924
943
925 .. _version 712:
944 .. _version 712:
926
945
927 IPython 7.12
946 IPython 7.12
928 ============
947 ============
929
948
930 IPython 7.12 is a minor update that mostly brings code cleanup, removal of
949 IPython 7.12 is a minor update that mostly brings code cleanup, removal of
931 longtime deprecated function and a couple update to documentation cleanup as well.
950 longtime deprecated function and a couple update to documentation cleanup as well.
932
951
933 Notable changes are the following:
952 Notable changes are the following:
934
953
935 - Exit non-zero when ipython is given a file path to run that doesn't exist :ghpull:`12074`
954 - Exit non-zero when ipython is given a file path to run that doesn't exist :ghpull:`12074`
936 - Test PR on ARM64 with Travis-CI :ghpull:`12073`
955 - Test PR on ARM64 with Travis-CI :ghpull:`12073`
937 - Update CI to work with latest Pytest :ghpull:`12086`
956 - Update CI to work with latest Pytest :ghpull:`12086`
938 - Add infrastructure to run ipykernel eventloop via trio :ghpull:`12097`
957 - Add infrastructure to run ipykernel eventloop via trio :ghpull:`12097`
939 - Support git blame ignore revs :ghpull:`12091`
958 - Support git blame ignore revs :ghpull:`12091`
940 - Start multi-line ``__repr__`` s on their own line :ghpull:`12099`
959 - Start multi-line ``__repr__`` s on their own line :ghpull:`12099`
941
960
942 .. _version 7111:
961 .. _version 7111:
943
962
944 IPython 7.11.1
963 IPython 7.11.1
945 ==============
964 ==============
946
965
947 A couple of deprecated functions (no-op) have been reintroduces in py3compat as
966 A couple of deprecated functions (no-op) have been reintroduces in py3compat as
948 Cython was still relying on them, and will be removed in a couple of versions.
967 Cython was still relying on them, and will be removed in a couple of versions.
949
968
950 .. _version 711:
969 .. _version 711:
951
970
952 IPython 7.11
971 IPython 7.11
953 ============
972 ============
954
973
955 IPython 7.11 received a couple of compatibility fixes and code cleanup.
974 IPython 7.11 received a couple of compatibility fixes and code cleanup.
956
975
957 A number of function in the ``py3compat`` have been removed; a number of types
976 A number of function in the ``py3compat`` have been removed; a number of types
958 in the IPython code base are now non-ambiguous and now always ``unicode``
977 in the IPython code base are now non-ambiguous and now always ``unicode``
959 instead of ``Union[Unicode,bytes]``; many of the relevant code path have thus
978 instead of ``Union[Unicode,bytes]``; many of the relevant code path have thus
960 been simplified/cleaned and types annotation added.
979 been simplified/cleaned and types annotation added.
961
980
962 IPython support several verbosity level from exceptions. ``xmode plain`` now
981 IPython support several verbosity level from exceptions. ``xmode plain`` now
963 support chained exceptions. :ghpull:`11999`
982 support chained exceptions. :ghpull:`11999`
964
983
965 We are starting to remove ``shell=True`` in some usages of subprocess. While not directly
984 We are starting to remove ``shell=True`` in some usages of subprocess. While not directly
966 a security issue (as IPython is made to run arbitrary code anyway) it is not good
985 a security issue (as IPython is made to run arbitrary code anyway) it is not good
967 practice and we'd like to show the example. :ghissue:`12023`. This discussion
986 practice and we'd like to show the example. :ghissue:`12023`. This discussion
968 was started by ``@mschwager`` thanks to a new auditing tool they are working on
987 was started by ``@mschwager`` thanks to a new auditing tool they are working on
969 with duo-labs (`dlint <https://github.com/duo-labs/dlint>`_).
988 with duo-labs (`dlint <https://github.com/duo-labs/dlint>`_).
970
989
971 Work around some bugs in Python 3.9 tokenizer :ghpull:`12057`
990 Work around some bugs in Python 3.9 tokenizer :ghpull:`12057`
972
991
973 IPython will now print its version after a crash. :ghpull:`11986`
992 IPython will now print its version after a crash. :ghpull:`11986`
974
993
975 This is likely the last release from the 7.x series that will see new feature.
994 This is likely the last release from the 7.x series that will see new feature.
976 The master branch will soon accept large code changes and thrilling new
995 The master branch will soon accept large code changes and thrilling new
977 features; the 7.x branch will only start to accept critical bug fixes, and
996 features; the 7.x branch will only start to accept critical bug fixes, and
978 update dependencies.
997 update dependencies.
979
998
980 .. _version 7102:
999 .. _version 7102:
981
1000
982 IPython 7.10.2
1001 IPython 7.10.2
983 ==============
1002 ==============
984
1003
985 IPython 7.10.2 fix a couple of extra incompatibility between IPython, ipdb,
1004 IPython 7.10.2 fix a couple of extra incompatibility between IPython, ipdb,
986 asyncio and Prompt Toolkit 3.
1005 asyncio and Prompt Toolkit 3.
987
1006
988 .. _version 7101:
1007 .. _version 7101:
989
1008
990 IPython 7.10.1
1009 IPython 7.10.1
991 ==============
1010 ==============
992
1011
993 IPython 7.10.1 fix a couple of incompatibilities with Prompt toolkit 3 (please
1012 IPython 7.10.1 fix a couple of incompatibilities with Prompt toolkit 3 (please
994 update Prompt toolkit to 3.0.2 at least), and fixes some interaction with
1013 update Prompt toolkit to 3.0.2 at least), and fixes some interaction with
995 headless IPython.
1014 headless IPython.
996
1015
997 .. _version 7100:
1016 .. _version 7100:
998
1017
999 IPython 7.10.0
1018 IPython 7.10.0
1000 ==============
1019 ==============
1001
1020
1002 IPython 7.10 is the first double digit minor release in the last decade, and
1021 IPython 7.10 is the first double digit minor release in the last decade, and
1003 first since the release of IPython 1.0, previous double digit minor release was
1022 first since the release of IPython 1.0, previous double digit minor release was
1004 in August 2009.
1023 in August 2009.
1005
1024
1006 We've been trying to give you regular release on the last Friday of every month
1025 We've been trying to give you regular release on the last Friday of every month
1007 for a guaranty of rapid access to bug fixes and new features.
1026 for a guaranty of rapid access to bug fixes and new features.
1008
1027
1009 Unlike the previous first few releases that have seen only a couple of code
1028 Unlike the previous first few releases that have seen only a couple of code
1010 changes, 7.10 bring a number of changes, new features and bugfixes.
1029 changes, 7.10 bring a number of changes, new features and bugfixes.
1011
1030
1012 Stop Support for Python 3.5 – Adopt NEP 29
1031 Stop Support for Python 3.5 – Adopt NEP 29
1013 ------------------------------------------
1032 ------------------------------------------
1014
1033
1015 IPython has decided to follow the informational `NEP 29
1034 IPython has decided to follow the informational `NEP 29
1016 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_ which layout a clear
1035 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_ which layout a clear
1017 policy as to which version of (C)Python and NumPy are supported.
1036 policy as to which version of (C)Python and NumPy are supported.
1018
1037
1019 We thus dropped support for Python 3.5, and cleaned up a number of code path
1038 We thus dropped support for Python 3.5, and cleaned up a number of code path
1020 that were Python-version dependant. If you are on 3.5 or earlier pip should
1039 that were Python-version dependant. If you are on 3.5 or earlier pip should
1021 automatically give you the latest compatible version of IPython so you do not
1040 automatically give you the latest compatible version of IPython so you do not
1022 need to pin to a given version.
1041 need to pin to a given version.
1023
1042
1024 Support for Prompt Toolkit 3.0
1043 Support for Prompt Toolkit 3.0
1025 ------------------------------
1044 ------------------------------
1026
1045
1027 Prompt Toolkit 3.0 was release a week before IPython 7.10 and introduces a few
1046 Prompt Toolkit 3.0 was release a week before IPython 7.10 and introduces a few
1028 breaking changes. We believe IPython 7.10 should be compatible with both Prompt
1047 breaking changes. We believe IPython 7.10 should be compatible with both Prompt
1029 Toolkit 2.x and 3.x, though it has not been extensively tested with 3.x so
1048 Toolkit 2.x and 3.x, though it has not been extensively tested with 3.x so
1030 please report any issues.
1049 please report any issues.
1031
1050
1032
1051
1033 Prompt Rendering Performance improvements
1052 Prompt Rendering Performance improvements
1034 -----------------------------------------
1053 -----------------------------------------
1035
1054
1036 Pull Request :ghpull:`11933` introduced an optimisation in the prompt rendering
1055 Pull Request :ghpull:`11933` introduced an optimisation in the prompt rendering
1037 logic that should decrease the resource usage of IPython when using the
1056 logic that should decrease the resource usage of IPython when using the
1038 _default_ configuration but could potentially introduce a regression of
1057 _default_ configuration but could potentially introduce a regression of
1039 functionalities if you are using a custom prompt.
1058 functionalities if you are using a custom prompt.
1040
1059
1041 We know assume if you haven't changed the default keybindings that the prompt
1060 We know assume if you haven't changed the default keybindings that the prompt
1042 **will not change** during the duration of your input – which is for example
1061 **will not change** during the duration of your input – which is for example
1043 not true when using vi insert mode that switches between `[ins]` and `[nor]`
1062 not true when using vi insert mode that switches between `[ins]` and `[nor]`
1044 for the current mode.
1063 for the current mode.
1045
1064
1046 If you are experiencing any issue let us know.
1065 If you are experiencing any issue let us know.
1047
1066
1048 Code autoformatting
1067 Code autoformatting
1049 -------------------
1068 -------------------
1050
1069
1051 The IPython terminal can now auto format your code just before entering a new
1070 The IPython terminal can now auto format your code just before entering a new
1052 line or executing a command. To do so use the
1071 line or executing a command. To do so use the
1053 ``--TerminalInteractiveShell.autoformatter`` option and set it to ``'black'``;
1072 ``--TerminalInteractiveShell.autoformatter`` option and set it to ``'black'``;
1054 if black is installed IPython will use black to format your code when possible.
1073 if black is installed IPython will use black to format your code when possible.
1055
1074
1056 IPython cannot always properly format your code; in particular it will
1075 IPython cannot always properly format your code; in particular it will
1057 auto formatting with *black* will only work if:
1076 auto formatting with *black* will only work if:
1058
1077
1059 - Your code does not contains magics or special python syntax.
1078 - Your code does not contains magics or special python syntax.
1060
1079
1061 - There is no code after your cursor.
1080 - There is no code after your cursor.
1062
1081
1063 The Black API is also still in motion; so this may not work with all versions of
1082 The Black API is also still in motion; so this may not work with all versions of
1064 black.
1083 black.
1065
1084
1066 It should be possible to register custom formatter, though the API is till in
1085 It should be possible to register custom formatter, though the API is till in
1067 flux.
1086 flux.
1068
1087
1069 Arbitrary Mimetypes Handing in Terminal (Aka inline images in terminal)
1088 Arbitrary Mimetypes Handing in Terminal (Aka inline images in terminal)
1070 -----------------------------------------------------------------------
1089 -----------------------------------------------------------------------
1071
1090
1072 When using IPython terminal it is now possible to register function to handle
1091 When using IPython terminal it is now possible to register function to handle
1073 arbitrary mimetypes. While rendering non-text based representation was possible in
1092 arbitrary mimetypes. While rendering non-text based representation was possible in
1074 many jupyter frontend; it was not possible in terminal IPython, as usually
1093 many jupyter frontend; it was not possible in terminal IPython, as usually
1075 terminal are limited to displaying text. As many terminal these days provide
1094 terminal are limited to displaying text. As many terminal these days provide
1076 escape sequences to display non-text; bringing this loved feature to IPython CLI
1095 escape sequences to display non-text; bringing this loved feature to IPython CLI
1077 made a lot of sens. This functionality will not only allow inline images; but
1096 made a lot of sens. This functionality will not only allow inline images; but
1078 allow opening of external program; for example ``mplayer`` to "display" sound
1097 allow opening of external program; for example ``mplayer`` to "display" sound
1079 files.
1098 files.
1080
1099
1081 So far only the hooks necessary for this are in place, but no default mime
1100 So far only the hooks necessary for this are in place, but no default mime
1082 renderers added; so inline images will only be available via extensions. We will
1101 renderers added; so inline images will only be available via extensions. We will
1083 progressively enable these features by default in the next few releases, and
1102 progressively enable these features by default in the next few releases, and
1084 contribution is welcomed.
1103 contribution is welcomed.
1085
1104
1086 We welcome any feedback on the API. See :ref:`shell_mimerenderer` for more
1105 We welcome any feedback on the API. See :ref:`shell_mimerenderer` for more
1087 informations.
1106 informations.
1088
1107
1089 This is originally based on work form in :ghpull:`10610` from @stephanh42
1108 This is originally based on work form in :ghpull:`10610` from @stephanh42
1090 started over two years ago, and still a lot need to be done.
1109 started over two years ago, and still a lot need to be done.
1091
1110
1092 MISC
1111 MISC
1093 ----
1112 ----
1094
1113
1095 - Completions can define their own ordering :ghpull:`11855`
1114 - Completions can define their own ordering :ghpull:`11855`
1096 - Enable Plotting in the same cell than the one that import matplotlib
1115 - Enable Plotting in the same cell than the one that import matplotlib
1097 :ghpull:`11916`
1116 :ghpull:`11916`
1098 - Allow to store and restore multiple variables at once :ghpull:`11930`
1117 - Allow to store and restore multiple variables at once :ghpull:`11930`
1099
1118
1100 You can see `all pull-requests <https://github.com/ipython/ipython/pulls?q=is%3Apr+milestone%3A7.10+is%3Aclosed>`_ for this release.
1119 You can see `all pull-requests <https://github.com/ipython/ipython/pulls?q=is%3Apr+milestone%3A7.10+is%3Aclosed>`_ for this release.
1101
1120
1102 API Changes
1121 API Changes
1103 -----------
1122 -----------
1104
1123
1105 Change of API and exposed objects automatically detected using `frappuccino <https://pypi.org/project/frappuccino/>`_ (still in beta):
1124 Change of API and exposed objects automatically detected using `frappuccino <https://pypi.org/project/frappuccino/>`_ (still in beta):
1106
1125
1107 The following items are new in IPython 7.10::
1126 The following items are new in IPython 7.10::
1108
1127
1109 + IPython.terminal.shortcuts.reformat_text_before_cursor(buffer, document, shell)
1128 + IPython.terminal.shortcuts.reformat_text_before_cursor(buffer, document, shell)
1110 + IPython.terminal.interactiveshell.PTK3
1129 + IPython.terminal.interactiveshell.PTK3
1111 + IPython.terminal.interactiveshell.black_reformat_handler(text_before_cursor)
1130 + IPython.terminal.interactiveshell.black_reformat_handler(text_before_cursor)
1112 + IPython.terminal.prompts.RichPromptDisplayHook.write_format_data(self, format_dict, md_dict='None')
1131 + IPython.terminal.prompts.RichPromptDisplayHook.write_format_data(self, format_dict, md_dict='None')
1113
1132
1114 The following items have been removed in 7.10::
1133 The following items have been removed in 7.10::
1115
1134
1116 - IPython.lib.pretty.DICT_IS_ORDERED
1135 - IPython.lib.pretty.DICT_IS_ORDERED
1117
1136
1118 The following signatures differ between versions::
1137 The following signatures differ between versions::
1119
1138
1120 - IPython.extensions.storemagic.restore_aliases(ip)
1139 - IPython.extensions.storemagic.restore_aliases(ip)
1121 + IPython.extensions.storemagic.restore_aliases(ip, alias='None')
1140 + IPython.extensions.storemagic.restore_aliases(ip, alias='None')
1122
1141
1123 Special Thanks
1142 Special Thanks
1124 --------------
1143 --------------
1125
1144
1126 - @stephanh42 who started the work on inline images in terminal 2 years ago
1145 - @stephanh42 who started the work on inline images in terminal 2 years ago
1127 - @augustogoulart who spent a lot of time triaging issues and responding to
1146 - @augustogoulart who spent a lot of time triaging issues and responding to
1128 users.
1147 users.
1129 - @con-f-use who is my (@Carreau) first sponsor on GitHub, as a reminder if you
1148 - @con-f-use who is my (@Carreau) first sponsor on GitHub, as a reminder if you
1130 like IPython, Jupyter and many other library of the SciPy stack you can
1149 like IPython, Jupyter and many other library of the SciPy stack you can
1131 donate to numfocus.org non profit
1150 donate to numfocus.org non profit
1132
1151
1133 .. _version 790:
1152 .. _version 790:
1134
1153
1135 IPython 7.9.0
1154 IPython 7.9.0
1136 =============
1155 =============
1137
1156
1138 IPython 7.9 is a small release with a couple of improvement and bug fixes.
1157 IPython 7.9 is a small release with a couple of improvement and bug fixes.
1139
1158
1140 - Xterm terminal title should be restored on exit :ghpull:`11910`
1159 - Xterm terminal title should be restored on exit :ghpull:`11910`
1141 - special variables ``_``,``__``, ``___`` are not set anymore when cache size
1160 - special variables ``_``,``__``, ``___`` are not set anymore when cache size
1142 is 0 or less. :ghpull:`11877`
1161 is 0 or less. :ghpull:`11877`
1143 - Autoreload should have regained some speed by using a new heuristic logic to
1162 - Autoreload should have regained some speed by using a new heuristic logic to
1144 find all objects needing reload. This should avoid large objects traversal
1163 find all objects needing reload. This should avoid large objects traversal
1145 like pandas dataframes. :ghpull:`11876`
1164 like pandas dataframes. :ghpull:`11876`
1146 - Get ready for Python 4. :ghpull:`11874`
1165 - Get ready for Python 4. :ghpull:`11874`
1147 - `%env` Magic now has heuristic to hide potentially sensitive values :ghpull:`11896`
1166 - `%env` Magic now has heuristic to hide potentially sensitive values :ghpull:`11896`
1148
1167
1149 This is a small release despite a number of Pull Request Pending that need to
1168 This is a small release despite a number of Pull Request Pending that need to
1150 be reviewed/worked on. Many of the core developers have been busy outside of
1169 be reviewed/worked on. Many of the core developers have been busy outside of
1151 IPython/Jupyter and we thanks all contributor for their patience; we'll work on
1170 IPython/Jupyter and we thanks all contributor for their patience; we'll work on
1152 these as soon as we have time.
1171 these as soon as we have time.
1153
1172
1154
1173
1155 .. _version780:
1174 .. _version780:
1156
1175
1157 IPython 7.8.0
1176 IPython 7.8.0
1158 =============
1177 =============
1159
1178
1160 IPython 7.8.0 contain a few bugfix and 2 new APIs:
1179 IPython 7.8.0 contain a few bugfix and 2 new APIs:
1161
1180
1162 - Enable changing the font color for LaTeX rendering :ghpull:`11840`
1181 - Enable changing the font color for LaTeX rendering :ghpull:`11840`
1163 - and Re-Expose some PDB API (see below)
1182 - and Re-Expose some PDB API (see below)
1164
1183
1165 Expose Pdb API
1184 Expose Pdb API
1166 --------------
1185 --------------
1167
1186
1168 Expose the built-in ``pdb.Pdb`` API. ``Pdb`` constructor arguments are generically
1187 Expose the built-in ``pdb.Pdb`` API. ``Pdb`` constructor arguments are generically
1169 exposed, regardless of python version.
1188 exposed, regardless of python version.
1170 Newly exposed arguments:
1189 Newly exposed arguments:
1171
1190
1172 - ``skip`` - Python 3.1+
1191 - ``skip`` - Python 3.1+
1173 - ``nosiginnt`` - Python 3.2+
1192 - ``nosiginnt`` - Python 3.2+
1174 - ``readrc`` - Python 3.6+
1193 - ``readrc`` - Python 3.6+
1175
1194
1176 Try it out::
1195 Try it out::
1177
1196
1178 from IPython.terminal.debugger import TerminalPdb
1197 from IPython.terminal.debugger import TerminalPdb
1179 pdb = TerminalPdb(skip=["skipthismodule"])
1198 pdb = TerminalPdb(skip=["skipthismodule"])
1180
1199
1181
1200
1182 See :ghpull:`11840`
1201 See :ghpull:`11840`
1183
1202
1184 .. _version770:
1203 .. _version770:
1185
1204
1186 IPython 7.7.0
1205 IPython 7.7.0
1187 =============
1206 =============
1188
1207
1189 IPython 7.7.0 contain multiple bug fixes and documentation updates; Here are a
1208 IPython 7.7.0 contain multiple bug fixes and documentation updates; Here are a
1190 few of the outstanding issue fixed:
1209 few of the outstanding issue fixed:
1191
1210
1192 - Fix a bug introduced in 7.6 where the ``%matplotlib`` magic would fail on
1211 - Fix a bug introduced in 7.6 where the ``%matplotlib`` magic would fail on
1193 previously acceptable arguments :ghpull:`11814`.
1212 previously acceptable arguments :ghpull:`11814`.
1194 - Fix the manage location on freebsd :ghpull:`11808`.
1213 - Fix the manage location on freebsd :ghpull:`11808`.
1195 - Fix error message about aliases after ``%reset`` call in ipykernel
1214 - Fix error message about aliases after ``%reset`` call in ipykernel
1196 :ghpull:`11806`
1215 :ghpull:`11806`
1197 - Fix Duplication completions in emacs :ghpull:`11803`
1216 - Fix Duplication completions in emacs :ghpull:`11803`
1198
1217
1199 We are planning to adopt `NEP29 <https://github.com/numpy/numpy/pull/14086>`_
1218 We are planning to adopt `NEP29 <https://github.com/numpy/numpy/pull/14086>`_
1200 (still currently in draft) which may make this minor version of IPython the
1219 (still currently in draft) which may make this minor version of IPython the
1201 last one to support Python 3.5 and will make the code base more aggressive
1220 last one to support Python 3.5 and will make the code base more aggressive
1202 toward removing compatibility with older versions of Python.
1221 toward removing compatibility with older versions of Python.
1203
1222
1204 GitHub now support to give only "Triage" permissions to users; if you'd like to
1223 GitHub now support to give only "Triage" permissions to users; if you'd like to
1205 help close stale issues and labels issues please reach to us with your GitHub
1224 help close stale issues and labels issues please reach to us with your GitHub
1206 Username and we'll add you to the triage team. It is a great way to start
1225 Username and we'll add you to the triage team. It is a great way to start
1207 contributing and a path toward getting commit rights.
1226 contributing and a path toward getting commit rights.
1208
1227
1209 .. _version761:
1228 .. _version761:
1210
1229
1211 IPython 7.6.1
1230 IPython 7.6.1
1212 =============
1231 =============
1213
1232
1214 IPython 7.6.1 contain a critical bugfix in the ``%timeit`` magic, which would
1233 IPython 7.6.1 contain a critical bugfix in the ``%timeit`` magic, which would
1215 crash on some inputs as a side effect of :ghpull:`11716`. See :ghpull:`11812`
1234 crash on some inputs as a side effect of :ghpull:`11716`. See :ghpull:`11812`
1216
1235
1217
1236
1218 .. _whatsnew760:
1237 .. _whatsnew760:
1219
1238
1220 IPython 7.6.0
1239 IPython 7.6.0
1221 =============
1240 =============
1222
1241
1223 IPython 7.6.0 contains a couple of bug fixes and number of small features
1242 IPython 7.6.0 contains a couple of bug fixes and number of small features
1224 additions as well as some compatibility with the current development version of
1243 additions as well as some compatibility with the current development version of
1225 Python 3.8.
1244 Python 3.8.
1226
1245
1227 - Add a ``-l`` option to :magic:`psearch` to list the available search
1246 - Add a ``-l`` option to :magic:`psearch` to list the available search
1228 types. :ghpull:`11672`
1247 types. :ghpull:`11672`
1229 - Support ``PathLike`` for ``DisplayObject`` and ``Image``. :ghpull:`11764`
1248 - Support ``PathLike`` for ``DisplayObject`` and ``Image``. :ghpull:`11764`
1230 - Configurability of timeout in the test suite for slow platforms.
1249 - Configurability of timeout in the test suite for slow platforms.
1231 :ghpull:`11756`
1250 :ghpull:`11756`
1232 - Accept any casing for matplotlib backend. :ghpull:`121748`
1251 - Accept any casing for matplotlib backend. :ghpull:`121748`
1233 - Properly skip test that requires numpy to be installed :ghpull:`11723`
1252 - Properly skip test that requires numpy to be installed :ghpull:`11723`
1234 - More support for Python 3.8 and positional only arguments (pep570)
1253 - More support for Python 3.8 and positional only arguments (pep570)
1235 :ghpull:`11720`
1254 :ghpull:`11720`
1236 - Unicode names for the completion are loaded lazily on first use which
1255 - Unicode names for the completion are loaded lazily on first use which
1237 should decrease startup time. :ghpull:`11693`
1256 should decrease startup time. :ghpull:`11693`
1238 - Autoreload now update the types of reloaded objects; this for example allow
1257 - Autoreload now update the types of reloaded objects; this for example allow
1239 pickling of reloaded objects. :ghpull:`11644`
1258 pickling of reloaded objects. :ghpull:`11644`
1240 - Fix a bug where ``%%time`` magic would suppress cell output. :ghpull:`11716`
1259 - Fix a bug where ``%%time`` magic would suppress cell output. :ghpull:`11716`
1241
1260
1242
1261
1243 Prepare migration to pytest (instead of nose) for testing
1262 Prepare migration to pytest (instead of nose) for testing
1244 ---------------------------------------------------------
1263 ---------------------------------------------------------
1245
1264
1246 Most of the work between 7.5 and 7.6 was to prepare the migration from our
1265 Most of the work between 7.5 and 7.6 was to prepare the migration from our
1247 testing framework to pytest. Most of the test suite should now work by simply
1266 testing framework to pytest. Most of the test suite should now work by simply
1248 issuing ``pytest`` from the root of the repository.
1267 issuing ``pytest`` from the root of the repository.
1249
1268
1250 The migration to pytest is just at its beginning. Many of our test still rely
1269 The migration to pytest is just at its beginning. Many of our test still rely
1251 on IPython-specific plugins for nose using pytest (doctest using IPython syntax
1270 on IPython-specific plugins for nose using pytest (doctest using IPython syntax
1252 is one example of this where test appear as "passing", while no code has been
1271 is one example of this where test appear as "passing", while no code has been
1253 ran). Many test also need to be updated like ``yield-test`` to be properly
1272 ran). Many test also need to be updated like ``yield-test`` to be properly
1254 parametrized tests.
1273 parametrized tests.
1255
1274
1256 Migration to pytest allowed me to discover a number of issues in our test
1275 Migration to pytest allowed me to discover a number of issues in our test
1257 suite; which was hiding a number of subtle issues – or not actually running
1276 suite; which was hiding a number of subtle issues – or not actually running
1258 some of the tests in our test suite – I have thus corrected many of those; like
1277 some of the tests in our test suite – I have thus corrected many of those; like
1259 improperly closed resources; or used of deprecated features. I also made use of
1278 improperly closed resources; or used of deprecated features. I also made use of
1260 the ``pytest --durations=...`` to find some of our slowest test and speed them
1279 the ``pytest --durations=...`` to find some of our slowest test and speed them
1261 up (our test suite can now be up to 10% faster). Pytest as also a variety of
1280 up (our test suite can now be up to 10% faster). Pytest as also a variety of
1262 plugins and flags which will make the code quality of IPython and the testing
1281 plugins and flags which will make the code quality of IPython and the testing
1263 experience better.
1282 experience better.
1264
1283
1265 Misc
1284 Misc
1266 ----
1285 ----
1267
1286
1268 We skipped the release of 7.6 at the end of May, but will attempt to get back
1287 We skipped the release of 7.6 at the end of May, but will attempt to get back
1269 on schedule. We are starting to think about making introducing backward
1288 on schedule. We are starting to think about making introducing backward
1270 incompatible change and start the 8.0 series.
1289 incompatible change and start the 8.0 series.
1271
1290
1272 Special Thanks to Gabriel (@gpotter2 on GitHub), who among other took care many
1291 Special Thanks to Gabriel (@gpotter2 on GitHub), who among other took care many
1273 of the remaining task for 7.4 and 7.5, like updating the website.
1292 of the remaining task for 7.4 and 7.5, like updating the website.
1274
1293
1275 .. _whatsnew750:
1294 .. _whatsnew750:
1276
1295
1277 IPython 7.5.0
1296 IPython 7.5.0
1278 =============
1297 =============
1279
1298
1280 IPython 7.5.0 consist mostly of bug-fixes, and documentation updates, with one
1299 IPython 7.5.0 consist mostly of bug-fixes, and documentation updates, with one
1281 minor new feature. The `Audio` display element can now be assigned an element
1300 minor new feature. The `Audio` display element can now be assigned an element
1282 id when displayed in browser. See :ghpull:`11670`
1301 id when displayed in browser. See :ghpull:`11670`
1283
1302
1284 The major outstanding bug fix correct a change of behavior that was introduce
1303 The major outstanding bug fix correct a change of behavior that was introduce
1285 in 7.4.0 where some cell magics would not be able to access or modify global
1304 in 7.4.0 where some cell magics would not be able to access or modify global
1286 scope when using the ``@needs_local_scope`` decorator. This was typically
1305 scope when using the ``@needs_local_scope`` decorator. This was typically
1287 encountered with the ``%%time`` and ``%%timeit`` magics. See :ghissue:`11659`
1306 encountered with the ``%%time`` and ``%%timeit`` magics. See :ghissue:`11659`
1288 and :ghpull:`11698`.
1307 and :ghpull:`11698`.
1289
1308
1290 .. _whatsnew740:
1309 .. _whatsnew740:
1291
1310
1292 IPython 7.4.0
1311 IPython 7.4.0
1293 =============
1312 =============
1294
1313
1295 Unicode name completions
1314 Unicode name completions
1296 ------------------------
1315 ------------------------
1297
1316
1298 Previously, we provided completion for a unicode name with its relative symbol.
1317 Previously, we provided completion for a unicode name with its relative symbol.
1299 With this, now IPython provides complete suggestions to unicode name symbols.
1318 With this, now IPython provides complete suggestions to unicode name symbols.
1300
1319
1301 As on the PR, if user types ``\LAT<tab>``, IPython provides a list of
1320 As on the PR, if user types ``\LAT<tab>``, IPython provides a list of
1302 possible completions. In this case, it would be something like::
1321 possible completions. In this case, it would be something like::
1303
1322
1304 'LATIN CAPITAL LETTER A',
1323 'LATIN CAPITAL LETTER A',
1305 'LATIN CAPITAL LETTER B',
1324 'LATIN CAPITAL LETTER B',
1306 'LATIN CAPITAL LETTER C',
1325 'LATIN CAPITAL LETTER C',
1307 'LATIN CAPITAL LETTER D',
1326 'LATIN CAPITAL LETTER D',
1308 ....
1327 ....
1309
1328
1310 This help to type unicode character that do not have short latex aliases, and
1329 This help to type unicode character that do not have short latex aliases, and
1311 have long unicode names. for example ``Ν°``, ``\GREEK CAPITAL LETTER HETA``.
1330 have long unicode names. for example ``Ν°``, ``\GREEK CAPITAL LETTER HETA``.
1312
1331
1313 This feature was contributed by Luciana Marques :ghpull:`11583`.
1332 This feature was contributed by Luciana Marques :ghpull:`11583`.
1314
1333
1315 Make audio normalization optional
1334 Make audio normalization optional
1316 ---------------------------------
1335 ---------------------------------
1317
1336
1318 Added 'normalize' argument to `IPython.display.Audio`. This argument applies
1337 Added 'normalize' argument to `IPython.display.Audio`. This argument applies
1319 when audio data is given as an array of samples. The default of `normalize=True`
1338 when audio data is given as an array of samples. The default of `normalize=True`
1320 preserves prior behavior of normalizing the audio to the maximum possible range.
1339 preserves prior behavior of normalizing the audio to the maximum possible range.
1321 Setting to `False` disables normalization.
1340 Setting to `False` disables normalization.
1322
1341
1323
1342
1324 Miscellaneous
1343 Miscellaneous
1325 -------------
1344 -------------
1326
1345
1327 - Fix improper acceptation of ``return`` outside of functions. :ghpull:`11641`.
1346 - Fix improper acceptation of ``return`` outside of functions. :ghpull:`11641`.
1328 - Fixed PyQt 5.11 backwards incompatibility causing sip import failure.
1347 - Fixed PyQt 5.11 backwards incompatibility causing sip import failure.
1329 :ghpull:`11613`.
1348 :ghpull:`11613`.
1330 - Fix Bug where ``type?`` would crash IPython. :ghpull:`1608`.
1349 - Fix Bug where ``type?`` would crash IPython. :ghpull:`1608`.
1331 - Allow to apply ``@needs_local_scope`` to cell magics for convenience.
1350 - Allow to apply ``@needs_local_scope`` to cell magics for convenience.
1332 :ghpull:`11542`.
1351 :ghpull:`11542`.
1333
1352
1334 .. _whatsnew730:
1353 .. _whatsnew730:
1335
1354
1336 IPython 7.3.0
1355 IPython 7.3.0
1337 =============
1356 =============
1338
1357
1339 .. _whatsnew720:
1358 .. _whatsnew720:
1340
1359
1341 IPython 7.3.0 bring several bug fixes and small improvements that you will
1360 IPython 7.3.0 bring several bug fixes and small improvements that you will
1342 described bellow.
1361 described bellow.
1343
1362
1344 The biggest change to this release is the implementation of the ``%conda`` and
1363 The biggest change to this release is the implementation of the ``%conda`` and
1345 ``%pip`` magics, that will attempt to install packages in the **current
1364 ``%pip`` magics, that will attempt to install packages in the **current
1346 environment**. You may still need to restart your interpreter or kernel for the
1365 environment**. You may still need to restart your interpreter or kernel for the
1347 change to be taken into account, but it should simplify installation of packages
1366 change to be taken into account, but it should simplify installation of packages
1348 into remote environment. Installing using pip/conda from the command line is
1367 into remote environment. Installing using pip/conda from the command line is
1349 still the prefer method.
1368 still the prefer method.
1350
1369
1351 The ``%pip`` magic was already present, but was only printing a warning; now it
1370 The ``%pip`` magic was already present, but was only printing a warning; now it
1352 will actually forward commands to pip.
1371 will actually forward commands to pip.
1353
1372
1354 Misc bug fixes and improvements:
1373 Misc bug fixes and improvements:
1355
1374
1356 - Compatibility with Python 3.8.
1375 - Compatibility with Python 3.8.
1357 - Do not expand shell variable in execution magics, and added the
1376 - Do not expand shell variable in execution magics, and added the
1358 ``no_var_expand`` decorator for magic requiring a similar functionality
1377 ``no_var_expand`` decorator for magic requiring a similar functionality
1359 :ghpull:`11516`
1378 :ghpull:`11516`
1360 - Add ``%pip`` and ``%conda`` magic :ghpull:`11524`
1379 - Add ``%pip`` and ``%conda`` magic :ghpull:`11524`
1361 - Re-initialize posix aliases after a ``%reset`` :ghpull:`11528`
1380 - Re-initialize posix aliases after a ``%reset`` :ghpull:`11528`
1362 - Allow the IPython command line to run ``*.ipynb`` files :ghpull:`11529`
1381 - Allow the IPython command line to run ``*.ipynb`` files :ghpull:`11529`
1363
1382
1364 IPython 7.2.0
1383 IPython 7.2.0
1365 =============
1384 =============
1366
1385
1367 IPython 7.2.0 brings minor bugfixes, improvements, and new configuration options:
1386 IPython 7.2.0 brings minor bugfixes, improvements, and new configuration options:
1368
1387
1369 - Fix a bug preventing PySide2 GUI integration from working :ghpull:`11464`
1388 - Fix a bug preventing PySide2 GUI integration from working :ghpull:`11464`
1370 - Run CI on Mac OS ! :ghpull:`11471`
1389 - Run CI on Mac OS ! :ghpull:`11471`
1371 - Fix IPython "Demo" mode. :ghpull:`11498`
1390 - Fix IPython "Demo" mode. :ghpull:`11498`
1372 - Fix ``%run`` magic with path in name :ghpull:`11499`
1391 - Fix ``%run`` magic with path in name :ghpull:`11499`
1373 - Fix: add CWD to sys.path *after* stdlib :ghpull:`11502`
1392 - Fix: add CWD to sys.path *after* stdlib :ghpull:`11502`
1374 - Better rendering of signatures, especially long ones. :ghpull:`11505`
1393 - Better rendering of signatures, especially long ones. :ghpull:`11505`
1375 - Re-enable jedi by default if it's installed :ghpull:`11506`
1394 - Re-enable jedi by default if it's installed :ghpull:`11506`
1376 - Add New ``minimal`` exception reporting mode (useful for educational purpose). See :ghpull:`11509`
1395 - Add New ``minimal`` exception reporting mode (useful for educational purpose). See :ghpull:`11509`
1377
1396
1378
1397
1379 Added ability to show subclasses when using pinfo and other utilities
1398 Added ability to show subclasses when using pinfo and other utilities
1380 ---------------------------------------------------------------------
1399 ---------------------------------------------------------------------
1381
1400
1382 When using ``?``/``??`` on a class, IPython will now list the first 10 subclasses.
1401 When using ``?``/``??`` on a class, IPython will now list the first 10 subclasses.
1383
1402
1384 Special Thanks to Chris Mentzel of the Moore Foundation for this feature. Chris
1403 Special Thanks to Chris Mentzel of the Moore Foundation for this feature. Chris
1385 is one of the people who played a critical role in IPython/Jupyter getting
1404 is one of the people who played a critical role in IPython/Jupyter getting
1386 funding.
1405 funding.
1387
1406
1388 We are grateful for all the help Chris has given us over the years,
1407 We are grateful for all the help Chris has given us over the years,
1389 and we're now proud to have code contributed by Chris in IPython.
1408 and we're now proud to have code contributed by Chris in IPython.
1390
1409
1391 OSMagics.cd_force_quiet configuration option
1410 OSMagics.cd_force_quiet configuration option
1392 --------------------------------------------
1411 --------------------------------------------
1393
1412
1394 You can set this option to force the %cd magic to behave as if ``-q`` was passed:
1413 You can set this option to force the %cd magic to behave as if ``-q`` was passed:
1395 ::
1414 ::
1396
1415
1397 In [1]: cd /
1416 In [1]: cd /
1398 /
1417 /
1399
1418
1400 In [2]: %config OSMagics.cd_force_quiet = True
1419 In [2]: %config OSMagics.cd_force_quiet = True
1401
1420
1402 In [3]: cd /tmp
1421 In [3]: cd /tmp
1403
1422
1404 In [4]:
1423 In [4]:
1405
1424
1406 See :ghpull:`11491`
1425 See :ghpull:`11491`
1407
1426
1408 In vi editing mode, whether the prompt includes the current vi mode can now be configured
1427 In vi editing mode, whether the prompt includes the current vi mode can now be configured
1409 -----------------------------------------------------------------------------------------
1428 -----------------------------------------------------------------------------------------
1410
1429
1411 Set the ``TerminalInteractiveShell.prompt_includes_vi_mode`` to a boolean value
1430 Set the ``TerminalInteractiveShell.prompt_includes_vi_mode`` to a boolean value
1412 (default: True) to control this feature. See :ghpull:`11492`
1431 (default: True) to control this feature. See :ghpull:`11492`
1413
1432
1414 .. _whatsnew710:
1433 .. _whatsnew710:
1415
1434
1416 IPython 7.1.0
1435 IPython 7.1.0
1417 =============
1436 =============
1418
1437
1419 IPython 7.1.0 is the first minor release after 7.0.0 and mostly brings fixes to
1438 IPython 7.1.0 is the first minor release after 7.0.0 and mostly brings fixes to
1420 new features, internal refactoring, and fixes for regressions that happened during the 6.x->7.x
1439 new features, internal refactoring, and fixes for regressions that happened during the 6.x->7.x
1421 transition. It also brings **Compatibility with Python 3.7.1**, as we're
1440 transition. It also brings **Compatibility with Python 3.7.1**, as we're
1422 unwillingly relying on a bug in CPython.
1441 unwillingly relying on a bug in CPython.
1423
1442
1424 New Core Dev:
1443 New Core Dev:
1425
1444
1426 - We welcome Jonathan Slenders to the commiters. Jonathan has done a fantastic
1445 - We welcome Jonathan Slenders to the commiters. Jonathan has done a fantastic
1427 work on prompt_toolkit, and we'd like to recognise his impact by giving him
1446 work on prompt_toolkit, and we'd like to recognise his impact by giving him
1428 commit rights. :ghissue:`11397`
1447 commit rights. :ghissue:`11397`
1429
1448
1430 Notable Changes
1449 Notable Changes
1431
1450
1432 - Major update of "latex to unicode" tab completion map (see below)
1451 - Major update of "latex to unicode" tab completion map (see below)
1433
1452
1434 Notable New Features:
1453 Notable New Features:
1435
1454
1436 - Restore functionality and documentation of the **sphinx directive**, which
1455 - Restore functionality and documentation of the **sphinx directive**, which
1437 is now stricter (fail on error by daefault), has new configuration options,
1456 is now stricter (fail on error by daefault), has new configuration options,
1438 has a brand new documentation page :ref:`ipython_directive` (which needs
1457 has a brand new documentation page :ref:`ipython_directive` (which needs
1439 some cleanup). It is also now *tested* so we hope to have less regressions.
1458 some cleanup). It is also now *tested* so we hope to have less regressions.
1440 :ghpull:`11402`
1459 :ghpull:`11402`
1441
1460
1442 - ``IPython.display.Video`` now supports ``width`` and ``height`` arguments,
1461 - ``IPython.display.Video`` now supports ``width`` and ``height`` arguments,
1443 allowing a custom width and height to be set instead of using the video's
1462 allowing a custom width and height to be set instead of using the video's
1444 width and height. :ghpull:`11353`
1463 width and height. :ghpull:`11353`
1445
1464
1446 - Warn when using ``HTML('<iframe>')`` instead of ``IFrame`` :ghpull:`11350`
1465 - Warn when using ``HTML('<iframe>')`` instead of ``IFrame`` :ghpull:`11350`
1447
1466
1448 - Allow Dynamic switching of editing mode between vi/emacs and show
1467 - Allow Dynamic switching of editing mode between vi/emacs and show
1449 normal/input mode in prompt when using vi. :ghpull:`11390`. Use ``%config
1468 normal/input mode in prompt when using vi. :ghpull:`11390`. Use ``%config
1450 TerminalInteractiveShell.editing_mode = 'vi'`` or ``%config
1469 TerminalInteractiveShell.editing_mode = 'vi'`` or ``%config
1451 TerminalInteractiveShell.editing_mode = 'emacs'`` to dynamically switch
1470 TerminalInteractiveShell.editing_mode = 'emacs'`` to dynamically switch
1452 between modes.
1471 between modes.
1453
1472
1454
1473
1455 Notable Fixes:
1474 Notable Fixes:
1456
1475
1457 - Fix entering of **multi-line blocks in terminal** IPython, and various
1476 - Fix entering of **multi-line blocks in terminal** IPython, and various
1458 crashes in the new input transformation machinery :ghpull:`11354`,
1477 crashes in the new input transformation machinery :ghpull:`11354`,
1459 :ghpull:`11356`, :ghpull:`11358`. These also fix a **Compatibility bug
1478 :ghpull:`11356`, :ghpull:`11358`. These also fix a **Compatibility bug
1460 with Python 3.7.1**.
1479 with Python 3.7.1**.
1461
1480
1462 - Fix moving through generator stack in ipdb :ghpull:`11266`
1481 - Fix moving through generator stack in ipdb :ghpull:`11266`
1463
1482
1464 - %Magic command arguments now support quoting. :ghpull:`11330`
1483 - %Magic command arguments now support quoting. :ghpull:`11330`
1465
1484
1466 - Re-add ``rprint`` and ``rprinte`` aliases. :ghpull:`11331`
1485 - Re-add ``rprint`` and ``rprinte`` aliases. :ghpull:`11331`
1467
1486
1468 - Remove implicit dependency on ``ipython_genutils`` :ghpull:`11317`
1487 - Remove implicit dependency on ``ipython_genutils`` :ghpull:`11317`
1469
1488
1470 - Make ``nonlocal`` raise ``SyntaxError`` instead of silently failing in async
1489 - Make ``nonlocal`` raise ``SyntaxError`` instead of silently failing in async
1471 mode. :ghpull:`11382`
1490 mode. :ghpull:`11382`
1472
1491
1473 - Fix mishandling of magics and ``= !`` assignment just after a dedent in
1492 - Fix mishandling of magics and ``= !`` assignment just after a dedent in
1474 nested code blocks :ghpull:`11418`
1493 nested code blocks :ghpull:`11418`
1475
1494
1476 - Fix instructions for custom shortcuts :ghpull:`11426`
1495 - Fix instructions for custom shortcuts :ghpull:`11426`
1477
1496
1478
1497
1479 Notable Internals improvements:
1498 Notable Internals improvements:
1480
1499
1481 - Use of ``os.scandir`` (Python 3 only) to speed up some file system operations.
1500 - Use of ``os.scandir`` (Python 3 only) to speed up some file system operations.
1482 :ghpull:`11365`
1501 :ghpull:`11365`
1483
1502
1484 - use ``perf_counter`` instead of ``clock`` for more precise
1503 - use ``perf_counter`` instead of ``clock`` for more precise
1485 timing results with ``%time`` :ghpull:`11376`
1504 timing results with ``%time`` :ghpull:`11376`
1486
1505
1487 Many thanks to all the contributors and in particular to ``bartskowron`` and
1506 Many thanks to all the contributors and in particular to ``bartskowron`` and
1488 ``tonyfast`` who handled some pretty complicated bugs in the input machinery. We
1507 ``tonyfast`` who handled some pretty complicated bugs in the input machinery. We
1489 had a number of first time contributors and maybe hacktoberfest participants that
1508 had a number of first time contributors and maybe hacktoberfest participants that
1490 made significant contributions and helped us free some time to focus on more
1509 made significant contributions and helped us free some time to focus on more
1491 complicated bugs.
1510 complicated bugs.
1492
1511
1493 You
1512 You
1494 can see all the closed issues and Merged PR, new features and fixes `here
1513 can see all the closed issues and Merged PR, new features and fixes `here
1495 <https://github.com/ipython/ipython/issues?utf8=%E2%9C%93&q=+is%3Aclosed+milestone%3A7.1+>`_.
1514 <https://github.com/ipython/ipython/issues?utf8=%E2%9C%93&q=+is%3Aclosed+milestone%3A7.1+>`_.
1496
1515
1497 Unicode Completion update
1516 Unicode Completion update
1498 -------------------------
1517 -------------------------
1499
1518
1500 In IPython 7.1 the Unicode completion map has been updated and synchronized with
1519 In IPython 7.1 the Unicode completion map has been updated and synchronized with
1501 the Julia language.
1520 the Julia language.
1502
1521
1503 Added and removed character characters:
1522 Added and removed character characters:
1504
1523
1505 ``\jmath`` (``Θ·``), ``\\underleftrightarrow`` (U+034D, combining) have been
1524 ``\jmath`` (``Θ·``), ``\\underleftrightarrow`` (U+034D, combining) have been
1506 added, while ``\\textasciicaron`` have been removed
1525 added, while ``\\textasciicaron`` have been removed
1507
1526
1508 Some sequences have seen their prefix removed:
1527 Some sequences have seen their prefix removed:
1509
1528
1510 - 6 characters ``\text...<tab>`` should now be inputed with ``\...<tab>`` directly,
1529 - 6 characters ``\text...<tab>`` should now be inputed with ``\...<tab>`` directly,
1511 - 45 characters ``\Elz...<tab>`` should now be inputed with ``\...<tab>`` directly,
1530 - 45 characters ``\Elz...<tab>`` should now be inputed with ``\...<tab>`` directly,
1512 - 65 characters ``\B...<tab>`` should now be inputed with ``\...<tab>`` directly,
1531 - 65 characters ``\B...<tab>`` should now be inputed with ``\...<tab>`` directly,
1513 - 450 characters ``\m...<tab>`` should now be inputed with ``\...<tab>`` directly,
1532 - 450 characters ``\m...<tab>`` should now be inputed with ``\...<tab>`` directly,
1514
1533
1515 Some sequences have seen their prefix shortened:
1534 Some sequences have seen their prefix shortened:
1516
1535
1517 - 5 characters ``\mitBbb...<tab>`` should now be inputed with ``\bbi...<tab>`` directly,
1536 - 5 characters ``\mitBbb...<tab>`` should now be inputed with ``\bbi...<tab>`` directly,
1518 - 52 characters ``\mit...<tab>`` should now be inputed with ``\i...<tab>`` directly,
1537 - 52 characters ``\mit...<tab>`` should now be inputed with ``\i...<tab>`` directly,
1519 - 216 characters ``\mbfit...<tab>`` should now be inputed with ``\bi...<tab>`` directly,
1538 - 216 characters ``\mbfit...<tab>`` should now be inputed with ``\bi...<tab>`` directly,
1520 - 222 characters ``\mbf...<tab>`` should now be inputed with ``\b...<tab>`` directly,
1539 - 222 characters ``\mbf...<tab>`` should now be inputed with ``\b...<tab>`` directly,
1521
1540
1522 A couple of characters had their sequence simplified:
1541 A couple of characters had their sequence simplified:
1523
1542
1524 - ``Γ°``, type ``\dh<tab>``, instead of ``\eth<tab>``
1543 - ``Γ°``, type ``\dh<tab>``, instead of ``\eth<tab>``
1525 - ``Δ§``, type ``\hbar<tab>``, instead of ``\Elzxh<tab>``
1544 - ``Δ§``, type ``\hbar<tab>``, instead of ``\Elzxh<tab>``
1526 - ``ΙΈ``, type ``\ltphi<tab>``, instead of ``\textphi<tab>``
1545 - ``ΙΈ``, type ``\ltphi<tab>``, instead of ``\textphi<tab>``
1527 - ``Ο΄``, type ``\varTheta<tab>``, instead of ``\textTheta<tab>``
1546 - ``Ο΄``, type ``\varTheta<tab>``, instead of ``\textTheta<tab>``
1528 - ``ℇ``, type ``\eulermascheroni<tab>``, instead of ``\Eulerconst<tab>``
1547 - ``ℇ``, type ``\eulermascheroni<tab>``, instead of ``\Eulerconst<tab>``
1529 - ``β„Ž``, type ``\planck<tab>``, instead of ``\Planckconst<tab>``
1548 - ``β„Ž``, type ``\planck<tab>``, instead of ``\Planckconst<tab>``
1530
1549
1531 - U+0336 (COMBINING LONG STROKE OVERLAY), type ``\strike<tab>``, instead of ``\Elzbar<tab>``.
1550 - U+0336 (COMBINING LONG STROKE OVERLAY), type ``\strike<tab>``, instead of ``\Elzbar<tab>``.
1532
1551
1533 A couple of sequences have been updated:
1552 A couple of sequences have been updated:
1534
1553
1535 - ``\varepsilon`` now gives ``Ι›`` (GREEK SMALL LETTER EPSILON) instead of ``Ξ΅`` (GREEK LUNATE EPSILON SYMBOL),
1554 - ``\varepsilon`` now gives ``Ι›`` (GREEK SMALL LETTER EPSILON) instead of ``Ξ΅`` (GREEK LUNATE EPSILON SYMBOL),
1536 - ``\underbar`` now gives U+0331 (COMBINING MACRON BELOW) instead of U+0332 (COMBINING LOW LINE).
1555 - ``\underbar`` now gives U+0331 (COMBINING MACRON BELOW) instead of U+0332 (COMBINING LOW LINE).
1537
1556
1538
1557
1539 .. _whatsnew700:
1558 .. _whatsnew700:
1540
1559
1541 IPython 7.0.0
1560 IPython 7.0.0
1542 =============
1561 =============
1543
1562
1544 Released Thursday September 27th, 2018
1563 Released Thursday September 27th, 2018
1545
1564
1546 IPython 7 includes major feature improvements.
1565 IPython 7 includes major feature improvements.
1547 This is also the second major version of IPython to support only
1566 This is also the second major version of IPython to support only
1548 Python 3 – starting at Python 3.4. Python 2 is still community-supported
1567 Python 3 – starting at Python 3.4. Python 2 is still community-supported
1549 on the bugfix only 5.x branch, but we remind you that Python 2 "end of life"
1568 on the bugfix only 5.x branch, but we remind you that Python 2 "end of life"
1550 is on Jan 1st 2020.
1569 is on Jan 1st 2020.
1551
1570
1552 We were able to backport bug fixes to the 5.x branch thanks to our backport bot which
1571 We were able to backport bug fixes to the 5.x branch thanks to our backport bot which
1553 backported more than `70 Pull-Requests
1572 backported more than `70 Pull-Requests
1554 <https://github.com/ipython/ipython/pulls?page=3&q=is%3Apr+sort%3Aupdated-desc+author%3Aapp%2Fmeeseeksdev++5.x&utf8=%E2%9C%93>`_, but there are still many PRs that required manual work. This is an area of the project where you can easily contribute by looking for `PRs that still need manual backport <https://github.com/ipython/ipython/issues?q=label%3A%22Still+Needs+Manual+Backport%22+is%3Aclosed+sort%3Aupdated-desc>`_
1573 <https://github.com/ipython/ipython/pulls?page=3&q=is%3Apr+sort%3Aupdated-desc+author%3Aapp%2Fmeeseeksdev++5.x&utf8=%E2%9C%93>`_, but there are still many PRs that required manual work. This is an area of the project where you can easily contribute by looking for `PRs that still need manual backport <https://github.com/ipython/ipython/issues?q=label%3A%22Still+Needs+Manual+Backport%22+is%3Aclosed+sort%3Aupdated-desc>`_
1555
1574
1556 The IPython 6.x branch will likely not see any further release unless critical
1575 The IPython 6.x branch will likely not see any further release unless critical
1557 bugs are found.
1576 bugs are found.
1558
1577
1559 Make sure you have pip > 9.0 before upgrading. You should be able to update by running:
1578 Make sure you have pip > 9.0 before upgrading. You should be able to update by running:
1560
1579
1561 .. code::
1580 .. code::
1562
1581
1563 pip install ipython --upgrade
1582 pip install ipython --upgrade
1564
1583
1565 .. only:: ipydev
1584 .. only:: ipydev
1566
1585
1567 If you are trying to install or update an ``alpha``, ``beta``, or ``rc``
1586 If you are trying to install or update an ``alpha``, ``beta``, or ``rc``
1568 version, use pip ``--pre`` flag.
1587 version, use pip ``--pre`` flag.
1569
1588
1570 .. code::
1589 .. code::
1571
1590
1572 pip install ipython --upgrade --pre
1591 pip install ipython --upgrade --pre
1573
1592
1574
1593
1575 Or, if you have conda installed:
1594 Or, if you have conda installed:
1576
1595
1577 .. code::
1596 .. code::
1578
1597
1579 conda install ipython
1598 conda install ipython
1580
1599
1581
1600
1582
1601
1583 Prompt Toolkit 2.0
1602 Prompt Toolkit 2.0
1584 ------------------
1603 ------------------
1585
1604
1586 IPython 7.0+ now uses ``prompt_toolkit 2.0``. If you still need to use an earlier
1605 IPython 7.0+ now uses ``prompt_toolkit 2.0``. If you still need to use an earlier
1587 ``prompt_toolkit`` version, you may need to pin IPython to ``<7.0``.
1606 ``prompt_toolkit`` version, you may need to pin IPython to ``<7.0``.
1588
1607
1589 Autowait: Asynchronous REPL
1608 Autowait: Asynchronous REPL
1590 ---------------------------
1609 ---------------------------
1591
1610
1592 Staring with IPython 7.0 on Python 3.6+, IPython can automatically ``await``
1611 Staring with IPython 7.0 on Python 3.6+, IPython can automatically ``await``
1593 top level code. You should not need to access an event loop or runner
1612 top level code. You should not need to access an event loop or runner
1594 yourself. To learn more, read the :ref:`autoawait` section of our docs, see
1613 yourself. To learn more, read the :ref:`autoawait` section of our docs, see
1595 :ghpull:`11265`, or try the following code::
1614 :ghpull:`11265`, or try the following code::
1596
1615
1597 Python 3.6.0
1616 Python 3.6.0
1598 Type 'copyright', 'credits' or 'license' for more information
1617 Type 'copyright', 'credits' or 'license' for more information
1599 IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help.
1618 IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help.
1600
1619
1601 In [1]: import aiohttp
1620 In [1]: import aiohttp
1602 ...: result = aiohttp.get('https://api.github.com')
1621 ...: result = aiohttp.get('https://api.github.com')
1603
1622
1604 In [2]: response = await result
1623 In [2]: response = await result
1605 <pause for a few 100s ms>
1624 <pause for a few 100s ms>
1606
1625
1607 In [3]: await response.json()
1626 In [3]: await response.json()
1608 Out[3]:
1627 Out[3]:
1609 {'authorizations_url': 'https://api.github.com/authorizations',
1628 {'authorizations_url': 'https://api.github.com/authorizations',
1610 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}',
1629 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}',
1611 ...
1630 ...
1612 }
1631 }
1613
1632
1614 .. note::
1633 .. note::
1615
1634
1616 Async integration is experimental code, behavior may change or be removed
1635 Async integration is experimental code, behavior may change or be removed
1617 between Python and IPython versions without warnings.
1636 between Python and IPython versions without warnings.
1618
1637
1619 Integration is by default with `asyncio`, but other libraries can be configured --
1638 Integration is by default with `asyncio`, but other libraries can be configured --
1620 like ``curio`` or ``trio`` -- to improve concurrency in the REPL::
1639 like ``curio`` or ``trio`` -- to improve concurrency in the REPL::
1621
1640
1622 In [1]: %autoawait trio
1641 In [1]: %autoawait trio
1623
1642
1624 In [2]: import trio
1643 In [2]: import trio
1625
1644
1626 In [3]: async def child(i):
1645 In [3]: async def child(i):
1627 ...: print(" child %s goes to sleep"%i)
1646 ...: print(" child %s goes to sleep"%i)
1628 ...: await trio.sleep(2)
1647 ...: await trio.sleep(2)
1629 ...: print(" child %s wakes up"%i)
1648 ...: print(" child %s wakes up"%i)
1630
1649
1631 In [4]: print('parent start')
1650 In [4]: print('parent start')
1632 ...: async with trio.open_nursery() as n:
1651 ...: async with trio.open_nursery() as n:
1633 ...: for i in range(3):
1652 ...: for i in range(3):
1634 ...: n.spawn(child, i)
1653 ...: n.spawn(child, i)
1635 ...: print('parent end')
1654 ...: print('parent end')
1636 parent start
1655 parent start
1637 child 2 goes to sleep
1656 child 2 goes to sleep
1638 child 0 goes to sleep
1657 child 0 goes to sleep
1639 child 1 goes to sleep
1658 child 1 goes to sleep
1640 <about 2 seconds pause>
1659 <about 2 seconds pause>
1641 child 2 wakes up
1660 child 2 wakes up
1642 child 1 wakes up
1661 child 1 wakes up
1643 child 0 wakes up
1662 child 0 wakes up
1644 parent end
1663 parent end
1645
1664
1646 See :ref:`autoawait` for more information.
1665 See :ref:`autoawait` for more information.
1647
1666
1648
1667
1649 Asynchronous code in a Notebook interface or any other frontend using the
1668 Asynchronous code in a Notebook interface or any other frontend using the
1650 Jupyter Protocol will require further updates to the IPykernel package.
1669 Jupyter Protocol will require further updates to the IPykernel package.
1651
1670
1652 Non-Asynchronous code
1671 Non-Asynchronous code
1653 ~~~~~~~~~~~~~~~~~~~~~
1672 ~~~~~~~~~~~~~~~~~~~~~
1654
1673
1655 As the internal API of IPython is now asynchronous, IPython needs to run under
1674 As the internal API of IPython is now asynchronous, IPython needs to run under
1656 an event loop. In order to allow many workflows, (like using the :magic:`%run`
1675 an event loop. In order to allow many workflows, (like using the :magic:`%run`
1657 magic, or copy-pasting code that explicitly starts/stop event loop), when
1676 magic, or copy-pasting code that explicitly starts/stop event loop), when
1658 top-level code is detected as not being asynchronous, IPython code is advanced
1677 top-level code is detected as not being asynchronous, IPython code is advanced
1659 via a pseudo-synchronous runner, and may not advance pending tasks.
1678 via a pseudo-synchronous runner, and may not advance pending tasks.
1660
1679
1661 Change to Nested Embed
1680 Change to Nested Embed
1662 ~~~~~~~~~~~~~~~~~~~~~~
1681 ~~~~~~~~~~~~~~~~~~~~~~
1663
1682
1664 The introduction of the ability to run async code had some effect on the
1683 The introduction of the ability to run async code had some effect on the
1665 ``IPython.embed()`` API. By default, embed will not allow you to run asynchronous
1684 ``IPython.embed()`` API. By default, embed will not allow you to run asynchronous
1666 code unless an event loop is specified.
1685 code unless an event loop is specified.
1667
1686
1668 Effects on Magics
1687 Effects on Magics
1669 ~~~~~~~~~~~~~~~~~
1688 ~~~~~~~~~~~~~~~~~
1670
1689
1671 Some magics will not work with async until they're updated.
1690 Some magics will not work with async until they're updated.
1672 Contributions welcome.
1691 Contributions welcome.
1673
1692
1674 Expected Future changes
1693 Expected Future changes
1675 ~~~~~~~~~~~~~~~~~~~~~~~
1694 ~~~~~~~~~~~~~~~~~~~~~~~
1676
1695
1677 We expect more internal but public IPython functions to become ``async``, and
1696 We expect more internal but public IPython functions to become ``async``, and
1678 will likely end up having a persistent event loop while IPython is running.
1697 will likely end up having a persistent event loop while IPython is running.
1679
1698
1680 Thanks
1699 Thanks
1681 ~~~~~~
1700 ~~~~~~
1682
1701
1683 This release took more than a year in the making.
1702 This release took more than a year in the making.
1684 The code was rebased a number of
1703 The code was rebased a number of
1685 times; leading to commit authorship that may have been lost in the final
1704 times; leading to commit authorship that may have been lost in the final
1686 Pull-Request. Huge thanks to many people for contribution, discussion, code,
1705 Pull-Request. Huge thanks to many people for contribution, discussion, code,
1687 documentation, use-cases: dalejung, danielballan, ellisonbg, fperez, gnestor,
1706 documentation, use-cases: dalejung, danielballan, ellisonbg, fperez, gnestor,
1688 minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many others.
1707 minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many others.
1689
1708
1690
1709
1691 Autoreload Improvement
1710 Autoreload Improvement
1692 ----------------------
1711 ----------------------
1693
1712
1694 The magic :magic:`%autoreload 2 <autoreload>` now captures new methods added to
1713 The magic :magic:`%autoreload 2 <autoreload>` now captures new methods added to
1695 classes. Earlier, only methods existing as of the initial import were being
1714 classes. Earlier, only methods existing as of the initial import were being
1696 tracked and updated.
1715 tracked and updated.
1697
1716
1698 This new feature helps dual environment development - Jupyter+IDE - where the
1717 This new feature helps dual environment development - Jupyter+IDE - where the
1699 code gradually moves from notebook cells to package files as it gets
1718 code gradually moves from notebook cells to package files as it gets
1700 structured.
1719 structured.
1701
1720
1702 **Example**: An instance of the class ``MyClass`` will be able to access the
1721 **Example**: An instance of the class ``MyClass`` will be able to access the
1703 method ``cube()`` after it is uncommented and the file ``file1.py`` is saved on
1722 method ``cube()`` after it is uncommented and the file ``file1.py`` is saved on
1704 disk.
1723 disk.
1705
1724
1706
1725
1707 .. code::
1726 .. code::
1708
1727
1709 # notebook
1728 # notebook
1710
1729
1711 from mymodule import MyClass
1730 from mymodule import MyClass
1712 first = MyClass(5)
1731 first = MyClass(5)
1713
1732
1714 .. code::
1733 .. code::
1715
1734
1716 # mymodule/file1.py
1735 # mymodule/file1.py
1717
1736
1718 class MyClass:
1737 class MyClass:
1719
1738
1720 def __init__(self, a=10):
1739 def __init__(self, a=10):
1721 self.a = a
1740 self.a = a
1722
1741
1723 def square(self):
1742 def square(self):
1724 print('compute square')
1743 print('compute square')
1725 return self.a*self.a
1744 return self.a*self.a
1726
1745
1727 # def cube(self):
1746 # def cube(self):
1728 # print('compute cube')
1747 # print('compute cube')
1729 # return self.a*self.a*self.a
1748 # return self.a*self.a*self.a
1730
1749
1731
1750
1732
1751
1733
1752
1734 Misc
1753 Misc
1735 ----
1754 ----
1736
1755
1737 The autoindent feature that was deprecated in 5.x was re-enabled and
1756 The autoindent feature that was deprecated in 5.x was re-enabled and
1738 un-deprecated in :ghpull:`11257`
1757 un-deprecated in :ghpull:`11257`
1739
1758
1740 Make :magic:`%run -n -i ... <run>` work correctly. Earlier, if :magic:`%run` was
1759 Make :magic:`%run -n -i ... <run>` work correctly. Earlier, if :magic:`%run` was
1741 passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308`
1760 passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308`
1742
1761
1743
1762
1744 The :cellmagic:`%%script` (as well as :cellmagic:`%%bash`,
1763 The :cellmagic:`%%script` (as well as :cellmagic:`%%bash`,
1745 :cellmagic:`%%ruby`... ) cell magics now raise by default if the return code of
1764 :cellmagic:`%%ruby`... ) cell magics now raise by default if the return code of
1746 the given code is non-zero (thus halting execution of further cells in a
1765 the given code is non-zero (thus halting execution of further cells in a
1747 notebook). The behavior can be disable by passing the ``--no-raise-error`` flag.
1766 notebook). The behavior can be disable by passing the ``--no-raise-error`` flag.
1748
1767
1749
1768
1750 Deprecations
1769 Deprecations
1751 ------------
1770 ------------
1752
1771
1753 A couple of unused functions and methods have been deprecated and will be removed
1772 A couple of unused functions and methods have been deprecated and will be removed
1754 in future versions:
1773 in future versions:
1755
1774
1756 - ``IPython.utils.io.raw_print_err``
1775 - ``IPython.utils.io.raw_print_err``
1757 - ``IPython.utils.io.raw_print``
1776 - ``IPython.utils.io.raw_print``
1758
1777
1759
1778
1760 Backwards incompatible changes
1779 Backwards incompatible changes
1761 ------------------------------
1780 ------------------------------
1762
1781
1763 * The API for transforming input before it is parsed as Python code has been
1782 * The API for transforming input before it is parsed as Python code has been
1764 completely redesigned: any custom input transformations will need to be
1783 completely redesigned: any custom input transformations will need to be
1765 rewritten. See :doc:`/config/inputtransforms` for details of the new API.
1784 rewritten. See :doc:`/config/inputtransforms` for details of the new API.
General Comments 0
You need to be logged in to leave comments. Login now