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