##// END OF EJS Templates
Update version7.rst
Matthias Bussonnier -
Show More
@@ -1,586 +1,586 b''
1 ============
1 ============
2 7.x Series
2 7.x Series
3 ============
3 ============
4
4
5 .. _version770:
5 .. _version770:
6
6
7 IPython 7.7.0
7 IPython 7.7.0
8 =============
8 =============
9
9
10 IPython 7.7.0 contain multiple bug fixes and documentation updates; Here are a
10 IPython 7.7.0 contain multiple bug fixes and documentation updates; Here are a
11 few of the outstanding issue fixed:
11 few of the outstanding issue fixed:
12
12
13 - Fix a bug introduced in 7.6 where the ``%matplotlib`` magic would fail on
13 - Fix a bug introduced in 7.6 where the ``%matplotlib`` magic would fail on
14 previously acceptable arguments :ghpull:`11814`.
14 previously acceptable arguments :ghpull:`11814`.
15 - Fix the manage location on freebsd :ghpull:`11808`.
15 - Fix the manage location on freebsd :ghpull:`11808`.
16 - Fix error message about aliases after ``%reset`` call in ipykernel
16 - Fix error message about aliases after ``%reset`` call in ipykernel
17 :ghpull:`11806`
17 :ghpull:`11806`
18 - Fix Duplication completions in emacs :ghpull:`11803`
18 - Fix Duplication completions in emacs :ghpull:`11803`
19
19
20 We are planning to adopt `NEP29 <https://github.com/numpy/numpy/pull/14086>`_
20 We are planning to adopt `NEP29 <https://github.com/numpy/numpy/pull/14086>`_
21 (still currently in draft) which may make this minor version of IPython the
21 (still currently in draft) which may make this minor version of IPython the
22 last one to support Python 3.5 and will make the code base more aggressive
22 last one to support Python 3.5 and will make the code base more aggressive
23 toward removing compatibility with older versions of Python.
23 toward removing compatibility with older versions of Python.
24
24
25 GitHub now support to give only "Triage" permissions to users; if you'd like to
25 GitHub now support to give only "Triage" permissions to users; if you'd like to
26 help close stale issues and labels issues please reach to us with your GitHub
26 help close stale issues and labels issues please reach to us with your GitHub
27 Username and we'll add you to the triage team. It is a great way to start
27 Username and we'll add you to the triage team. It is a great way to start
28 contributing and a path toward getting commit rights.
28 contributing and a path toward getting commit rights.
29
29
30 .. _version761:
30 .. _version761:
31
31
32 IPython 7.6.1
32 IPython 7.6.1
33 =============
33 =============
34
34
35 IPython 7.6.1 contain a critical bugfix in the ``%timeit`` magic, which would
35 IPython 7.6.1 contain a critical bugfix in the ``%timeit`` magic, which would
36 crash on some inputs as a side effect of :ghpull:`11716`. See :ghpull:`11812`
36 crash on some inputs as a side effect of :ghpull:`11716`. See :ghpull:`11812`
37
37
38
38
39 .. _whatsnew760:
39 .. _whatsnew760:
40
40
41 IPython 7.6.0
41 IPython 7.6.0
42 =============
42 =============
43
43
44 IPython 7.6.0 contains a couple of bug fixes and number of small features
44 IPython 7.6.0 contains a couple of bug fixes and number of small features
45 additions as well as some compatibility with the current development version of
45 additions as well as some compatibility with the current development version of
46 Python 3.8.
46 Python 3.8.
47
47
48 - Add a ``-l`` option to :magic:`psearch` to list the available search
48 - Add a ``-l`` option to :magic:`psearch` to list the available search
49 types. :ghpull:`11672`
49 types. :ghpull:`11672`
50 - Support ``PathLike`` for ``DisplayObject`` and ``Image``. :ghpull:`11764`
50 - Support ``PathLike`` for ``DisplayObject`` and ``Image``. :ghpull:`11764`
51 - Configurability of timeout in the test suite for slow platforms.
51 - Configurability of timeout in the test suite for slow platforms.
52 :ghpull:`11756`
52 :ghpull:`11756`
53 - Accept any casing for matplotlib backend. :ghpull:`121748`
53 - Accept any casing for matplotlib backend. :ghpull:`121748`
54 - Properly skip test that requires numpy to be installed :ghpull:`11723`
54 - Properly skip test that requires numpy to be installed :ghpull:`11723`
55 - More support for Python 3.8 and positional only arguments (pep570)
55 - More support for Python 3.8 and positional only arguments (pep570)
56 :ghpull:`11720`
56 :ghpull:`11720`
57 - Unicode names for the completion are loaded lazily on first use which
57 - Unicode names for the completion are loaded lazily on first use which
58 should decrease startup time. :ghpull:`11693`
58 should decrease startup time. :ghpull:`11693`
59 - Autoreload now update the types of reloaded objects; this for example allow
59 - Autoreload now update the types of reloaded objects; this for example allow
60 pickling of reloaded objects. :ghpull:`11644`
60 pickling of reloaded objects. :ghpull:`11644`
61 - Fix a bug where ``%%time`` magic would suppress cell output. :ghpull:`11716`
61 - Fix a bug where ``%%time`` magic would suppress cell output. :ghpull:`11716`
62
62
63
63
64 Prepare migration to pytest (instead of nose) for testing
64 Prepare migration to pytest (instead of nose) for testing
65 ---------------------------------------------------------
65 ---------------------------------------------------------
66
66
67 Most of the work between 7.5 and 7.6 was to prepare the migration from our
67 Most of the work between 7.5 and 7.6 was to prepare the migration from our
68 testing framework to pytest. Most of the test suite should now work by simply
68 testing framework to pytest. Most of the test suite should now work by simply
69 issuing ``pytest`` from the root of the repository.
69 issuing ``pytest`` from the root of the repository.
70
70
71 The migration to pytest is just at its beginning. Many of our test still rely
71 The migration to pytest is just at its beginning. Many of our test still rely
72 on IPython-specific plugins for nose using pytest (doctest using IPython syntax
72 on IPython-specific plugins for nose using pytest (doctest using IPython syntax
73 is one example of this where test appear as "passing", while no code has been
73 is one example of this where test appear as "passing", while no code has been
74 ran). Many test also need to be updated like ``yield-test`` to be properly
74 ran). Many test also need to be updated like ``yield-test`` to be properly
75 parametrized tests.
75 parametrized tests.
76
76
77 Migration to pytest allowed me to discover a number of issues in our test
77 Migration to pytest allowed me to discover a number of issues in our test
78 suite; which was hiding a number of subtle issues – or not actually running
78 suite; which was hiding a number of subtle issues – or not actually running
79 some of the tests in our test suite – I have thus corrected many of those; like
79 some of the tests in our test suite – I have thus corrected many of those; like
80 improperly closed resources; or used of deprecated features. I also made use of
80 improperly closed resources; or used of deprecated features. I also made use of
81 the ``pytest --durations=...`` to find some of our slowest test and speed them
81 the ``pytest --durations=...`` to find some of our slowest test and speed them
82 up (our test suite can now be up to 10% faster). Pytest as also a variety of
82 up (our test suite can now be up to 10% faster). Pytest as also a variety of
83 plugins and flags which will make the code quality of IPython and the testing
83 plugins and flags which will make the code quality of IPython and the testing
84 experience better.
84 experience better.
85
85
86 Misc
86 Misc
87 ----
87 ----
88
88
89 We skipped the release of 7.6 at the end of May, but will attempt to get back
89 We skipped the release of 7.6 at the end of May, but will attempt to get back
90 on schedule. We are starting to think about making introducing backward
90 on schedule. We are starting to think about making introducing backward
91 incompatible change and start the 8.0 series.
91 incompatible change and start the 8.0 series.
92
92
93 Special Thanks to Gabriel (@gpotter2 on GitHub), who among other took care many
93 Special Thanks to Gabriel (@gpotter2 on GitHub), who among other took care many
94 of the remaining task for 7.4 and 7.5, like updating the website.
94 of the remaining task for 7.4 and 7.5, like updating the website.
95
95
96 .. _whatsnew750:
96 .. _whatsnew750:
97
97
98 IPython 7.5.0
98 IPython 7.5.0
99 =============
99 =============
100
100
101 IPython 7.5.0 consist mostly of bug-fixes, and documentation updates, with one
101 IPython 7.5.0 consist mostly of bug-fixes, and documentation updates, with one
102 minor new feature. The `Audio` display element can now be assigned an element
102 minor new feature. The `Audio` display element can now be assigned an element
103 id when displayed in browser. See :ghpull:`11670`
103 id when displayed in browser. See :ghpull:`11670`
104
104
105 The major outstanding bug fix correct a change of behavior that was introduce
105 The major outstanding bug fix correct a change of behavior that was introduce
106 in 7.4.0 where some cell magics would not be able to access or modify global
106 in 7.4.0 where some cell magics would not be able to access or modify global
107 scope when using the ``@needs_local_scope`` decorator. This was typically
107 scope when using the ``@needs_local_scope`` decorator. This was typically
108 encountered with the ``%%time`` and ``%%timeit`` magics. See :ghissue:`11659`
108 encountered with the ``%%time`` and ``%%timeit`` magics. See :ghissue:`11659`
109 and :ghpull:`11698`.
109 and :ghpull:`11698`.
110
110
111 .. _whatsnew740:
111 .. _whatsnew740:
112
112
113 IPython 7.4.0
113 IPython 7.4.0
114 =============
114 =============
115
115
116 Unicode name completions
116 Unicode name completions
117 ------------------------
117 ------------------------
118
118
119 Previously, we provided completion for a unicode name with its relative symbol.
119 Previously, we provided completion for a unicode name with its relative symbol.
120 With this, now IPython provides complete suggestions to unicode name symbols.
120 With this, now IPython provides complete suggestions to unicode name symbols.
121
121
122 As on the PR, if user types ``\LAT<tab>``, IPython provides a list of
122 As on the PR, if user types ``\LAT<tab>``, IPython provides a list of
123 possible completions. In this case, it would be something like::
123 possible completions. In this case, it would be something like::
124
124
125 'LATIN CAPITAL LETTER A',
125 'LATIN CAPITAL LETTER A',
126 'LATIN CAPITAL LETTER B',
126 'LATIN CAPITAL LETTER B',
127 'LATIN CAPITAL LETTER C',
127 'LATIN CAPITAL LETTER C',
128 'LATIN CAPITAL LETTER D',
128 'LATIN CAPITAL LETTER D',
129 ....
129 ....
130
130
131 This help to type unicode character that do not have short latex aliases, and
131 This help to type unicode character that do not have short latex aliases, and
132 have long unicode names. for example ``Ν°``, ``\GREEK CAPITAL LETTER HETA``.
132 have long unicode names. for example ``Ν°``, ``\GREEK CAPITAL LETTER HETA``.
133
133
134 This feature was contributed by Luciana Marques :ghpull:`11583`.
134 This feature was contributed by Luciana Marques :ghpull:`11583`.
135
135
136 Make audio normalization optional
136 Make audio normalization optional
137 ---------------------------------
137 ---------------------------------
138
138
139 Added 'normalize' argument to `IPython.display.Audio`. This argument applies
139 Added 'normalize' argument to `IPython.display.Audio`. This argument applies
140 when audio data is given as an array of samples. The default of `normalize=True`
140 when audio data is given as an array of samples. The default of `normalize=True`
141 preserves prior behavior of normalizing the audio to the maximum possible range.
141 preserves prior behavior of normalizing the audio to the maximum possible range.
142 Setting to `False` disables normalization.
142 Setting to `False` disables normalization.
143
143
144
144
145 Miscellaneous
145 Miscellaneous
146 ------------
146 -------------
147
147
148 - Fix improper acceptation of ``return`` outside of functions. :ghpull:`11641`.
148 - Fix improper acceptation of ``return`` outside of functions. :ghpull:`11641`.
149 - Fixed PyQt 5.11 backwards incompatibility causing sip import failure.
149 - Fixed PyQt 5.11 backwards incompatibility causing sip import failure.
150 :ghpull:`11613`.
150 :ghpull:`11613`.
151 - Fix Bug where ``type?`` would crash IPython. :ghpull:`1608`.
151 - Fix Bug where ``type?`` would crash IPython. :ghpull:`1608`.
152 - Allow to apply ``@needs_local_scope`` to cell magics for convenience.
152 - Allow to apply ``@needs_local_scope`` to cell magics for convenience.
153 :ghpull:`11542`.
153 :ghpull:`11542`.
154
154
155 .. _whatsnew730:
155 .. _whatsnew730:
156
156
157 IPython 7.3.0
157 IPython 7.3.0
158 =============
158 =============
159
159
160 .. _whatsnew720:
160 .. _whatsnew720:
161
161
162 IPython 7.3.0 bring several bug fixes and small improvements that you will
162 IPython 7.3.0 bring several bug fixes and small improvements that you will
163 described bellow.
163 described bellow.
164
164
165 The biggest change to this release is the implementation of the ``%conda`` and
165 The biggest change to this release is the implementation of the ``%conda`` and
166 ``%pip`` magics, that will attempt to install packages in the **current
166 ``%pip`` magics, that will attempt to install packages in the **current
167 environment**. You may still need to restart your interpreter or kernel for the
167 environment**. You may still need to restart your interpreter or kernel for the
168 change to be taken into account, but it should simplify installation of packages
168 change to be taken into account, but it should simplify installation of packages
169 into remote environment. Installing using pip/conda from the command line is
169 into remote environment. Installing using pip/conda from the command line is
170 still the prefer method.
170 still the prefer method.
171
171
172 The ``%pip`` magic was already present, but was only printing a warning; now it
172 The ``%pip`` magic was already present, but was only printing a warning; now it
173 will actually forward commands to pip.
173 will actually forward commands to pip.
174
174
175 Misc bug fixes and improvements:
175 Misc bug fixes and improvements:
176
176
177 - Compatibility with Python 3.8.
177 - Compatibility with Python 3.8.
178 - Do not expand shell variable in execution magics, and added the
178 - Do not expand shell variable in execution magics, and added the
179 ``no_var_expand`` decorator for magic requiring a similar functionality
179 ``no_var_expand`` decorator for magic requiring a similar functionality
180 :ghpull:`11516`
180 :ghpull:`11516`
181 - Add ``%pip`` and ``%conda`` magic :ghpull:`11524`
181 - Add ``%pip`` and ``%conda`` magic :ghpull:`11524`
182 - Re-initialize posix aliases after a ``%reset`` :ghpull:`11528`
182 - Re-initialize posix aliases after a ``%reset`` :ghpull:`11528`
183 - Allow the IPython command line to run ``*.ipynb`` files :ghpull:`11529`
183 - Allow the IPython command line to run ``*.ipynb`` files :ghpull:`11529`
184
184
185 IPython 7.2.0
185 IPython 7.2.0
186 =============
186 =============
187
187
188 IPython 7.2.0 brings minor bugfixes, improvements, and new configuration options:
188 IPython 7.2.0 brings minor bugfixes, improvements, and new configuration options:
189
189
190 - Fix a bug preventing PySide2 GUI integration from working :ghpull:`11464`
190 - Fix a bug preventing PySide2 GUI integration from working :ghpull:`11464`
191 - Run CI on Mac OS ! :ghpull:`11471`
191 - Run CI on Mac OS ! :ghpull:`11471`
192 - Fix IPython "Demo" mode. :ghpull:`11498`
192 - Fix IPython "Demo" mode. :ghpull:`11498`
193 - Fix ``%run`` magic with path in name :ghpull:`11499`
193 - Fix ``%run`` magic with path in name :ghpull:`11499`
194 - Fix: add CWD to sys.path *after* stdlib :ghpull:`11502`
194 - Fix: add CWD to sys.path *after* stdlib :ghpull:`11502`
195 - Better rendering of signatures, especially long ones. :ghpull:`11505`
195 - Better rendering of signatures, especially long ones. :ghpull:`11505`
196 - Re-enable jedi by default if it's installed :ghpull:`11506`
196 - Re-enable jedi by default if it's installed :ghpull:`11506`
197 - Add New ``minimal`` exception reporting mode (useful for educational purpose). See :ghpull:`11509`
197 - Add New ``minimal`` exception reporting mode (useful for educational purpose). See :ghpull:`11509`
198
198
199
199
200 Added ability to show subclasses when using pinfo and other utilities
200 Added ability to show subclasses when using pinfo and other utilities
201 ---------------------------------------------------------------------
201 ---------------------------------------------------------------------
202
202
203 When using ``?``/``??`` on a class, IPython will now list the first 10 subclasses.
203 When using ``?``/``??`` on a class, IPython will now list the first 10 subclasses.
204
204
205 Special Thanks to Chris Mentzel of the Moore Foundation for this feature. Chris
205 Special Thanks to Chris Mentzel of the Moore Foundation for this feature. Chris
206 is one of the people who played a critical role in IPython/Jupyter getting
206 is one of the people who played a critical role in IPython/Jupyter getting
207 funding.
207 funding.
208
208
209 We are grateful for all the help Chris has given us over the years,
209 We are grateful for all the help Chris has given us over the years,
210 and we're now proud to have code contributed by Chris in IPython.
210 and we're now proud to have code contributed by Chris in IPython.
211
211
212 OSMagics.cd_force_quiet configuration option
212 OSMagics.cd_force_quiet configuration option
213 --------------------------------------------
213 --------------------------------------------
214
214
215 You can set this option to force the %cd magic to behave as if ``-q`` was passed:
215 You can set this option to force the %cd magic to behave as if ``-q`` was passed:
216 ::
216 ::
217
217
218 In [1]: cd /
218 In [1]: cd /
219 /
219 /
220
220
221 In [2]: %config OSMagics.cd_force_quiet = True
221 In [2]: %config OSMagics.cd_force_quiet = True
222
222
223 In [3]: cd /tmp
223 In [3]: cd /tmp
224
224
225 In [4]:
225 In [4]:
226
226
227 See :ghpull:`11491`
227 See :ghpull:`11491`
228
228
229 In vi editing mode, whether the prompt includes the current vi mode can now be configured
229 In vi editing mode, whether the prompt includes the current vi mode can now be configured
230 -----------------------------------------------------------------------------------------
230 -----------------------------------------------------------------------------------------
231
231
232 Set the ``TerminalInteractiveShell.prompt_includes_vi_mode`` to a boolean value
232 Set the ``TerminalInteractiveShell.prompt_includes_vi_mode`` to a boolean value
233 (default: True) to control this feature. See :ghpull:`11492`
233 (default: True) to control this feature. See :ghpull:`11492`
234
234
235 .. _whatsnew710:
235 .. _whatsnew710:
236
236
237 IPython 7.1.0
237 IPython 7.1.0
238 =============
238 =============
239
239
240 IPython 7.1.0 is the first minor release after 7.0.0 and mostly brings fixes to
240 IPython 7.1.0 is the first minor release after 7.0.0 and mostly brings fixes to
241 new features, internal refactoring, and fixes for regressions that happened during the 6.x->7.x
241 new features, internal refactoring, and fixes for regressions that happened during the 6.x->7.x
242 transition. It also brings **Compatibility with Python 3.7.1**, as we're
242 transition. It also brings **Compatibility with Python 3.7.1**, as we're
243 unwillingly relying on a bug in CPython.
243 unwillingly relying on a bug in CPython.
244
244
245 New Core Dev:
245 New Core Dev:
246
246
247 - We welcome Jonathan Slenders to the commiters. Jonathan has done a fantastic
247 - We welcome Jonathan Slenders to the commiters. Jonathan has done a fantastic
248 work on prompt_toolkit, and we'd like to recognise his impact by giving him
248 work on prompt_toolkit, and we'd like to recognise his impact by giving him
249 commit rights. :ghissue:`11397`
249 commit rights. :ghissue:`11397`
250
250
251 Notable Changes
251 Notable Changes
252
252
253 - Major update of "latex to unicode" tab completion map (see below)
253 - Major update of "latex to unicode" tab completion map (see below)
254
254
255 Notable New Features:
255 Notable New Features:
256
256
257 - Restore functionality and documentation of the **sphinx directive**, which
257 - Restore functionality and documentation of the **sphinx directive**, which
258 is now stricter (fail on error by daefault), has new configuration options,
258 is now stricter (fail on error by daefault), has new configuration options,
259 has a brand new documentation page :ref:`ipython_directive` (which needs
259 has a brand new documentation page :ref:`ipython_directive` (which needs
260 some cleanup). It is also now *tested* so we hope to have less regressions.
260 some cleanup). It is also now *tested* so we hope to have less regressions.
261 :ghpull:`11402`
261 :ghpull:`11402`
262
262
263 - ``IPython.display.Video`` now supports ``width`` and ``height`` arguments,
263 - ``IPython.display.Video`` now supports ``width`` and ``height`` arguments,
264 allowing a custom width and height to be set instead of using the video's
264 allowing a custom width and height to be set instead of using the video's
265 width and height. :ghpull:`11353`
265 width and height. :ghpull:`11353`
266
266
267 - Warn when using ``HTML('<iframe>')`` instead of ``IFrame`` :ghpull:`11350`
267 - Warn when using ``HTML('<iframe>')`` instead of ``IFrame`` :ghpull:`11350`
268
268
269 - Allow Dynamic switching of editing mode between vi/emacs and show
269 - Allow Dynamic switching of editing mode between vi/emacs and show
270 normal/input mode in prompt when using vi. :ghpull:`11390`. Use ``%config
270 normal/input mode in prompt when using vi. :ghpull:`11390`. Use ``%config
271 TerminalInteractiveShell.editing_mode = 'vi'`` or ``%config
271 TerminalInteractiveShell.editing_mode = 'vi'`` or ``%config
272 TerminalInteractiveShell.editing_mode = 'emacs'`` to dynamically switch
272 TerminalInteractiveShell.editing_mode = 'emacs'`` to dynamically switch
273 between modes.
273 between modes.
274
274
275
275
276 Notable Fixes:
276 Notable Fixes:
277
277
278 - Fix entering of **multi-line blocks in terminal** IPython, and various
278 - Fix entering of **multi-line blocks in terminal** IPython, and various
279 crashes in the new input transformation machinery :ghpull:`11354`,
279 crashes in the new input transformation machinery :ghpull:`11354`,
280 :ghpull:`11356`, :ghpull:`11358`. These also fix a **Compatibility bug
280 :ghpull:`11356`, :ghpull:`11358`. These also fix a **Compatibility bug
281 with Python 3.7.1**.
281 with Python 3.7.1**.
282
282
283 - Fix moving through generator stack in ipdb :ghpull:`11266`
283 - Fix moving through generator stack in ipdb :ghpull:`11266`
284
284
285 - %Magic command arguments now support quoting. :ghpull:`11330`
285 - %Magic command arguments now support quoting. :ghpull:`11330`
286
286
287 - Re-add ``rprint`` and ``rprinte`` aliases. :ghpull:`11331`
287 - Re-add ``rprint`` and ``rprinte`` aliases. :ghpull:`11331`
288
288
289 - Remove implicit dependency on ``ipython_genutils`` :ghpull:`11317`
289 - Remove implicit dependency on ``ipython_genutils`` :ghpull:`11317`
290
290
291 - Make ``nonlocal`` raise ``SyntaxError`` instead of silently failing in async
291 - Make ``nonlocal`` raise ``SyntaxError`` instead of silently failing in async
292 mode. :ghpull:`11382`
292 mode. :ghpull:`11382`
293
293
294 - Fix mishandling of magics and ``= !`` assignment just after a dedent in
294 - Fix mishandling of magics and ``= !`` assignment just after a dedent in
295 nested code blocks :ghpull:`11418`
295 nested code blocks :ghpull:`11418`
296
296
297 - Fix instructions for custom shortcuts :ghpull:`11426`
297 - Fix instructions for custom shortcuts :ghpull:`11426`
298
298
299
299
300 Notable Internals improvements:
300 Notable Internals improvements:
301
301
302 - Use of ``os.scandir`` (Python 3 only) to speed up some file system operations.
302 - Use of ``os.scandir`` (Python 3 only) to speed up some file system operations.
303 :ghpull:`11365`
303 :ghpull:`11365`
304
304
305 - use ``perf_counter`` instead of ``clock`` for more precise
305 - use ``perf_counter`` instead of ``clock`` for more precise
306 timing results with ``%time`` :ghpull:`11376`
306 timing results with ``%time`` :ghpull:`11376`
307
307
308 Many thanks to all the contributors and in particular to ``bartskowron`` and
308 Many thanks to all the contributors and in particular to ``bartskowron`` and
309 ``tonyfast`` who handled some pretty complicated bugs in the input machinery. We
309 ``tonyfast`` who handled some pretty complicated bugs in the input machinery. We
310 had a number of first time contributors and maybe hacktoberfest participants that
310 had a number of first time contributors and maybe hacktoberfest participants that
311 made significant contributions and helped us free some time to focus on more
311 made significant contributions and helped us free some time to focus on more
312 complicated bugs.
312 complicated bugs.
313
313
314 You
314 You
315 can see all the closed issues and Merged PR, new features and fixes `here
315 can see all the closed issues and Merged PR, new features and fixes `here
316 <https://github.com/ipython/ipython/issues?utf8=%E2%9C%93&q=+is%3Aclosed+milestone%3A7.1+>`_.
316 <https://github.com/ipython/ipython/issues?utf8=%E2%9C%93&q=+is%3Aclosed+milestone%3A7.1+>`_.
317
317
318 Unicode Completion update
318 Unicode Completion update
319 -------------------------
319 -------------------------
320
320
321 In IPython 7.1 the Unicode completion map has been updated and synchronized with
321 In IPython 7.1 the Unicode completion map has been updated and synchronized with
322 the Julia language.
322 the Julia language.
323
323
324 Added and removed character characters:
324 Added and removed character characters:
325
325
326 ``\jmath`` (``Θ·``), ``\\underleftrightarrow`` (U+034D, combining) have been
326 ``\jmath`` (``Θ·``), ``\\underleftrightarrow`` (U+034D, combining) have been
327 added, while ``\\textasciicaron`` have been removed
327 added, while ``\\textasciicaron`` have been removed
328
328
329 Some sequences have seen their prefix removed:
329 Some sequences have seen their prefix removed:
330
330
331 - 6 characters ``\text...<tab>`` should now be inputed with ``\...<tab>`` directly,
331 - 6 characters ``\text...<tab>`` should now be inputed with ``\...<tab>`` directly,
332 - 45 characters ``\Elz...<tab>`` should now be inputed with ``\...<tab>`` directly,
332 - 45 characters ``\Elz...<tab>`` should now be inputed with ``\...<tab>`` directly,
333 - 65 characters ``\B...<tab>`` should now be inputed with ``\...<tab>`` directly,
333 - 65 characters ``\B...<tab>`` should now be inputed with ``\...<tab>`` directly,
334 - 450 characters ``\m...<tab>`` should now be inputed with ``\...<tab>`` directly,
334 - 450 characters ``\m...<tab>`` should now be inputed with ``\...<tab>`` directly,
335
335
336 Some sequences have seen their prefix shortened:
336 Some sequences have seen their prefix shortened:
337
337
338 - 5 characters ``\mitBbb...<tab>`` should now be inputed with ``\bbi...<tab>`` directly,
338 - 5 characters ``\mitBbb...<tab>`` should now be inputed with ``\bbi...<tab>`` directly,
339 - 52 characters ``\mit...<tab>`` should now be inputed with ``\i...<tab>`` directly,
339 - 52 characters ``\mit...<tab>`` should now be inputed with ``\i...<tab>`` directly,
340 - 216 characters ``\mbfit...<tab>`` should now be inputed with ``\bi...<tab>`` directly,
340 - 216 characters ``\mbfit...<tab>`` should now be inputed with ``\bi...<tab>`` directly,
341 - 222 characters ``\mbf...<tab>`` should now be inputed with ``\b...<tab>`` directly,
341 - 222 characters ``\mbf...<tab>`` should now be inputed with ``\b...<tab>`` directly,
342
342
343 A couple of characters had their sequence simplified:
343 A couple of characters had their sequence simplified:
344
344
345 - ``Γ°``, type ``\dh<tab>``, instead of ``\eth<tab>``
345 - ``Γ°``, type ``\dh<tab>``, instead of ``\eth<tab>``
346 - ``Δ§``, type ``\hbar<tab>``, instead of ``\Elzxh<tab>``
346 - ``Δ§``, type ``\hbar<tab>``, instead of ``\Elzxh<tab>``
347 - ``ΙΈ``, type ``\ltphi<tab>``, instead of ``\textphi<tab>``
347 - ``ΙΈ``, type ``\ltphi<tab>``, instead of ``\textphi<tab>``
348 - ``Ο΄``, type ``\varTheta<tab>``, instead of ``\textTheta<tab>``
348 - ``Ο΄``, type ``\varTheta<tab>``, instead of ``\textTheta<tab>``
349 - ``ℇ``, type ``\eulermascheroni<tab>``, instead of ``\Eulerconst<tab>``
349 - ``ℇ``, type ``\eulermascheroni<tab>``, instead of ``\Eulerconst<tab>``
350 - ``β„Ž``, type ``\planck<tab>``, instead of ``\Planckconst<tab>``
350 - ``β„Ž``, type ``\planck<tab>``, instead of ``\Planckconst<tab>``
351
351
352 - U+0336 (COMBINING LONG STROKE OVERLAY), type ``\strike<tab>``, instead of ``\Elzbar<tab>``.
352 - U+0336 (COMBINING LONG STROKE OVERLAY), type ``\strike<tab>``, instead of ``\Elzbar<tab>``.
353
353
354 A couple of sequences have been updated:
354 A couple of sequences have been updated:
355
355
356 - ``\varepsilon`` now gives ``Ι›`` (GREEK SMALL LETTER EPSILON) instead of ``Ξ΅`` (GREEK LUNATE EPSILON SYMBOL),
356 - ``\varepsilon`` now gives ``Ι›`` (GREEK SMALL LETTER EPSILON) instead of ``Ξ΅`` (GREEK LUNATE EPSILON SYMBOL),
357 - ``\underbar`` now gives U+0331 (COMBINING MACRON BELOW) instead of U+0332 (COMBINING LOW LINE).
357 - ``\underbar`` now gives U+0331 (COMBINING MACRON BELOW) instead of U+0332 (COMBINING LOW LINE).
358
358
359
359
360 .. _whatsnew700:
360 .. _whatsnew700:
361
361
362 IPython 7.0.0
362 IPython 7.0.0
363 =============
363 =============
364
364
365 Released Thursday September 27th, 2018
365 Released Thursday September 27th, 2018
366
366
367 IPython 7 includes major feature improvements.
367 IPython 7 includes major feature improvements.
368 This is also the second major version of IPython to support only
368 This is also the second major version of IPython to support only
369 Python 3 – starting at Python 3.4. Python 2 is still community-supported
369 Python 3 – starting at Python 3.4. Python 2 is still community-supported
370 on the bugfix only 5.x branch, but we remind you that Python 2 "end of life"
370 on the bugfix only 5.x branch, but we remind you that Python 2 "end of life"
371 is on Jan 1st 2020.
371 is on Jan 1st 2020.
372
372
373 We were able to backport bug fixes to the 5.x branch thanks to our backport bot which
373 We were able to backport bug fixes to the 5.x branch thanks to our backport bot which
374 backported more than `70 Pull-Requests
374 backported more than `70 Pull-Requests
375 <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>`_
375 <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>`_
376
376
377 The IPython 6.x branch will likely not see any further release unless critical
377 The IPython 6.x branch will likely not see any further release unless critical
378 bugs are found.
378 bugs are found.
379
379
380 Make sure you have pip > 9.0 before upgrading. You should be able to update by running:
380 Make sure you have pip > 9.0 before upgrading. You should be able to update by running:
381
381
382 .. code::
382 .. code::
383
383
384 pip install ipython --upgrade
384 pip install ipython --upgrade
385
385
386 .. only:: ipydev
386 .. only:: ipydev
387
387
388 If you are trying to install or update an ``alpha``, ``beta``, or ``rc``
388 If you are trying to install or update an ``alpha``, ``beta``, or ``rc``
389 version, use pip ``--pre`` flag.
389 version, use pip ``--pre`` flag.
390
390
391 .. code::
391 .. code::
392
392
393 pip install ipython --upgrade --pre
393 pip install ipython --upgrade --pre
394
394
395
395
396 Or, if you have conda installed:
396 Or, if you have conda installed:
397
397
398 .. code::
398 .. code::
399
399
400 conda install ipython
400 conda install ipython
401
401
402
402
403
403
404 Prompt Toolkit 2.0
404 Prompt Toolkit 2.0
405 ------------------
405 ------------------
406
406
407 IPython 7.0+ now uses ``prompt_toolkit 2.0``. If you still need to use an earlier
407 IPython 7.0+ now uses ``prompt_toolkit 2.0``. If you still need to use an earlier
408 ``prompt_toolkit`` version, you may need to pin IPython to ``<7.0``.
408 ``prompt_toolkit`` version, you may need to pin IPython to ``<7.0``.
409
409
410 Autowait: Asynchronous REPL
410 Autowait: Asynchronous REPL
411 ---------------------------
411 ---------------------------
412
412
413 Staring with IPython 7.0 on Python 3.6+, IPython can automatically ``await``
413 Staring with IPython 7.0 on Python 3.6+, IPython can automatically ``await``
414 top level code. You should not need to access an event loop or runner
414 top level code. You should not need to access an event loop or runner
415 yourself. To learn more, read the :ref:`autoawait` section of our docs, see
415 yourself. To learn more, read the :ref:`autoawait` section of our docs, see
416 :ghpull:`11265`, or try the following code::
416 :ghpull:`11265`, or try the following code::
417
417
418 Python 3.6.0
418 Python 3.6.0
419 Type 'copyright', 'credits' or 'license' for more information
419 Type 'copyright', 'credits' or 'license' for more information
420 IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help.
420 IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help.
421
421
422 In [1]: import aiohttp
422 In [1]: import aiohttp
423 ...: result = aiohttp.get('https://api.github.com')
423 ...: result = aiohttp.get('https://api.github.com')
424
424
425 In [2]: response = await result
425 In [2]: response = await result
426 <pause for a few 100s ms>
426 <pause for a few 100s ms>
427
427
428 In [3]: await response.json()
428 In [3]: await response.json()
429 Out[3]:
429 Out[3]:
430 {'authorizations_url': 'https://api.github.com/authorizations',
430 {'authorizations_url': 'https://api.github.com/authorizations',
431 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}',
431 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}',
432 ...
432 ...
433 }
433 }
434
434
435 .. note::
435 .. note::
436
436
437 Async integration is experimental code, behavior may change or be removed
437 Async integration is experimental code, behavior may change or be removed
438 between Python and IPython versions without warnings.
438 between Python and IPython versions without warnings.
439
439
440 Integration is by default with `asyncio`, but other libraries can be configured --
440 Integration is by default with `asyncio`, but other libraries can be configured --
441 like ``curio`` or ``trio`` -- to improve concurrency in the REPL::
441 like ``curio`` or ``trio`` -- to improve concurrency in the REPL::
442
442
443 In [1]: %autoawait trio
443 In [1]: %autoawait trio
444
444
445 In [2]: import trio
445 In [2]: import trio
446
446
447 In [3]: async def child(i):
447 In [3]: async def child(i):
448 ...: print(" child %s goes to sleep"%i)
448 ...: print(" child %s goes to sleep"%i)
449 ...: await trio.sleep(2)
449 ...: await trio.sleep(2)
450 ...: print(" child %s wakes up"%i)
450 ...: print(" child %s wakes up"%i)
451
451
452 In [4]: print('parent start')
452 In [4]: print('parent start')
453 ...: async with trio.open_nursery() as n:
453 ...: async with trio.open_nursery() as n:
454 ...: for i in range(3):
454 ...: for i in range(3):
455 ...: n.spawn(child, i)
455 ...: n.spawn(child, i)
456 ...: print('parent end')
456 ...: print('parent end')
457 parent start
457 parent start
458 child 2 goes to sleep
458 child 2 goes to sleep
459 child 0 goes to sleep
459 child 0 goes to sleep
460 child 1 goes to sleep
460 child 1 goes to sleep
461 <about 2 seconds pause>
461 <about 2 seconds pause>
462 child 2 wakes up
462 child 2 wakes up
463 child 1 wakes up
463 child 1 wakes up
464 child 0 wakes up
464 child 0 wakes up
465 parent end
465 parent end
466
466
467 See :ref:`autoawait` for more information.
467 See :ref:`autoawait` for more information.
468
468
469
469
470 Asynchronous code in a Notebook interface or any other frontend using the
470 Asynchronous code in a Notebook interface or any other frontend using the
471 Jupyter Protocol will require further updates to the IPykernel package.
471 Jupyter Protocol will require further updates to the IPykernel package.
472
472
473 Non-Asynchronous code
473 Non-Asynchronous code
474 ~~~~~~~~~~~~~~~~~~~~~
474 ~~~~~~~~~~~~~~~~~~~~~
475
475
476 As the internal API of IPython is now asynchronous, IPython needs to run under
476 As the internal API of IPython is now asynchronous, IPython needs to run under
477 an event loop. In order to allow many workflows, (like using the :magic:`%run`
477 an event loop. In order to allow many workflows, (like using the :magic:`%run`
478 magic, or copy-pasting code that explicitly starts/stop event loop), when
478 magic, or copy-pasting code that explicitly starts/stop event loop), when
479 top-level code is detected as not being asynchronous, IPython code is advanced
479 top-level code is detected as not being asynchronous, IPython code is advanced
480 via a pseudo-synchronous runner, and may not advance pending tasks.
480 via a pseudo-synchronous runner, and may not advance pending tasks.
481
481
482 Change to Nested Embed
482 Change to Nested Embed
483 ~~~~~~~~~~~~~~~~~~~~~~
483 ~~~~~~~~~~~~~~~~~~~~~~
484
484
485 The introduction of the ability to run async code had some effect on the
485 The introduction of the ability to run async code had some effect on the
486 ``IPython.embed()`` API. By default, embed will not allow you to run asynchronous
486 ``IPython.embed()`` API. By default, embed will not allow you to run asynchronous
487 code unless an event loop is specified.
487 code unless an event loop is specified.
488
488
489 Effects on Magics
489 Effects on Magics
490 ~~~~~~~~~~~~~~~~~
490 ~~~~~~~~~~~~~~~~~
491
491
492 Some magics will not work with async until they're updated.
492 Some magics will not work with async until they're updated.
493 Contributions welcome.
493 Contributions welcome.
494
494
495 Expected Future changes
495 Expected Future changes
496 ~~~~~~~~~~~~~~~~~~~~~~~
496 ~~~~~~~~~~~~~~~~~~~~~~~
497
497
498 We expect more internal but public IPython functions to become ``async``, and
498 We expect more internal but public IPython functions to become ``async``, and
499 will likely end up having a persistent event loop while IPython is running.
499 will likely end up having a persistent event loop while IPython is running.
500
500
501 Thanks
501 Thanks
502 ~~~~~~
502 ~~~~~~
503
503
504 This release took more than a year in the making.
504 This release took more than a year in the making.
505 The code was rebased a number of
505 The code was rebased a number of
506 times; leading to commit authorship that may have been lost in the final
506 times; leading to commit authorship that may have been lost in the final
507 Pull-Request. Huge thanks to many people for contribution, discussion, code,
507 Pull-Request. Huge thanks to many people for contribution, discussion, code,
508 documentation, use-cases: dalejung, danielballan, ellisonbg, fperez, gnestor,
508 documentation, use-cases: dalejung, danielballan, ellisonbg, fperez, gnestor,
509 minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many others.
509 minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many others.
510
510
511
511
512 Autoreload Improvement
512 Autoreload Improvement
513 ----------------------
513 ----------------------
514
514
515 The magic :magic:`%autoreload 2 <autoreload>` now captures new methods added to
515 The magic :magic:`%autoreload 2 <autoreload>` now captures new methods added to
516 classes. Earlier, only methods existing as of the initial import were being
516 classes. Earlier, only methods existing as of the initial import were being
517 tracked and updated.
517 tracked and updated.
518
518
519 This new feature helps dual environment development - Jupyter+IDE - where the
519 This new feature helps dual environment development - Jupyter+IDE - where the
520 code gradually moves from notebook cells to package files as it gets
520 code gradually moves from notebook cells to package files as it gets
521 structured.
521 structured.
522
522
523 **Example**: An instance of the class ``MyClass`` will be able to access the
523 **Example**: An instance of the class ``MyClass`` will be able to access the
524 method ``cube()`` after it is uncommented and the file ``file1.py`` is saved on
524 method ``cube()`` after it is uncommented and the file ``file1.py`` is saved on
525 disk.
525 disk.
526
526
527
527
528 .. code::
528 .. code::
529
529
530 # notebook
530 # notebook
531
531
532 from mymodule import MyClass
532 from mymodule import MyClass
533 first = MyClass(5)
533 first = MyClass(5)
534
534
535 .. code::
535 .. code::
536
536
537 # mymodule/file1.py
537 # mymodule/file1.py
538
538
539 class MyClass:
539 class MyClass:
540
540
541 def __init__(self, a=10):
541 def __init__(self, a=10):
542 self.a = a
542 self.a = a
543
543
544 def square(self):
544 def square(self):
545 print('compute square')
545 print('compute square')
546 return self.a*self.a
546 return self.a*self.a
547
547
548 # def cube(self):
548 # def cube(self):
549 # print('compute cube')
549 # print('compute cube')
550 # return self.a*self.a*self.a
550 # return self.a*self.a*self.a
551
551
552
552
553
553
554
554
555 Misc
555 Misc
556 ----
556 ----
557
557
558 The autoindent feature that was deprecated in 5.x was re-enabled and
558 The autoindent feature that was deprecated in 5.x was re-enabled and
559 un-deprecated in :ghpull:`11257`
559 un-deprecated in :ghpull:`11257`
560
560
561 Make :magic:`%run -n -i ... <run>` work correctly. Earlier, if :magic:`%run` was
561 Make :magic:`%run -n -i ... <run>` work correctly. Earlier, if :magic:`%run` was
562 passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308`
562 passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308`
563
563
564
564
565 The :cellmagic:`%%script` (as well as :cellmagic:`%%bash`,
565 The :cellmagic:`%%script` (as well as :cellmagic:`%%bash`,
566 :cellmagic:`%%ruby`... ) cell magics now raise by default if the return code of
566 :cellmagic:`%%ruby`... ) cell magics now raise by default if the return code of
567 the given code is non-zero (thus halting execution of further cells in a
567 the given code is non-zero (thus halting execution of further cells in a
568 notebook). The behavior can be disable by passing the ``--no-raise-error`` flag.
568 notebook). The behavior can be disable by passing the ``--no-raise-error`` flag.
569
569
570
570
571 Deprecations
571 Deprecations
572 ------------
572 ------------
573
573
574 A couple of unused functions and methods have been deprecated and will be removed
574 A couple of unused functions and methods have been deprecated and will be removed
575 in future versions:
575 in future versions:
576
576
577 - ``IPython.utils.io.raw_print_err``
577 - ``IPython.utils.io.raw_print_err``
578 - ``IPython.utils.io.raw_print``
578 - ``IPython.utils.io.raw_print``
579
579
580
580
581 Backwards incompatible changes
581 Backwards incompatible changes
582 ------------------------------
582 ------------------------------
583
583
584 * The API for transforming input before it is parsed as Python code has been
584 * The API for transforming input before it is parsed as Python code has been
585 completely redesigned: any custom input transformations will need to be
585 completely redesigned: any custom input transformations will need to be
586 rewritten. See :doc:`/config/inputtransforms` for details of the new API.
586 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