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