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