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