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