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