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