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