##// END OF EJS Templates
Merge pull request #11834 from Carreau/7.7r...
Matthias Bussonnier -
r25156:4880e44e merge
parent child Browse files
Show More
@@ -1,561 +1,586 b''
1 ============
1 ============
2 7.x Series
2 7.x Series
3 ============
3 ============
4
4
5 .. _version770:
6
7 IPython 7.7.0
8 =============
9
10 IPython 7.7.0 contain multiple bug fixes and documentation updates; Here are a
11 few of the outstanding issue fixed:
12
13 - Fix a bug introduced in 7.6 where the ``%matplotlib`` magic would fail on
14 previously acceptable arguments :ghpull:`11814`.
15 - Fix the manage location on freebsd :ghpull:`11808`.
16 - Fix error message about aliases after ``%reset`` call in ipykernel
17 :ghpull:`11806`
18 - Fix Duplication completions in emacs :ghpull:`11803`
19
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
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.
24
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
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.
29
5 .. _version761:
30 .. _version761:
6
31
7 IPython 7.6.1
32 IPython 7.6.1
8 =============
33 =============
9
34
10 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
11 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`
12
37
13
38
14 .. _whatsnew760:
39 .. _whatsnew760:
15
40
16 IPython 7.6.0
41 IPython 7.6.0
17 =============
42 =============
18
43
19 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
20 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
21 Python 3.8.
46 Python 3.8.
22
47
23 - 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
24 types. :ghpull:`11672`
49 types. :ghpull:`11672`
25 - Support ``PathLike`` for ``DisplayObject`` and ``Image``. :ghpull:`11764`
50 - Support ``PathLike`` for ``DisplayObject`` and ``Image``. :ghpull:`11764`
26 - Configurability of timeout in the test suite for slow platforms.
51 - Configurability of timeout in the test suite for slow platforms.
27 :ghpull:`11756`
52 :ghpull:`11756`
28 - Accept any casing for matplotlib backend. :ghpull:`121748`
53 - Accept any casing for matplotlib backend. :ghpull:`121748`
29 - Properly skip test that requires numpy to be installed :ghpull:`11723`
54 - Properly skip test that requires numpy to be installed :ghpull:`11723`
30 - More support for Python 3.8 and positional only arguments (pep570)
55 - More support for Python 3.8 and positional only arguments (pep570)
31 :ghpull:`11720`
56 :ghpull:`11720`
32 - 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
33 should decrease startup time. :ghpull:`11693`
58 should decrease startup time. :ghpull:`11693`
34 - 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
35 pickling of reloaded objects. :ghpull:`11644`
60 pickling of reloaded objects. :ghpull:`11644`
36 - 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`
37
62
38
63
39 Prepare migration to pytest (instead of nose) for testing
64 Prepare migration to pytest (instead of nose) for testing
40 ---------------------------------------------------------
65 ---------------------------------------------------------
41
66
42 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
43 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
44 issuing ``pytest`` from the root of the repository.
69 issuing ``pytest`` from the root of the repository.
45
70
46 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
47 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
48 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
49 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
50 parametrized tests.
75 parametrized tests.
51
76
52 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
53 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
54 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
55 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
56 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
57 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
58 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
59 experience better.
84 experience better.
60
85
61 Misc
86 Misc
62 ----
87 ----
63
88
64 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
65 on schedule. We are starting to think about making introducing backward
90 on schedule. We are starting to think about making introducing backward
66 incompatible change and start the 8.0 series.
91 incompatible change and start the 8.0 series.
67
92
68 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
69 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.
70
95
71 .. _whatsnew750:
96 .. _whatsnew750:
72
97
73 IPython 7.5.0
98 IPython 7.5.0
74 =============
99 =============
75
100
76 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
77 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
78 id when displayed in browser. See :ghpull:`11670`
103 id when displayed in browser. See :ghpull:`11670`
79
104
80 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
81 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
82 scope when using the ``@needs_local_scope`` decorator. This was typically
107 scope when using the ``@needs_local_scope`` decorator. This was typically
83 encountered with the ``%%time`` and ``%%timeit`` magics. See :ghissue:`11659`
108 encountered with the ``%%time`` and ``%%timeit`` magics. See :ghissue:`11659`
84 and :ghpull:`11698`.
109 and :ghpull:`11698`.
85
110
86 .. _whatsnew740:
111 .. _whatsnew740:
87
112
88 IPython 7.4.0
113 IPython 7.4.0
89 =============
114 =============
90
115
91 Unicode name completions
116 Unicode name completions
92 ------------------------
117 ------------------------
93
118
94 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.
95 With this, now IPython provides complete suggestions to unicode name symbols.
120 With this, now IPython provides complete suggestions to unicode name symbols.
96
121
97 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
98 possible completions. In this case, it would be something like::
123 possible completions. In this case, it would be something like::
99
124
100 'LATIN CAPITAL LETTER A',
125 'LATIN CAPITAL LETTER A',
101 'LATIN CAPITAL LETTER B',
126 'LATIN CAPITAL LETTER B',
102 'LATIN CAPITAL LETTER C',
127 'LATIN CAPITAL LETTER C',
103 'LATIN CAPITAL LETTER D',
128 'LATIN CAPITAL LETTER D',
104 ....
129 ....
105
130
106 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
107 have long unicode names. for example ``Ν°``, ``\GREEK CAPITAL LETTER HETA``.
132 have long unicode names. for example ``Ν°``, ``\GREEK CAPITAL LETTER HETA``.
108
133
109 This feature was contributed by Luciana Marques :ghpull:`11583`.
134 This feature was contributed by Luciana Marques :ghpull:`11583`.
110
135
111 Make audio normalization optional
136 Make audio normalization optional
112 ---------------------------------
137 ---------------------------------
113
138
114 Added 'normalize' argument to `IPython.display.Audio`. This argument applies
139 Added 'normalize' argument to `IPython.display.Audio`. This argument applies
115 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`
116 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.
117 Setting to `False` disables normalization.
142 Setting to `False` disables normalization.
118
143
119
144
120 Miscelanious
145 Miscelanious
121 ------------
146 ------------
122
147
123 - Fix improper acceptation of ``return`` outside of functions. :ghpull:`11641`.
148 - Fix improper acceptation of ``return`` outside of functions. :ghpull:`11641`.
124 - Fixed PyQt 5.11 backwards incompatibility causing sip import failure.
149 - Fixed PyQt 5.11 backwards incompatibility causing sip import failure.
125 :ghpull:`11613`.
150 :ghpull:`11613`.
126 - Fix Bug where ``type?`` would crash IPython. :ghpull:`1608`.
151 - Fix Bug where ``type?`` would crash IPython. :ghpull:`1608`.
127 - Allow to apply ``@needs_local_scope`` to cell magics for convenience.
152 - Allow to apply ``@needs_local_scope`` to cell magics for convenience.
128 :ghpull:`11542`.
153 :ghpull:`11542`.
129
154
130 .. _whatsnew730:
155 .. _whatsnew730:
131
156
132 IPython 7.3.0
157 IPython 7.3.0
133 =============
158 =============
134
159
135 .. _whatsnew720:
160 .. _whatsnew720:
136
161
137 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
138 described bellow.
163 described bellow.
139
164
140 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
141 ``%pip`` magics, that will attempt to install packages in the **current
166 ``%pip`` magics, that will attempt to install packages in the **current
142 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
143 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
144 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
145 still the prefer method.
170 still the prefer method.
146
171
147 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
148 will actually forward commands to pip.
173 will actually forward commands to pip.
149
174
150 Misc bug fixes and improvements:
175 Misc bug fixes and improvements:
151
176
152 - Compatibility with Python 3.8.
177 - Compatibility with Python 3.8.
153 - Do not expand shell variable in execution magics, and added the
178 - Do not expand shell variable in execution magics, and added the
154 ``no_var_expand`` decorator for magic requiring a similar functionality
179 ``no_var_expand`` decorator for magic requiring a similar functionality
155 :ghpull:`11516`
180 :ghpull:`11516`
156 - Add ``%pip`` and ``%conda`` magic :ghpull:`11524`
181 - Add ``%pip`` and ``%conda`` magic :ghpull:`11524`
157 - Re-initialize posix aliases after a ``%reset`` :ghpull:`11528`
182 - Re-initialize posix aliases after a ``%reset`` :ghpull:`11528`
158 - Allow the IPython command line to run ``*.ipynb`` files :ghpull:`11529`
183 - Allow the IPython command line to run ``*.ipynb`` files :ghpull:`11529`
159
184
160 IPython 7.2.0
185 IPython 7.2.0
161 =============
186 =============
162
187
163 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:
164
189
165 - Fix a bug preventing PySide2 GUI integration from working :ghpull:`11464`
190 - Fix a bug preventing PySide2 GUI integration from working :ghpull:`11464`
166 - Run CI on Mac OS ! :ghpull:`11471`
191 - Run CI on Mac OS ! :ghpull:`11471`
167 - Fix IPython "Demo" mode. :ghpull:`11498`
192 - Fix IPython "Demo" mode. :ghpull:`11498`
168 - Fix ``%run`` magic with path in name :ghpull:`11499`
193 - Fix ``%run`` magic with path in name :ghpull:`11499`
169 - Fix: add CWD to sys.path *after* stdlib :ghpull:`11502`
194 - Fix: add CWD to sys.path *after* stdlib :ghpull:`11502`
170 - Better rendering of signatures, especially long ones. :ghpull:`11505`
195 - Better rendering of signatures, especially long ones. :ghpull:`11505`
171 - Re-enable jedi by default if it's installed :ghpull:`11506`
196 - Re-enable jedi by default if it's installed :ghpull:`11506`
172 - 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`
173
198
174
199
175 Added ability to show subclasses when using pinfo and other utilities
200 Added ability to show subclasses when using pinfo and other utilities
176 ---------------------------------------------------------------------
201 ---------------------------------------------------------------------
177
202
178 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.
179
204
180 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
181 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
182 funding.
207 funding.
183
208
184 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,
185 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.
186
211
187 OSMagics.cd_force_quiet configuration option
212 OSMagics.cd_force_quiet configuration option
188 --------------------------------------------
213 --------------------------------------------
189
214
190 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:
191 ::
216 ::
192
217
193 In [1]: cd /
218 In [1]: cd /
194 /
219 /
195
220
196 In [2]: %config OSMagics.cd_force_quiet = True
221 In [2]: %config OSMagics.cd_force_quiet = True
197
222
198 In [3]: cd /tmp
223 In [3]: cd /tmp
199
224
200 In [4]:
225 In [4]:
201
226
202 See :ghpull:`11491`
227 See :ghpull:`11491`
203
228
204 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
205 -----------------------------------------------------------------------------------------
230 -----------------------------------------------------------------------------------------
206
231
207 Set the ``TerminalInteractiveShell.prompt_includes_vi_mode`` to a boolean value
232 Set the ``TerminalInteractiveShell.prompt_includes_vi_mode`` to a boolean value
208 (default: True) to control this feature. See :ghpull:`11492`
233 (default: True) to control this feature. See :ghpull:`11492`
209
234
210 .. _whatsnew710:
235 .. _whatsnew710:
211
236
212 IPython 7.1.0
237 IPython 7.1.0
213 =============
238 =============
214
239
215 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
216 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
217 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
218 unwillingly relying on a bug in CPython.
243 unwillingly relying on a bug in CPython.
219
244
220 New Core Dev:
245 New Core Dev:
221
246
222 - 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
223 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
224 commit rights. :ghissue:`11397`
249 commit rights. :ghissue:`11397`
225
250
226 Notable Changes
251 Notable Changes
227
252
228 - Major update of "latex to unicode" tab completion map (see below)
253 - Major update of "latex to unicode" tab completion map (see below)
229
254
230 Notable New Features:
255 Notable New Features:
231
256
232 - Restore functionality and documentation of the **sphinx directive**, which
257 - Restore functionality and documentation of the **sphinx directive**, which
233 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,
234 has a brand new documentation page :ref:`ipython_directive` (which needs
259 has a brand new documentation page :ref:`ipython_directive` (which needs
235 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.
236 :ghpull:`11402`
261 :ghpull:`11402`
237
262
238 - ``IPython.display.Video`` now supports ``width`` and ``height`` arguments,
263 - ``IPython.display.Video`` now supports ``width`` and ``height`` arguments,
239 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
240 width and height. :ghpull:`11353`
265 width and height. :ghpull:`11353`
241
266
242 - Warn when using ``HTML('<iframe>')`` instead of ``IFrame`` :ghpull:`11350`
267 - Warn when using ``HTML('<iframe>')`` instead of ``IFrame`` :ghpull:`11350`
243
268
244 - Allow Dynamic switching of editing mode between vi/emacs and show
269 - Allow Dynamic switching of editing mode between vi/emacs and show
245 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
246 TerminalInteractiveShell.editing_mode = 'vi'`` or ``%config
271 TerminalInteractiveShell.editing_mode = 'vi'`` or ``%config
247 TerminalInteractiveShell.editing_mode = 'emacs'`` to dynamically switch
272 TerminalInteractiveShell.editing_mode = 'emacs'`` to dynamically switch
248 between modes.
273 between modes.
249
274
250
275
251 Notable Fixes:
276 Notable Fixes:
252
277
253 - Fix entering of **multi-line blocks in terminal** IPython, and various
278 - Fix entering of **multi-line blocks in terminal** IPython, and various
254 crashes in the new input transformation machinery :ghpull:`11354`,
279 crashes in the new input transformation machinery :ghpull:`11354`,
255 :ghpull:`11356`, :ghpull:`11358`. These also fix a **Compatibility bug
280 :ghpull:`11356`, :ghpull:`11358`. These also fix a **Compatibility bug
256 with Python 3.7.1**.
281 with Python 3.7.1**.
257
282
258 - Fix moving through generator stack in ipdb :ghpull:`11266`
283 - Fix moving through generator stack in ipdb :ghpull:`11266`
259
284
260 - %Magic command arguments now support quoting. :ghpull:`11330`
285 - %Magic command arguments now support quoting. :ghpull:`11330`
261
286
262 - Re-add ``rprint`` and ``rprinte`` aliases. :ghpull:`11331`
287 - Re-add ``rprint`` and ``rprinte`` aliases. :ghpull:`11331`
263
288
264 - Remove implicit dependency on ``ipython_genutils`` :ghpull:`11317`
289 - Remove implicit dependency on ``ipython_genutils`` :ghpull:`11317`
265
290
266 - Make ``nonlocal`` raise ``SyntaxError`` instead of silently failing in async
291 - Make ``nonlocal`` raise ``SyntaxError`` instead of silently failing in async
267 mode. :ghpull:`11382`
292 mode. :ghpull:`11382`
268
293
269 - Fix mishandling of magics and ``= !`` assignment just after a dedent in
294 - Fix mishandling of magics and ``= !`` assignment just after a dedent in
270 nested code blocks :ghpull:`11418`
295 nested code blocks :ghpull:`11418`
271
296
272 - Fix instructions for custom shortcuts :ghpull:`11426`
297 - Fix instructions for custom shortcuts :ghpull:`11426`
273
298
274
299
275 Notable Internals improvements:
300 Notable Internals improvements:
276
301
277 - 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.
278 :ghpull:`11365`
303 :ghpull:`11365`
279
304
280 - use ``perf_counter`` instead of ``clock`` for more precise
305 - use ``perf_counter`` instead of ``clock`` for more precise
281 timing results with ``%time`` :ghpull:`11376`
306 timing results with ``%time`` :ghpull:`11376`
282
307
283 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
284 ``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
285 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
286 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
287 complicated bugs.
312 complicated bugs.
288
313
289 You
314 You
290 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
291 <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+>`_.
292
317
293 Unicode Completion update
318 Unicode Completion update
294 -------------------------
319 -------------------------
295
320
296 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
297 the Julia language.
322 the Julia language.
298
323
299 Added and removed character characters:
324 Added and removed character characters:
300
325
301 ``\jmath`` (``Θ·``), ``\\underleftrightarrow`` (U+034D, combining) have been
326 ``\jmath`` (``Θ·``), ``\\underleftrightarrow`` (U+034D, combining) have been
302 added, while ``\\textasciicaron`` have been removed
327 added, while ``\\textasciicaron`` have been removed
303
328
304 Some sequences have seen their prefix removed:
329 Some sequences have seen their prefix removed:
305
330
306 - 6 characters ``\text...<tab>`` should now be inputed with ``\...<tab>`` directly,
331 - 6 characters ``\text...<tab>`` should now be inputed with ``\...<tab>`` directly,
307 - 45 characters ``\Elz...<tab>`` should now be inputed with ``\...<tab>`` directly,
332 - 45 characters ``\Elz...<tab>`` should now be inputed with ``\...<tab>`` directly,
308 - 65 characters ``\B...<tab>`` should now be inputed with ``\...<tab>`` directly,
333 - 65 characters ``\B...<tab>`` should now be inputed with ``\...<tab>`` directly,
309 - 450 characters ``\m...<tab>`` should now be inputed with ``\...<tab>`` directly,
334 - 450 characters ``\m...<tab>`` should now be inputed with ``\...<tab>`` directly,
310
335
311 Some sequences have seen their prefix shortened:
336 Some sequences have seen their prefix shortened:
312
337
313 - 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,
314 - 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,
315 - 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,
316 - 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,
317
342
318 A couple of characters had their sequence simplified:
343 A couple of characters had their sequence simplified:
319
344
320 - ``Γ°``, type ``\dh<tab>``, instead of ``\eth<tab>``
345 - ``Γ°``, type ``\dh<tab>``, instead of ``\eth<tab>``
321 - ``Δ§``, type ``\hbar<tab>``, instead of ``\Elzxh<tab>``
346 - ``Δ§``, type ``\hbar<tab>``, instead of ``\Elzxh<tab>``
322 - ``ΙΈ``, type ``\ltphi<tab>``, instead of ``\textphi<tab>``
347 - ``ΙΈ``, type ``\ltphi<tab>``, instead of ``\textphi<tab>``
323 - ``Ο΄``, type ``\varTheta<tab>``, instead of ``\textTheta<tab>``
348 - ``Ο΄``, type ``\varTheta<tab>``, instead of ``\textTheta<tab>``
324 - ``ℇ``, type ``\eulermascheroni<tab>``, instead of ``\Eulerconst<tab>``
349 - ``ℇ``, type ``\eulermascheroni<tab>``, instead of ``\Eulerconst<tab>``
325 - ``β„Ž``, type ``\planck<tab>``, instead of ``\Planckconst<tab>``
350 - ``β„Ž``, type ``\planck<tab>``, instead of ``\Planckconst<tab>``
326
351
327 - 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>``.
328
353
329 A couple of sequences have been updated:
354 A couple of sequences have been updated:
330
355
331 - ``\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),
332 - ``\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).
333
358
334
359
335 .. _whatsnew700:
360 .. _whatsnew700:
336
361
337 IPython 7.0.0
362 IPython 7.0.0
338 =============
363 =============
339
364
340 Released Thursday September 27th, 2018
365 Released Thursday September 27th, 2018
341
366
342 IPython 7 includes major feature improvements.
367 IPython 7 includes major feature improvements.
343 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
344 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
345 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"
346 is on Jan 1st 2020.
371 is on Jan 1st 2020.
347
372
348 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
349 backported more than `70 Pull-Requests
374 backported more than `70 Pull-Requests
350 <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>`_
351
376
352 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
353 bugs are found.
378 bugs are found.
354
379
355 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:
356
381
357 .. code::
382 .. code::
358
383
359 pip install ipython --upgrade
384 pip install ipython --upgrade
360
385
361 .. only:: ipydev
386 .. only:: ipydev
362
387
363 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``
364 version, use pip ``--pre`` flag.
389 version, use pip ``--pre`` flag.
365
390
366 .. code::
391 .. code::
367
392
368 pip install ipython --upgrade --pre
393 pip install ipython --upgrade --pre
369
394
370
395
371 Or, if you have conda installed:
396 Or, if you have conda installed:
372
397
373 .. code::
398 .. code::
374
399
375 conda install ipython
400 conda install ipython
376
401
377
402
378
403
379 Prompt Toolkit 2.0
404 Prompt Toolkit 2.0
380 ------------------
405 ------------------
381
406
382 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
383 ``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``.
384
409
385 Autowait: Asynchronous REPL
410 Autowait: Asynchronous REPL
386 ---------------------------
411 ---------------------------
387
412
388 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``
389 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
390 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
391 :ghpull:`11265`, or try the following code::
416 :ghpull:`11265`, or try the following code::
392
417
393 Python 3.6.0
418 Python 3.6.0
394 Type 'copyright', 'credits' or 'license' for more information
419 Type 'copyright', 'credits' or 'license' for more information
395 IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help.
420 IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help.
396
421
397 In [1]: import aiohttp
422 In [1]: import aiohttp
398 ...: result = aiohttp.get('https://api.github.com')
423 ...: result = aiohttp.get('https://api.github.com')
399
424
400 In [2]: response = await result
425 In [2]: response = await result
401 <pause for a few 100s ms>
426 <pause for a few 100s ms>
402
427
403 In [3]: await response.json()
428 In [3]: await response.json()
404 Out[3]:
429 Out[3]:
405 {'authorizations_url': 'https://api.github.com/authorizations',
430 {'authorizations_url': 'https://api.github.com/authorizations',
406 '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}',
407 ...
432 ...
408 }
433 }
409
434
410 .. note::
435 .. note::
411
436
412 Async integration is experimental code, behavior may change or be removed
437 Async integration is experimental code, behavior may change or be removed
413 between Python and IPython versions without warnings.
438 between Python and IPython versions without warnings.
414
439
415 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 --
416 like ``curio`` or ``trio`` -- to improve concurrency in the REPL::
441 like ``curio`` or ``trio`` -- to improve concurrency in the REPL::
417
442
418 In [1]: %autoawait trio
443 In [1]: %autoawait trio
419
444
420 In [2]: import trio
445 In [2]: import trio
421
446
422 In [3]: async def child(i):
447 In [3]: async def child(i):
423 ...: print(" child %s goes to sleep"%i)
448 ...: print(" child %s goes to sleep"%i)
424 ...: await trio.sleep(2)
449 ...: await trio.sleep(2)
425 ...: print(" child %s wakes up"%i)
450 ...: print(" child %s wakes up"%i)
426
451
427 In [4]: print('parent start')
452 In [4]: print('parent start')
428 ...: async with trio.open_nursery() as n:
453 ...: async with trio.open_nursery() as n:
429 ...: for i in range(3):
454 ...: for i in range(3):
430 ...: n.spawn(child, i)
455 ...: n.spawn(child, i)
431 ...: print('parent end')
456 ...: print('parent end')
432 parent start
457 parent start
433 child 2 goes to sleep
458 child 2 goes to sleep
434 child 0 goes to sleep
459 child 0 goes to sleep
435 child 1 goes to sleep
460 child 1 goes to sleep
436 <about 2 seconds pause>
461 <about 2 seconds pause>
437 child 2 wakes up
462 child 2 wakes up
438 child 1 wakes up
463 child 1 wakes up
439 child 0 wakes up
464 child 0 wakes up
440 parent end
465 parent end
441
466
442 See :ref:`autoawait` for more information.
467 See :ref:`autoawait` for more information.
443
468
444
469
445 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
446 Jupyter Protocol will require further updates to the IPykernel package.
471 Jupyter Protocol will require further updates to the IPykernel package.
447
472
448 Non-Asynchronous code
473 Non-Asynchronous code
449 ~~~~~~~~~~~~~~~~~~~~~
474 ~~~~~~~~~~~~~~~~~~~~~
450
475
451 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
452 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`
453 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
454 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
455 via a pseudo-synchronous runner, and may not advance pending tasks.
480 via a pseudo-synchronous runner, and may not advance pending tasks.
456
481
457 Change to Nested Embed
482 Change to Nested Embed
458 ~~~~~~~~~~~~~~~~~~~~~~
483 ~~~~~~~~~~~~~~~~~~~~~~
459
484
460 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
461 ``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
462 code unless an event loop is specified.
487 code unless an event loop is specified.
463
488
464 Effects on Magics
489 Effects on Magics
465 ~~~~~~~~~~~~~~~~~
490 ~~~~~~~~~~~~~~~~~
466
491
467 Some magics will not work with async until they're updated.
492 Some magics will not work with async until they're updated.
468 Contributions welcome.
493 Contributions welcome.
469
494
470 Expected Future changes
495 Expected Future changes
471 ~~~~~~~~~~~~~~~~~~~~~~~
496 ~~~~~~~~~~~~~~~~~~~~~~~
472
497
473 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
474 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.
475
500
476 Thanks
501 Thanks
477 ~~~~~~
502 ~~~~~~
478
503
479 This release took more than a year in the making.
504 This release took more than a year in the making.
480 The code was rebased a number of
505 The code was rebased a number of
481 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
482 Pull-Request. Huge thanks to many people for contribution, discussion, code,
507 Pull-Request. Huge thanks to many people for contribution, discussion, code,
483 documentation, use-cases: dalejung, danielballan, ellisonbg, fperez, gnestor,
508 documentation, use-cases: dalejung, danielballan, ellisonbg, fperez, gnestor,
484 minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many others.
509 minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many others.
485
510
486
511
487 Autoreload Improvement
512 Autoreload Improvement
488 ----------------------
513 ----------------------
489
514
490 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
491 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
492 tracked and updated.
517 tracked and updated.
493
518
494 This new feature helps dual environment development - Jupyter+IDE - where the
519 This new feature helps dual environment development - Jupyter+IDE - where the
495 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
496 structured.
521 structured.
497
522
498 **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
499 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
500 disk.
525 disk.
501
526
502
527
503 .. code::
528 .. code::
504
529
505 # notebook
530 # notebook
506
531
507 from mymodule import MyClass
532 from mymodule import MyClass
508 first = MyClass(5)
533 first = MyClass(5)
509
534
510 .. code::
535 .. code::
511
536
512 # mymodule/file1.py
537 # mymodule/file1.py
513
538
514 class MyClass:
539 class MyClass:
515
540
516 def __init__(self, a=10):
541 def __init__(self, a=10):
517 self.a = a
542 self.a = a
518
543
519 def square(self):
544 def square(self):
520 print('compute square')
545 print('compute square')
521 return self.a*self.a
546 return self.a*self.a
522
547
523 # def cube(self):
548 # def cube(self):
524 # print('compute cube')
549 # print('compute cube')
525 # return self.a*self.a*self.a
550 # return self.a*self.a*self.a
526
551
527
552
528
553
529
554
530 Misc
555 Misc
531 ----
556 ----
532
557
533 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
534 un-deprecated in :ghpull:`11257`
559 un-deprecated in :ghpull:`11257`
535
560
536 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
537 passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308`
562 passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308`
538
563
539
564
540 The :cellmagic:`%%script` (as well as :cellmagic:`%%bash`,
565 The :cellmagic:`%%script` (as well as :cellmagic:`%%bash`,
541 :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
542 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
543 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.
544
569
545
570
546 Deprecations
571 Deprecations
547 ------------
572 ------------
548
573
549 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
550 in future versions:
575 in future versions:
551
576
552 - ``IPython.utils.io.raw_print_err``
577 - ``IPython.utils.io.raw_print_err``
553 - ``IPython.utils.io.raw_print``
578 - ``IPython.utils.io.raw_print``
554
579
555
580
556 Backwards incompatible changes
581 Backwards incompatible changes
557 ------------------------------
582 ------------------------------
558
583
559 * 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
560 completely redesigned: any custom input transformations will need to be
585 completely redesigned: any custom input transformations will need to be
561 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