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