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