Show More
@@ -1,1671 +1,1716 b'' | |||||
1 | ============ |
|
1 | ============ | |
2 | 7.x Series |
|
2 | 7.x Series | |
3 | ============ |
|
3 | ============ | |
4 |
|
4 | |||
|
5 | .. _version 7.30: | |||
|
6 | ||||
|
7 | IPython 7.30 | |||
|
8 | ============ | |||
|
9 | ||||
|
10 | IPython 7.30 fixes a couple of bugs introduce in previous releases (in | |||
|
11 | particular with respect to path handling), and introduce a few features and | |||
|
12 | improvements: | |||
|
13 | ||||
|
14 | Notably we will highlight :ghpull:`13267` "Document that ``%run`` can execute | |||
|
15 | notebooks and ipy scripts.", which is the first commit of Fernando PΓ©rez since | |||
|
16 | mid 2016 (IPython 5.1). If you are new to IPython, Fernando created IPython in | |||
|
17 | 2001. The other most recent contribution of Fernando to IPython itself was | |||
|
18 | May 2018, by reviewing and merging PRs. I want to note that Fernando is still | |||
|
19 | active but mostly as a mentor and leader of the whole Jupyter organisation, but | |||
|
20 | we're still happy to see him contribute code ! | |||
|
21 | ||||
|
22 | :ghpull:`13290` "Use sphinxify (if available) in object_inspect_mime path" | |||
|
23 | should allow richer Repr of docstrings when using jupyterlab inspector. | |||
|
24 | ||||
|
25 | :ghpull:`13311` make the debugger use ``ThreadPoolExecutor`` for debugger cmdloop. | |||
|
26 | This should fix some issues/infinite loop, but let us know if you come across | |||
|
27 | any regressions. In particular this fixes issues with `kmaork/madbg <https://github.com/kmaork/madbg>`_, | |||
|
28 | a remote debugger for IPython. | |||
|
29 | ||||
|
30 | Note that this is likely the ante-penultimate release of IPython 7.x as a stable | |||
|
31 | branch, as I hope to release IPython 8.0 as well as IPython 7.31 next | |||
|
32 | month/early 2022. | |||
|
33 | ||||
|
34 | IPython 8.0 will drop support for Python 3.7, removed nose as a dependency, and | |||
|
35 | 7.x will only get critical bug fixes with 8.x becoming the new stable. This will | |||
|
36 | not be possible without `NumFOCUS Small Development Grants | |||
|
37 | <https://numfocus.org/programs/small-development-grants>`_ Which allowed us to | |||
|
38 | hire `Nikita Kniazev <https://github.com/Kojoley>`_ who provide Python and C++ | |||
|
39 | help and contracting work. | |||
|
40 | ||||
|
41 | ||||
|
42 | Many thanks to all the contributors to this release. You can find all individual | |||
|
43 | contributions to this milestone `on github | |||
|
44 | <https://github.com/ipython/ipython/milestone/94?closed=1>`__. | |||
|
45 | ||||
|
46 | Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring | |||
|
47 | work on IPython and related libraries. | |||
|
48 | ||||
|
49 | ||||
5 | .. _version 7.29: |
|
50 | .. _version 7.29: | |
6 |
|
51 | |||
7 | IPython 7.29 |
|
52 | IPython 7.29 | |
8 | ============ |
|
53 | ============ | |
9 |
|
54 | |||
10 |
|
55 | |||
11 | IPython 7.29 brings a couple of new functionalities to IPython and a number of bugfixes. |
|
56 | IPython 7.29 brings a couple of new functionalities to IPython and a number of bugfixes. | |
12 | It is one of the largest recent release, relatively speaking, with close to 15 Pull Requests. |
|
57 | It is one of the largest recent release, relatively speaking, with close to 15 Pull Requests. | |
13 |
|
58 | |||
14 |
|
59 | |||
15 | - fix an issue where base64 was returned instead of bytes when showing figures :ghpull:`13162` |
|
60 | - fix an issue where base64 was returned instead of bytes when showing figures :ghpull:`13162` | |
16 | - fix compatibility with PyQt6, PySide 6 :ghpull:`13172`. This may be of |
|
61 | - fix compatibility with PyQt6, PySide 6 :ghpull:`13172`. This may be of | |
17 | interest if you are running on Apple Silicon as only qt6.2+ is natively |
|
62 | interest if you are running on Apple Silicon as only qt6.2+ is natively | |
18 | compatible. |
|
63 | compatible. | |
19 | - fix matplotlib qtagg eventloop :ghpull:`13179` |
|
64 | - fix matplotlib qtagg eventloop :ghpull:`13179` | |
20 | - Multiple docs fixes, typos, ... etc. |
|
65 | - Multiple docs fixes, typos, ... etc. | |
21 | - Debugger will now exit by default on SigInt :ghpull:`13218`, this will be |
|
66 | - Debugger will now exit by default on SigInt :ghpull:`13218`, this will be | |
22 | useful in notebook/lab if you forgot to exit the debugger. "Interrupt Kernel" |
|
67 | useful in notebook/lab if you forgot to exit the debugger. "Interrupt Kernel" | |
23 | will now exist the debugger. |
|
68 | will now exist the debugger. | |
24 |
|
69 | |||
25 | It give Pdb the ability to skip code in decorators. If functions contain a |
|
70 | It give Pdb the ability to skip code in decorators. If functions contain a | |
26 | special value names ``__debuggerskip__ = True|False``, the function will not be |
|
71 | special value names ``__debuggerskip__ = True|False``, the function will not be | |
27 | stepped into, and Pdb will step into lower frames only if the value is set to |
|
72 | stepped into, and Pdb will step into lower frames only if the value is set to | |
28 | ``False``. The exact behavior is still likely to have corner cases and will be |
|
73 | ``False``. The exact behavior is still likely to have corner cases and will be | |
29 | refined in subsequent releases. Feedback welcome. See the debugger module |
|
74 | refined in subsequent releases. Feedback welcome. See the debugger module | |
30 | documentation for more info. Thanks to the `D. E. Shaw |
|
75 | documentation for more info. Thanks to the `D. E. Shaw | |
31 | group <https://deshaw.com/>`__ for funding this feature. |
|
76 | group <https://deshaw.com/>`__ for funding this feature. | |
32 |
|
77 | |||
33 | The main branch of IPython is receiving a number of changes as we received a |
|
78 | The main branch of IPython is receiving a number of changes as we received a | |
34 | `NumFOCUS SDG <https://numfocus.org/programs/small-development-grants>`__ |
|
79 | `NumFOCUS SDG <https://numfocus.org/programs/small-development-grants>`__ | |
35 | ($4800), to help us finish replacing ``nose`` by ``pytest``, and make IPython |
|
80 | ($4800), to help us finish replacing ``nose`` by ``pytest``, and make IPython | |
36 | future proof with an 8.0 release. |
|
81 | future proof with an 8.0 release. | |
37 |
|
82 | |||
38 |
|
83 | |||
39 | Many thanks to all the contributors to this release. You can find all individual |
|
84 | Many thanks to all the contributors to this release. You can find all individual | |
40 | contributions to this milestone `on github |
|
85 | contributions to this milestone `on github | |
41 | <https://github.com/ipython/ipython/milestone/93>`__. |
|
86 | <https://github.com/ipython/ipython/milestone/93>`__. | |
42 |
|
87 | |||
43 | Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring |
|
88 | Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring | |
44 | work on IPython and related libraries. |
|
89 | work on IPython and related libraries. | |
45 |
|
90 | |||
46 |
|
91 | |||
47 | .. _version 7.28: |
|
92 | .. _version 7.28: | |
48 |
|
93 | |||
49 | IPython 7.28 |
|
94 | IPython 7.28 | |
50 | ============ |
|
95 | ============ | |
51 |
|
96 | |||
52 |
|
97 | |||
53 | IPython 7.28 is again a minor release that mostly bring bugfixes, and couple of |
|
98 | IPython 7.28 is again a minor release that mostly bring bugfixes, and couple of | |
54 | improvement. Many thanks to MrMino, who again did all the work this month, and |
|
99 | improvement. Many thanks to MrMino, who again did all the work this month, and | |
55 | made a number of documentation improvements. |
|
100 | made a number of documentation improvements. | |
56 |
|
101 | |||
57 | Here is a non-exhaustive list of changes, |
|
102 | Here is a non-exhaustive list of changes, | |
58 |
|
103 | |||
59 | Fixes: |
|
104 | Fixes: | |
60 |
|
105 | |||
61 | - async with doesn't allow newlines :ghpull:`13090` |
|
106 | - async with doesn't allow newlines :ghpull:`13090` | |
62 | - Dynamically changing to vi mode via %config magic) :ghpull:`13091` |
|
107 | - Dynamically changing to vi mode via %config magic) :ghpull:`13091` | |
63 |
|
108 | |||
64 | Virtualenv handling fixes: |
|
109 | Virtualenv handling fixes: | |
65 |
|
110 | |||
66 | - init_virtualenv now uses Pathlib :ghpull:`12548` |
|
111 | - init_virtualenv now uses Pathlib :ghpull:`12548` | |
67 | - Fix Improper path comparison of virtualenv directories :ghpull:`13140` |
|
112 | - Fix Improper path comparison of virtualenv directories :ghpull:`13140` | |
68 | - Fix virtual environment user warning for lower case pathes :ghpull:`13094` |
|
113 | - Fix virtual environment user warning for lower case pathes :ghpull:`13094` | |
69 | - Adapt to all sorts of drive names for cygwin :ghpull:`13153` |
|
114 | - Adapt to all sorts of drive names for cygwin :ghpull:`13153` | |
70 |
|
115 | |||
71 | New Features: |
|
116 | New Features: | |
72 |
|
117 | |||
73 | - enable autoplay in embed YouTube player :ghpull:`13133` |
|
118 | - enable autoplay in embed YouTube player :ghpull:`13133` | |
74 |
|
119 | |||
75 | Documentation: |
|
120 | Documentation: | |
76 |
|
121 | |||
77 | - Fix formatting for the core.interactiveshell documentation :ghpull:`13118` |
|
122 | - Fix formatting for the core.interactiveshell documentation :ghpull:`13118` | |
78 | - Fix broken ipyparallel's refs :ghpull:`13138` |
|
123 | - Fix broken ipyparallel's refs :ghpull:`13138` | |
79 | - Improve formatting of %time documentation :ghpull:`13125` |
|
124 | - Improve formatting of %time documentation :ghpull:`13125` | |
80 | - Reword the YouTubeVideo autoplay WN :ghpull:`13147` |
|
125 | - Reword the YouTubeVideo autoplay WN :ghpull:`13147` | |
81 |
|
126 | |||
82 |
|
127 | |||
83 | Highlighted features |
|
128 | Highlighted features | |
84 | -------------------- |
|
129 | -------------------- | |
85 |
|
130 | |||
86 |
|
131 | |||
87 | ``YouTubeVideo`` autoplay and the ability to add extra attributes to ``IFrame`` |
|
132 | ``YouTubeVideo`` autoplay and the ability to add extra attributes to ``IFrame`` | |
88 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
133 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
89 |
|
134 | |||
90 | You can add any extra attributes to the ``<iframe>`` tag using the new |
|
135 | You can add any extra attributes to the ``<iframe>`` tag using the new | |
91 | ``extras`` argument in the ``IFrame`` class. For example:: |
|
136 | ``extras`` argument in the ``IFrame`` class. For example:: | |
92 |
|
137 | |||
93 | In [1]: from IPython.display import IFrame |
|
138 | In [1]: from IPython.display import IFrame | |
94 |
|
139 | |||
95 | In [2]: IFrame(src="src", width=300, height=300, extras=['loading="eager"']) |
|
140 | In [2]: IFrame(src="src", width=300, height=300, extras=['loading="eager"']) | |
96 |
|
141 | |||
97 | The above cells will result in the following HTML code being displayed in a |
|
142 | The above cells will result in the following HTML code being displayed in a | |
98 | notebook:: |
|
143 | notebook:: | |
99 |
|
144 | |||
100 | <iframe |
|
145 | <iframe | |
101 | width="300" |
|
146 | width="300" | |
102 | height="300" |
|
147 | height="300" | |
103 | src="src" |
|
148 | src="src" | |
104 | frameborder="0" |
|
149 | frameborder="0" | |
105 | allowfullscreen |
|
150 | allowfullscreen | |
106 | loading="eager" |
|
151 | loading="eager" | |
107 | ></iframe> |
|
152 | ></iframe> | |
108 |
|
153 | |||
109 | Related to the above, the ``YouTubeVideo`` class now takes an |
|
154 | Related to the above, the ``YouTubeVideo`` class now takes an | |
110 | ``allow_autoplay`` flag, which sets up the iframe of the embedded YouTube video |
|
155 | ``allow_autoplay`` flag, which sets up the iframe of the embedded YouTube video | |
111 | such that it allows autoplay. |
|
156 | such that it allows autoplay. | |
112 |
|
157 | |||
113 | .. note:: |
|
158 | .. note:: | |
114 | Whether this works depends on the autoplay policy of the browser rendering |
|
159 | Whether this works depends on the autoplay policy of the browser rendering | |
115 | the HTML allowing it. It also could get blocked by some browser extensions. |
|
160 | the HTML allowing it. It also could get blocked by some browser extensions. | |
116 |
|
161 | |||
117 | Try it out! |
|
162 | Try it out! | |
118 | :: |
|
163 | :: | |
119 |
|
164 | |||
120 | In [1]: from IPython.display import YouTubeVideo |
|
165 | In [1]: from IPython.display import YouTubeVideo | |
121 |
|
166 | |||
122 | In [2]: YouTubeVideo("dQw4w9WgXcQ", allow_autoplay=True) |
|
167 | In [2]: YouTubeVideo("dQw4w9WgXcQ", allow_autoplay=True) | |
123 |
|
168 | |||
124 |
|
169 | |||
125 |
|
170 | |||
126 | Thanks |
|
171 | Thanks | |
127 | ------ |
|
172 | ------ | |
128 |
|
173 | |||
129 | Many thanks to all the contributors to this release. You can find all individual |
|
174 | Many thanks to all the contributors to this release. You can find all individual | |
130 | contributions to this milestone `on github |
|
175 | contributions to this milestone `on github | |
131 | <https://github.com/ipython/ipython/milestone/92>`__. |
|
176 | <https://github.com/ipython/ipython/milestone/92>`__. | |
132 |
|
177 | |||
133 | Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring |
|
178 | Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring | |
134 | work on IPython and related libraries. |
|
179 | work on IPython and related libraries. | |
135 |
|
180 | |||
136 |
|
181 | |||
137 | .. _version 7.27: |
|
182 | .. _version 7.27: | |
138 |
|
183 | |||
139 | IPython 7.27 |
|
184 | IPython 7.27 | |
140 | ============ |
|
185 | ============ | |
141 |
|
186 | |||
142 | IPython 7.27 is a minor release that fixes a couple of issues and compatibility. |
|
187 | IPython 7.27 is a minor release that fixes a couple of issues and compatibility. | |
143 |
|
188 | |||
144 | - Add support for GTK4 :ghpull:`131011` |
|
189 | - Add support for GTK4 :ghpull:`131011` | |
145 | - Add support for Qt6 :ghpull:`13085` |
|
190 | - Add support for Qt6 :ghpull:`13085` | |
146 | - Fix an issue with pip magic on windows :ghpull:`13093` |
|
191 | - Fix an issue with pip magic on windows :ghpull:`13093` | |
147 |
|
192 | |||
148 | Thanks |
|
193 | Thanks | |
149 | ------ |
|
194 | ------ | |
150 |
|
195 | |||
151 | Many thanks to all the contributors to this release. You can find all individual |
|
196 | Many thanks to all the contributors to this release. You can find all individual | |
152 | contributions to this milestone `on github |
|
197 | contributions to this milestone `on github | |
153 | <https://github.com/ipython/ipython/milestone/91>`__. |
|
198 | <https://github.com/ipython/ipython/milestone/91>`__. | |
154 |
|
199 | |||
155 | Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring |
|
200 | Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring | |
156 | work on IPython and related libraries. |
|
201 | work on IPython and related libraries. | |
157 |
|
202 | |||
158 | .. _version 7.26: |
|
203 | .. _version 7.26: | |
159 |
|
204 | |||
160 | IPython 7.26 |
|
205 | IPython 7.26 | |
161 | ============ |
|
206 | ============ | |
162 |
|
207 | |||
163 | IPython 7.26 is a minor release that fixes a couple of issues, updates in API |
|
208 | IPython 7.26 is a minor release that fixes a couple of issues, updates in API | |
164 | and Copyright/Licenses issues around various part of the codebase. |
|
209 | and Copyright/Licenses issues around various part of the codebase. | |
165 |
|
210 | |||
166 | We'll highlight `this issue <https://github.com/ipython/ipython/issues/13039>` |
|
211 | We'll highlight `this issue <https://github.com/ipython/ipython/issues/13039>` | |
167 | pointing out we were including and refereeing to code from Stack Overflow which |
|
212 | pointing out we were including and refereeing to code from Stack Overflow which | |
168 | was CC-BY-SA, hence incompatible with the BSD license of IPython. This lead us |
|
213 | was CC-BY-SA, hence incompatible with the BSD license of IPython. This lead us | |
169 | to a rewriting of the corresponding logic which in our case was done in a more |
|
214 | to a rewriting of the corresponding logic which in our case was done in a more | |
170 | efficient way (in our case we were searching string prefixes instead of full |
|
215 | efficient way (in our case we were searching string prefixes instead of full | |
171 | strings). |
|
216 | strings). | |
172 |
|
217 | |||
173 | You will notice also a number of documentation improvements and cleanup. |
|
218 | You will notice also a number of documentation improvements and cleanup. | |
174 |
|
219 | |||
175 | Of particular interest are the following Pull-requests: |
|
220 | Of particular interest are the following Pull-requests: | |
176 |
|
221 | |||
177 |
|
222 | |||
178 | - The IPython directive now uses Sphinx logging for warnings. :ghpull:`13030`. |
|
223 | - The IPython directive now uses Sphinx logging for warnings. :ghpull:`13030`. | |
179 | - Add expiry days option to pastebin magic and change http protocol to https. |
|
224 | - Add expiry days option to pastebin magic and change http protocol to https. | |
180 | :ghpull:`13056` |
|
225 | :ghpull:`13056` | |
181 | - Make Ipython.utils.timing work with jupyterlite :ghpull:`13050`. |
|
226 | - Make Ipython.utils.timing work with jupyterlite :ghpull:`13050`. | |
182 |
|
227 | |||
183 | Pastebin magic expiry days option |
|
228 | Pastebin magic expiry days option | |
184 | --------------------------------- |
|
229 | --------------------------------- | |
185 |
|
230 | |||
186 | The Pastebin magic now has ``-e`` option to determine |
|
231 | The Pastebin magic now has ``-e`` option to determine | |
187 | the number of days for paste expiration. For example |
|
232 | the number of days for paste expiration. For example | |
188 | the paste that created with ``%pastebin -e 20 1`` magic will |
|
233 | the paste that created with ``%pastebin -e 20 1`` magic will | |
189 | be available for next 20 days. |
|
234 | be available for next 20 days. | |
190 |
|
235 | |||
191 |
|
236 | |||
192 |
|
237 | |||
193 |
|
238 | |||
194 |
|
239 | |||
195 | Thanks |
|
240 | Thanks | |
196 | ------ |
|
241 | ------ | |
197 |
|
242 | |||
198 | Many thanks to all the contributors to this release and in particular MrMino who |
|
243 | Many thanks to all the contributors to this release and in particular MrMino who | |
199 | is doing most of the work those days. You can find all individual contributions |
|
244 | is doing most of the work those days. You can find all individual contributions | |
200 | to this milestone `on github <https://github.com/ipython/ipython/milestone/90>`__. |
|
245 | to this milestone `on github <https://github.com/ipython/ipython/milestone/90>`__. | |
201 |
|
246 | |||
202 | Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring |
|
247 | Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring | |
203 | work on IPython and related libraries. |
|
248 | work on IPython and related libraries. | |
204 |
|
249 | |||
205 |
|
250 | |||
206 | .. _version 7.25: |
|
251 | .. _version 7.25: | |
207 |
|
252 | |||
208 | IPython 7.25 |
|
253 | IPython 7.25 | |
209 | ============ |
|
254 | ============ | |
210 |
|
255 | |||
211 | IPython 7.25 is a minor release that contains a single bugfix, which is highly |
|
256 | IPython 7.25 is a minor release that contains a single bugfix, which is highly | |
212 | recommended for all users of ipdb, ipython debugger %debug magic and similar. |
|
257 | recommended for all users of ipdb, ipython debugger %debug magic and similar. | |
213 |
|
258 | |||
214 | Issuing commands like ``where`` from within the debugger would reset the |
|
259 | Issuing commands like ``where`` from within the debugger would reset the | |
215 | local variables changes made by the user. It is interesting to look at the root |
|
260 | local variables changes made by the user. It is interesting to look at the root | |
216 | cause of the issue as accessing an attribute (``frame.f_locals``) would trigger |
|
261 | cause of the issue as accessing an attribute (``frame.f_locals``) would trigger | |
217 | this side effects. |
|
262 | this side effects. | |
218 |
|
263 | |||
219 | Thanks in particular to the patience from the reporters at D.E. Shaw for their |
|
264 | Thanks in particular to the patience from the reporters at D.E. Shaw for their | |
220 | initial bug report that was due to a similar coding oversight in an extension, |
|
265 | initial bug report that was due to a similar coding oversight in an extension, | |
221 | and who took time to debug and narrow down the problem. |
|
266 | and who took time to debug and narrow down the problem. | |
222 |
|
267 | |||
223 | Thanks |
|
268 | Thanks | |
224 | ------ |
|
269 | ------ | |
225 |
|
270 | |||
226 | Many thanks to all the contributors to this release you can find all individual |
|
271 | Many thanks to all the contributors to this release you can find all individual | |
227 | contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/89>`__. |
|
272 | contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/89>`__. | |
228 |
|
273 | |||
229 | Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring |
|
274 | Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring | |
230 | work on IPython and related libraries. |
|
275 | work on IPython and related libraries. | |
231 |
|
276 | |||
232 |
|
277 | |||
233 | .. _version 7.24: |
|
278 | .. _version 7.24: | |
234 |
|
279 | |||
235 | IPython 7.24 |
|
280 | IPython 7.24 | |
236 | ============ |
|
281 | ============ | |
237 |
|
282 | |||
238 | Third release of IPython for 2021, mostly containing bug fixes. A couple of not |
|
283 | Third release of IPython for 2021, mostly containing bug fixes. A couple of not | |
239 | typical updates: |
|
284 | typical updates: | |
240 |
|
285 | |||
241 | Misc |
|
286 | Misc | |
242 | ---- |
|
287 | ---- | |
243 |
|
288 | |||
244 |
|
289 | |||
245 | - Fix an issue where ``%recall`` would both succeeded and print an error message |
|
290 | - Fix an issue where ``%recall`` would both succeeded and print an error message | |
246 | it failed. :ghpull:`12952` |
|
291 | it failed. :ghpull:`12952` | |
247 | - Drop support for NumPy 1.16 β practically has no effect beyond indicating in |
|
292 | - Drop support for NumPy 1.16 β practically has no effect beyond indicating in | |
248 | package metadata that we do not support it. :ghpull:`12937` |
|
293 | package metadata that we do not support it. :ghpull:`12937` | |
249 |
|
294 | |||
250 | Debugger improvements |
|
295 | Debugger improvements | |
251 | --------------------- |
|
296 | --------------------- | |
252 |
|
297 | |||
253 | The debugger (and ``%debug`` magic) have been improved and can skip or hide frames |
|
298 | The debugger (and ``%debug`` magic) have been improved and can skip or hide frames | |
254 | originating from files that are not writable to the user, as these are less |
|
299 | originating from files that are not writable to the user, as these are less | |
255 | likely to be the source of errors, or be part of system files this can be a useful |
|
300 | likely to be the source of errors, or be part of system files this can be a useful | |
256 | addition when debugging long errors. |
|
301 | addition when debugging long errors. | |
257 |
|
302 | |||
258 | In addition to the global ``skip_hidden True|False`` command, the debugger has |
|
303 | In addition to the global ``skip_hidden True|False`` command, the debugger has | |
259 | gained finer grained control of predicates as to whether to a frame should be |
|
304 | gained finer grained control of predicates as to whether to a frame should be | |
260 | considered hidden. So far 3 predicates are available : |
|
305 | considered hidden. So far 3 predicates are available : | |
261 |
|
306 | |||
262 | - ``tbhide``: frames containing the local variable ``__tracebackhide__`` set to |
|
307 | - ``tbhide``: frames containing the local variable ``__tracebackhide__`` set to | |
263 | True. |
|
308 | True. | |
264 | - ``readonly``: frames originating from readonly files, set to False. |
|
309 | - ``readonly``: frames originating from readonly files, set to False. | |
265 | - ``ipython_internal``: frames that are likely to be from IPython internal |
|
310 | - ``ipython_internal``: frames that are likely to be from IPython internal | |
266 | code, set to True. |
|
311 | code, set to True. | |
267 |
|
312 | |||
268 | You can toggle individual predicates during a session with |
|
313 | You can toggle individual predicates during a session with | |
269 |
|
314 | |||
270 | .. code-block:: |
|
315 | .. code-block:: | |
271 |
|
316 | |||
272 | ipdb> skip_predicates readonly True |
|
317 | ipdb> skip_predicates readonly True | |
273 |
|
318 | |||
274 | Read-only files will now be considered hidden frames. |
|
319 | Read-only files will now be considered hidden frames. | |
275 |
|
320 | |||
276 |
|
321 | |||
277 | You can call ``skip_predicates`` without arguments to see the states of current |
|
322 | You can call ``skip_predicates`` without arguments to see the states of current | |
278 | predicates: |
|
323 | predicates: | |
279 |
|
324 | |||
280 | .. code-block:: |
|
325 | .. code-block:: | |
281 |
|
326 | |||
282 | ipdb> skip_predicates |
|
327 | ipdb> skip_predicates | |
283 | current predicates: |
|
328 | current predicates: | |
284 | tbhide : True |
|
329 | tbhide : True | |
285 | readonly : False |
|
330 | readonly : False | |
286 | ipython_internal : True |
|
331 | ipython_internal : True | |
287 |
|
332 | |||
288 | If all predicates are set to ``False``, ``skip_hidden`` will practically have |
|
333 | If all predicates are set to ``False``, ``skip_hidden`` will practically have | |
289 | no effect. We attempt to warn you when all predicates are False. |
|
334 | no effect. We attempt to warn you when all predicates are False. | |
290 |
|
335 | |||
291 | Note that the ``readonly`` predicate may increase disk access as we check for |
|
336 | Note that the ``readonly`` predicate may increase disk access as we check for | |
292 | file access permission for all frames on many command invocation, but is usually |
|
337 | file access permission for all frames on many command invocation, but is usually | |
293 | cached by operating systems. Let us know if you encounter any issues. |
|
338 | cached by operating systems. Let us know if you encounter any issues. | |
294 |
|
339 | |||
295 | As the IPython debugger does not use the traitlets infrastructure for |
|
340 | As the IPython debugger does not use the traitlets infrastructure for | |
296 | configuration, by editing your ``.pdbrc`` files and appending commands you would |
|
341 | configuration, by editing your ``.pdbrc`` files and appending commands you would | |
297 | like to be executed just before entering the interactive prompt. For example: |
|
342 | like to be executed just before entering the interactive prompt. For example: | |
298 |
|
343 | |||
299 |
|
344 | |||
300 | .. code:: |
|
345 | .. code:: | |
301 |
|
346 | |||
302 | # file : ~/.pdbrc |
|
347 | # file : ~/.pdbrc | |
303 | skip_predicates readonly True |
|
348 | skip_predicates readonly True | |
304 | skip_predicates tbhide False |
|
349 | skip_predicates tbhide False | |
305 |
|
350 | |||
306 | Will hide read only frames by default and show frames marked with |
|
351 | Will hide read only frames by default and show frames marked with | |
307 | ``__tracebackhide__``. |
|
352 | ``__tracebackhide__``. | |
308 |
|
353 | |||
309 |
|
354 | |||
310 |
|
355 | |||
311 |
|
356 | |||
312 | Thanks |
|
357 | Thanks | |
313 | ------ |
|
358 | ------ | |
314 |
|
359 | |||
315 | Many thanks to all the contributors to this release you can find all individual |
|
360 | Many thanks to all the contributors to this release you can find all individual | |
316 | contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/87>`__. |
|
361 | contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/87>`__. | |
317 |
|
362 | |||
318 | Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring |
|
363 | Thanks as well to the `D. E. Shaw group <https://deshaw.com/>`__ for sponsoring | |
319 | work on IPython and related libraries, in particular above mentioned |
|
364 | work on IPython and related libraries, in particular above mentioned | |
320 | improvements to the debugger. |
|
365 | improvements to the debugger. | |
321 |
|
366 | |||
322 |
|
367 | |||
323 |
|
368 | |||
324 |
|
369 | |||
325 | .. _version 7.23: |
|
370 | .. _version 7.23: | |
326 |
|
371 | |||
327 | IPython 7.23 and 7.23.1 |
|
372 | IPython 7.23 and 7.23.1 | |
328 | ======================= |
|
373 | ======================= | |
329 |
|
374 | |||
330 |
|
375 | |||
331 | Third release of IPython for 2021, mostly containing bug fixes. A couple of not |
|
376 | Third release of IPython for 2021, mostly containing bug fixes. A couple of not | |
332 | typical updates: |
|
377 | typical updates: | |
333 |
|
378 | |||
334 | - We moved to GitHub actions away from Travis-CI, the transition may not be |
|
379 | - We moved to GitHub actions away from Travis-CI, the transition may not be | |
335 | 100% complete (not testing on nightly anymore), but as we ran out of |
|
380 | 100% complete (not testing on nightly anymore), but as we ran out of | |
336 | Travis-Ci hours on the IPython organisation that was a necessary step. |
|
381 | Travis-Ci hours on the IPython organisation that was a necessary step. | |
337 | :ghpull:`12900`. |
|
382 | :ghpull:`12900`. | |
338 |
|
383 | |||
339 | - We have a new dependency: ``matplotlib-inline``, which try to extract |
|
384 | - We have a new dependency: ``matplotlib-inline``, which try to extract | |
340 | matplotlib inline backend specific behavior. It is available on PyPI and |
|
385 | matplotlib inline backend specific behavior. It is available on PyPI and | |
341 | conda-forge thus should not be a problem to upgrade to this version. If you |
|
386 | conda-forge thus should not be a problem to upgrade to this version. If you | |
342 | are a package maintainer that might be an extra dependency to package first. |
|
387 | are a package maintainer that might be an extra dependency to package first. | |
343 | :ghpull:`12817` (IPython 7.23.1 fix a typo that made this change fail) |
|
388 | :ghpull:`12817` (IPython 7.23.1 fix a typo that made this change fail) | |
344 |
|
389 | |||
345 | In the addition/new feature category, ``display()`` now have a ``clear=True`` |
|
390 | In the addition/new feature category, ``display()`` now have a ``clear=True`` | |
346 | option to clear the display if any further outputs arrives, allowing users to |
|
391 | option to clear the display if any further outputs arrives, allowing users to | |
347 | avoid having to use ``clear_output()`` directly. :ghpull:`12823`. |
|
392 | avoid having to use ``clear_output()`` directly. :ghpull:`12823`. | |
348 |
|
393 | |||
349 | In bug fixes category, this release fix an issue when printing tracebacks |
|
394 | In bug fixes category, this release fix an issue when printing tracebacks | |
350 | containing Unicode characters :ghpull:`12758`. |
|
395 | containing Unicode characters :ghpull:`12758`. | |
351 |
|
396 | |||
352 | In code cleanup category :ghpull:`12932` remove usage of some deprecated |
|
397 | In code cleanup category :ghpull:`12932` remove usage of some deprecated | |
353 | functionality for compatibility with Python 3.10. |
|
398 | functionality for compatibility with Python 3.10. | |
354 |
|
399 | |||
355 |
|
400 | |||
356 |
|
401 | |||
357 | Thanks |
|
402 | Thanks | |
358 | ------ |
|
403 | ------ | |
359 |
|
404 | |||
360 | Many thanks to all the contributors to this release you can find all individual |
|
405 | Many thanks to all the contributors to this release you can find all individual | |
361 | contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/86>`__. |
|
406 | contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/86>`__. | |
362 | In particular MrMino for responding to almost all new issues, and triaging many |
|
407 | In particular MrMino for responding to almost all new issues, and triaging many | |
363 | of the old ones, as well as takluyver, minrk, willingc for reacting quikly when |
|
408 | of the old ones, as well as takluyver, minrk, willingc for reacting quikly when | |
364 | we ran out of CI Hours. |
|
409 | we ran out of CI Hours. | |
365 |
|
410 | |||
366 | Thanks as well to organisations, QuantStack (martinRenou and SylvainCorlay) for |
|
411 | Thanks as well to organisations, QuantStack (martinRenou and SylvainCorlay) for | |
367 | extracting matplotlib inline backend into its own package, and the `D. E. Shaw group |
|
412 | extracting matplotlib inline backend into its own package, and the `D. E. Shaw group | |
368 | <https://deshaw.com/>`__ for sponsoring work on IPython and related libraries. |
|
413 | <https://deshaw.com/>`__ for sponsoring work on IPython and related libraries. | |
369 |
|
414 | |||
370 |
|
415 | |||
371 | .. _version 7.22: |
|
416 | .. _version 7.22: | |
372 |
|
417 | |||
373 | IPython 7.22 |
|
418 | IPython 7.22 | |
374 | ============ |
|
419 | ============ | |
375 |
|
420 | |||
376 | Second release of IPython for 2021, mostly containing bug fixes. Here is a quick |
|
421 | Second release of IPython for 2021, mostly containing bug fixes. Here is a quick | |
377 | rundown of the few changes. |
|
422 | rundown of the few changes. | |
378 |
|
423 | |||
379 | - Fix some ``sys.excepthook`` shenanigan when embedding with qt, recommended if |
|
424 | - Fix some ``sys.excepthook`` shenanigan when embedding with qt, recommended if | |
380 | you β for example β use `napari <https://napari.org>`__. :ghpull:`12842`. |
|
425 | you β for example β use `napari <https://napari.org>`__. :ghpull:`12842`. | |
381 | - Fix bug when using the new ipdb ``%context`` magic :ghpull:`12844` |
|
426 | - Fix bug when using the new ipdb ``%context`` magic :ghpull:`12844` | |
382 | - Couples of deprecation cleanup :ghpull:`12868` |
|
427 | - Couples of deprecation cleanup :ghpull:`12868` | |
383 | - Update for new dpast.com api if you use the ``%pastbin`` magic. :ghpull:`12712` |
|
428 | - Update for new dpast.com api if you use the ``%pastbin`` magic. :ghpull:`12712` | |
384 | - Remove support for numpy before 1.16. :ghpull:`12836` |
|
429 | - Remove support for numpy before 1.16. :ghpull:`12836` | |
385 |
|
430 | |||
386 |
|
431 | |||
387 | Thanks |
|
432 | Thanks | |
388 | ------ |
|
433 | ------ | |
389 |
|
434 | |||
390 | We have a new team member that you should see more often on the IPython |
|
435 | We have a new team member that you should see more often on the IPython | |
391 | repository, BΕaΕΌej Michalik (@MrMino) have been doing regular contributions to |
|
436 | repository, BΕaΕΌej Michalik (@MrMino) have been doing regular contributions to | |
392 | IPython, and spent time replying to many issues and guiding new users to the |
|
437 | IPython, and spent time replying to many issues and guiding new users to the | |
393 | codebase; they now have triage permissions to the IPython repository and we'll |
|
438 | codebase; they now have triage permissions to the IPython repository and we'll | |
394 | work toward giving them more permission in the future. |
|
439 | work toward giving them more permission in the future. | |
395 |
|
440 | |||
396 | Many thanks to all the contributors to this release you can find all individual |
|
441 | Many thanks to all the contributors to this release you can find all individual | |
397 | contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/84>`__. |
|
442 | contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/84>`__. | |
398 |
|
443 | |||
399 | Thanks as well to organisations, QuantStack for working on debugger |
|
444 | Thanks as well to organisations, QuantStack for working on debugger | |
400 | compatibility for Xeus_python, and the `D. E. Shaw group |
|
445 | compatibility for Xeus_python, and the `D. E. Shaw group | |
401 | <https://deshaw.com/>`__ for sponsoring work on IPython and related libraries. |
|
446 | <https://deshaw.com/>`__ for sponsoring work on IPython and related libraries. | |
402 |
|
447 | |||
403 | .. _version 721: |
|
448 | .. _version 721: | |
404 |
|
449 | |||
405 | IPython 7.21 |
|
450 | IPython 7.21 | |
406 | ============ |
|
451 | ============ | |
407 |
|
452 | |||
408 | IPython 7.21 is the first release we have back on schedule of one release every |
|
453 | IPython 7.21 is the first release we have back on schedule of one release every | |
409 | month; it contains a number of minor fixes and improvements, notably, the new |
|
454 | month; it contains a number of minor fixes and improvements, notably, the new | |
410 | context command for ipdb |
|
455 | context command for ipdb | |
411 |
|
456 | |||
412 |
|
457 | |||
413 | New "context" command in ipdb |
|
458 | New "context" command in ipdb | |
414 | ----------------------------- |
|
459 | ----------------------------- | |
415 |
|
460 | |||
416 | It is now possible to change the number of lines shown in the backtrace |
|
461 | It is now possible to change the number of lines shown in the backtrace | |
417 | information in ipdb using "context" command. :ghpull:`12826` |
|
462 | information in ipdb using "context" command. :ghpull:`12826` | |
418 |
|
463 | |||
419 | (thanks @MrMino, there are other improvement from them on master). |
|
464 | (thanks @MrMino, there are other improvement from them on master). | |
420 |
|
465 | |||
421 | Other notable changes in IPython 7.21 |
|
466 | Other notable changes in IPython 7.21 | |
422 | ------------------------------------- |
|
467 | ------------------------------------- | |
423 |
|
468 | |||
424 | - Fix some issues on new osx-arm64 :ghpull:`12804`, :ghpull:`12807`. |
|
469 | - Fix some issues on new osx-arm64 :ghpull:`12804`, :ghpull:`12807`. | |
425 | - Compatibility with Xeus-Python for debugger protocol, :ghpull:`12809` |
|
470 | - Compatibility with Xeus-Python for debugger protocol, :ghpull:`12809` | |
426 | - Misc docs fixes for compatibility and uniformity with Numpydoc. |
|
471 | - Misc docs fixes for compatibility and uniformity with Numpydoc. | |
427 | :ghpull:`12824` |
|
472 | :ghpull:`12824` | |
428 |
|
473 | |||
429 |
|
474 | |||
430 | Thanks |
|
475 | Thanks | |
431 | ------ |
|
476 | ------ | |
432 |
|
477 | |||
433 | Many thanks to all the contributors to this release you can find all individual |
|
478 | Many thanks to all the contributors to this release you can find all individual | |
434 | contribution to this milestone `on github <https://github.com/ipython/ipython/milestone/83>`__. |
|
479 | contribution to this milestone `on github <https://github.com/ipython/ipython/milestone/83>`__. | |
435 |
|
480 | |||
436 |
|
481 | |||
437 | .. _version 720: |
|
482 | .. _version 720: | |
438 |
|
483 | |||
439 | IPython 7.20 |
|
484 | IPython 7.20 | |
440 | ============ |
|
485 | ============ | |
441 |
|
486 | |||
442 | IPython 7.20 is the accumulation of 3 month of work on IPython, spacing between |
|
487 | IPython 7.20 is the accumulation of 3 month of work on IPython, spacing between | |
443 | IPython release have been increased from the usual once a month for various |
|
488 | IPython release have been increased from the usual once a month for various | |
444 | reason. |
|
489 | reason. | |
445 |
|
490 | |||
446 | - Mainly as I'm too busy and the effectively sole maintainer, and |
|
491 | - Mainly as I'm too busy and the effectively sole maintainer, and | |
447 | - Second because not much changes happened before mid December. |
|
492 | - Second because not much changes happened before mid December. | |
448 |
|
493 | |||
449 | The main driver for this release was the new version of Jedi 0.18 breaking API; |
|
494 | The main driver for this release was the new version of Jedi 0.18 breaking API; | |
450 | which was taken care of in the master branch early in 2020 but not in 7.x as I |
|
495 | which was taken care of in the master branch early in 2020 but not in 7.x as I | |
451 | though that by now 8.0 would be out. |
|
496 | though that by now 8.0 would be out. | |
452 |
|
497 | |||
453 | The inclusion of a resolver in pip did not help and actually made things worse. |
|
498 | The inclusion of a resolver in pip did not help and actually made things worse. | |
454 | If usually I would have simply pinned Jedi to ``<0.18``; this is not a solution |
|
499 | If usually I would have simply pinned Jedi to ``<0.18``; this is not a solution | |
455 | anymore as now pip is free to install Jedi 0.18, and downgrade IPython. |
|
500 | anymore as now pip is free to install Jedi 0.18, and downgrade IPython. | |
456 |
|
501 | |||
457 | I'll do my best to keep the regular release, but as the 8.0-dev branch and 7.x |
|
502 | I'll do my best to keep the regular release, but as the 8.0-dev branch and 7.x | |
458 | are starting to diverge this is becoming difficult in particular with my limited |
|
503 | are starting to diverge this is becoming difficult in particular with my limited | |
459 | time, so if you have any cycles to spare I'll appreciate your help to respond to |
|
504 | time, so if you have any cycles to spare I'll appreciate your help to respond to | |
460 | issues and pushing 8.0 forward. |
|
505 | issues and pushing 8.0 forward. | |
461 |
|
506 | |||
462 | Here are thus some of the changes for IPython 7.20. |
|
507 | Here are thus some of the changes for IPython 7.20. | |
463 |
|
508 | |||
464 | - Support for PyQt5 >= 5.11 :ghpull:`12715` |
|
509 | - Support for PyQt5 >= 5.11 :ghpull:`12715` | |
465 | - ``%reset`` remove imports more agressively :ghpull:`12718` |
|
510 | - ``%reset`` remove imports more agressively :ghpull:`12718` | |
466 | - fix the ``%conda`` magic :ghpull:`12739` |
|
511 | - fix the ``%conda`` magic :ghpull:`12739` | |
467 | - compatibility with Jedi 0.18, and bump minimum Jedi version. :ghpull:`12793` |
|
512 | - compatibility with Jedi 0.18, and bump minimum Jedi version. :ghpull:`12793` | |
468 |
|
513 | |||
469 |
|
514 | |||
470 | .. _version 719: |
|
515 | .. _version 719: | |
471 |
|
516 | |||
472 | IPython 7.19 |
|
517 | IPython 7.19 | |
473 | ============ |
|
518 | ============ | |
474 |
|
519 | |||
475 | IPython 7.19 accumulative two month of works, bug fixes and improvements, there |
|
520 | IPython 7.19 accumulative two month of works, bug fixes and improvements, there | |
476 | was exceptionally no release last month. |
|
521 | was exceptionally no release last month. | |
477 |
|
522 | |||
478 | - Fix to restore the ability to specify more than one extension using command |
|
523 | - Fix to restore the ability to specify more than one extension using command | |
479 | line flags when using traitlets 5.0 :ghpull:`12543` |
|
524 | line flags when using traitlets 5.0 :ghpull:`12543` | |
480 | - Docs docs formatting that make the install commands work on zsh |
|
525 | - Docs docs formatting that make the install commands work on zsh | |
481 | :ghpull:`12587` |
|
526 | :ghpull:`12587` | |
482 | - Always display the last frame in tracebacks even if hidden with |
|
527 | - Always display the last frame in tracebacks even if hidden with | |
483 | ``__tracebackhide__`` :ghpull:`12601` |
|
528 | ``__tracebackhide__`` :ghpull:`12601` | |
484 | - Avoid an issue where a callback can be registered multiple times. |
|
529 | - Avoid an issue where a callback can be registered multiple times. | |
485 | :ghpull:`12625` |
|
530 | :ghpull:`12625` | |
486 | - Avoid an issue in debugger mode where frames changes could be lost. |
|
531 | - Avoid an issue in debugger mode where frames changes could be lost. | |
487 | :ghpull:`12627` |
|
532 | :ghpull:`12627` | |
488 |
|
533 | |||
489 | - Never hide the frames that invoke a debugger, even if marked as hidden by |
|
534 | - Never hide the frames that invoke a debugger, even if marked as hidden by | |
490 | ``__tracebackhide__`` :ghpull:`12631` |
|
535 | ``__tracebackhide__`` :ghpull:`12631` | |
491 | - Fix calling the debugger in a recursive manner :ghpull:`12659` |
|
536 | - Fix calling the debugger in a recursive manner :ghpull:`12659` | |
492 |
|
537 | |||
493 |
|
538 | |||
494 | A number of code changes have landed on master and we are getting close to |
|
539 | A number of code changes have landed on master and we are getting close to | |
495 | enough new features and codebase improvement that a 8.0 start to make sens. |
|
540 | enough new features and codebase improvement that a 8.0 start to make sens. | |
496 | For downstream packages, please start working on migrating downstream testing |
|
541 | For downstream packages, please start working on migrating downstream testing | |
497 | away from iptest and using pytest, as nose will not work on Python 3.10 and we |
|
542 | away from iptest and using pytest, as nose will not work on Python 3.10 and we | |
498 | will likely start removing it as a dependency for testing. |
|
543 | will likely start removing it as a dependency for testing. | |
499 |
|
544 | |||
500 | .. _version 718: |
|
545 | .. _version 718: | |
501 |
|
546 | |||
502 | IPython 7.18 |
|
547 | IPython 7.18 | |
503 | ============ |
|
548 | ============ | |
504 |
|
549 | |||
505 | IPython 7.18 is a minor release that mostly contains bugfixes. |
|
550 | IPython 7.18 is a minor release that mostly contains bugfixes. | |
506 |
|
551 | |||
507 | - ``CRLF`` is now handled by magics my default; solving some issues due to copy |
|
552 | - ``CRLF`` is now handled by magics my default; solving some issues due to copy | |
508 | pasting on windows. :ghpull:`12475` |
|
553 | pasting on windows. :ghpull:`12475` | |
509 |
|
554 | |||
510 | - Requiring pexpect ``>=4.3`` as we are Python 3.7+ only and earlier version of |
|
555 | - Requiring pexpect ``>=4.3`` as we are Python 3.7+ only and earlier version of | |
511 | pexpect will be incompatible. :ghpull:`12510` |
|
556 | pexpect will be incompatible. :ghpull:`12510` | |
512 |
|
557 | |||
513 | - Minimum jedi version is now 0.16. :ghpull:`12488` |
|
558 | - Minimum jedi version is now 0.16. :ghpull:`12488` | |
514 |
|
559 | |||
515 |
|
560 | |||
516 |
|
561 | |||
517 | .. _version 717: |
|
562 | .. _version 717: | |
518 |
|
563 | |||
519 | IPython 7.17 |
|
564 | IPython 7.17 | |
520 | ============ |
|
565 | ============ | |
521 |
|
566 | |||
522 | IPython 7.17 brings a couple of new improvements to API and a couple of user |
|
567 | IPython 7.17 brings a couple of new improvements to API and a couple of user | |
523 | facing changes to make the terminal experience more user friendly. |
|
568 | facing changes to make the terminal experience more user friendly. | |
524 |
|
569 | |||
525 | :ghpull:`12407` introduces the ability to pass extra argument to the IPython |
|
570 | :ghpull:`12407` introduces the ability to pass extra argument to the IPython | |
526 | debugger class; this is to help a new project from ``kmaork`` |
|
571 | debugger class; this is to help a new project from ``kmaork`` | |
527 | (https://github.com/kmaork/madbg) to feature a fully remote debugger. |
|
572 | (https://github.com/kmaork/madbg) to feature a fully remote debugger. | |
528 |
|
573 | |||
529 | :ghpull:`12410` finally remove support for 3.6, while the codebase is still |
|
574 | :ghpull:`12410` finally remove support for 3.6, while the codebase is still | |
530 | technically compatible; IPython will not install on Python 3.6. |
|
575 | technically compatible; IPython will not install on Python 3.6. | |
531 |
|
576 | |||
532 | lots of work on the debugger and hidden frames from ``@impact27`` in |
|
577 | lots of work on the debugger and hidden frames from ``@impact27`` in | |
533 | :ghpull:`12437`, :ghpull:`12445`, :ghpull:`12460` and in particular |
|
578 | :ghpull:`12437`, :ghpull:`12445`, :ghpull:`12460` and in particular | |
534 | :ghpull:`12453` which make the debug magic more robust at handling spaces. |
|
579 | :ghpull:`12453` which make the debug magic more robust at handling spaces. | |
535 |
|
580 | |||
536 | Biggest API addition is code transformation which is done before code execution; |
|
581 | Biggest API addition is code transformation which is done before code execution; | |
537 | IPython allows a number of hooks to catch non-valid Python syntax (magic, prompt |
|
582 | IPython allows a number of hooks to catch non-valid Python syntax (magic, prompt | |
538 | stripping...etc). Transformers are usually called many time; typically: |
|
583 | stripping...etc). Transformers are usually called many time; typically: | |
539 |
|
584 | |||
540 | - When trying to figure out whether the code is complete and valid (should we |
|
585 | - When trying to figure out whether the code is complete and valid (should we | |
541 | insert a new line or execute ?) |
|
586 | insert a new line or execute ?) | |
542 | - During actual code execution pass before giving the code to Python's |
|
587 | - During actual code execution pass before giving the code to Python's | |
543 | ``exec``. |
|
588 | ``exec``. | |
544 |
|
589 | |||
545 | This lead to issues when transformer might have had side effects; or do external |
|
590 | This lead to issues when transformer might have had side effects; or do external | |
546 | queries. Starting with IPython 7.17 you can expect your transformer to be called |
|
591 | queries. Starting with IPython 7.17 you can expect your transformer to be called | |
547 | less time. |
|
592 | less time. | |
548 |
|
593 | |||
549 | Input transformers are now called only once in the execution path of |
|
594 | Input transformers are now called only once in the execution path of | |
550 | `InteractiveShell`, allowing to register transformer that potentially have side |
|
595 | `InteractiveShell`, allowing to register transformer that potentially have side | |
551 | effects (note that this is not recommended). Internal methods `should_run_async`, and |
|
596 | effects (note that this is not recommended). Internal methods `should_run_async`, and | |
552 | `run_cell_async` now take a recommended optional `transformed_cell`, and |
|
597 | `run_cell_async` now take a recommended optional `transformed_cell`, and | |
553 | `preprocessing_exc_tuple` parameters that will become mandatory at some point in |
|
598 | `preprocessing_exc_tuple` parameters that will become mandatory at some point in | |
554 | the future; that is to say cells need to be explicitly transformed to be valid |
|
599 | the future; that is to say cells need to be explicitly transformed to be valid | |
555 | Python syntax ahead of trying to run them. :ghpull:`12440`; |
|
600 | Python syntax ahead of trying to run them. :ghpull:`12440`; | |
556 |
|
601 | |||
557 | ``input_transformers`` can now also have an attribute ``has_side_effects`` set |
|
602 | ``input_transformers`` can now also have an attribute ``has_side_effects`` set | |
558 | to `True`, when this attribute is present; this will prevent the transformers |
|
603 | to `True`, when this attribute is present; this will prevent the transformers | |
559 | from being ran when IPython is trying to guess whether the user input is |
|
604 | from being ran when IPython is trying to guess whether the user input is | |
560 | complete. Note that this may means you will need to explicitly execute in some |
|
605 | complete. Note that this may means you will need to explicitly execute in some | |
561 | case where your transformations are now not ran; but will not affect users with |
|
606 | case where your transformations are now not ran; but will not affect users with | |
562 | no custom extensions. |
|
607 | no custom extensions. | |
563 |
|
608 | |||
564 |
|
609 | |||
565 | API Changes |
|
610 | API Changes | |
566 | ----------- |
|
611 | ----------- | |
567 |
|
612 | |||
568 | Change of API and exposed objects automatically detected using `frappuccino |
|
613 | Change of API and exposed objects automatically detected using `frappuccino | |
569 | <https://pypi.org/project/frappuccino/>`_ |
|
614 | <https://pypi.org/project/frappuccino/>`_ | |
570 |
|
615 | |||
571 |
|
616 | |||
572 | The following items are new since 7.16.0:: |
|
617 | The following items are new since 7.16.0:: | |
573 |
|
618 | |||
574 | + IPython.core.interactiveshell.InteractiveShell.get_local_scope(self, stack_depth) |
|
619 | + IPython.core.interactiveshell.InteractiveShell.get_local_scope(self, stack_depth) | |
575 |
|
620 | |||
576 | The following signatures differ since 7.16.0:: |
|
621 | The following signatures differ since 7.16.0:: | |
577 |
|
622 | |||
578 | - IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True) |
|
623 | - IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True) | |
579 | + IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True, *, transformed_cell=None, preprocessing_exc_tuple=None) |
|
624 | + IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True, *, transformed_cell=None, preprocessing_exc_tuple=None) | |
580 |
|
625 | |||
581 | - IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell) |
|
626 | - IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell) | |
582 | + IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell, *, transformed_cell=None, preprocessing_exc_tuple=None) |
|
627 | + IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell, *, transformed_cell=None, preprocessing_exc_tuple=None) | |
583 |
|
628 | |||
584 | - IPython.terminal.debugger.TerminalPdb.pt_init(self) |
|
629 | - IPython.terminal.debugger.TerminalPdb.pt_init(self) | |
585 | + IPython.terminal.debugger.TerminalPdb.pt_init(self, pt_session_options=None) |
|
630 | + IPython.terminal.debugger.TerminalPdb.pt_init(self, pt_session_options=None) | |
586 |
|
631 | |||
587 | This method was added:: |
|
632 | This method was added:: | |
588 |
|
633 | |||
589 | + IPython.core.interactiveshell.InteractiveShell.get_local_scope |
|
634 | + IPython.core.interactiveshell.InteractiveShell.get_local_scope | |
590 |
|
635 | |||
591 | Which is now also present on subclasses:: |
|
636 | Which is now also present on subclasses:: | |
592 |
|
637 | |||
593 | + IPython.terminal.embed.InteractiveShellEmbed.get_local_scope |
|
638 | + IPython.terminal.embed.InteractiveShellEmbed.get_local_scope | |
594 | + IPython.terminal.interactiveshell.TerminalInteractiveShell.get_local_scope |
|
639 | + IPython.terminal.interactiveshell.TerminalInteractiveShell.get_local_scope | |
595 |
|
640 | |||
596 |
|
641 | |||
597 | .. _version 716: |
|
642 | .. _version 716: | |
598 |
|
643 | |||
599 | IPython 7.16.1, 7.16.2 |
|
644 | IPython 7.16.1, 7.16.2 | |
600 | ====================== |
|
645 | ====================== | |
601 |
|
646 | |||
602 | IPython 7.16.1 was release immediately after 7.16.0 to fix a conda packaging issue. |
|
647 | IPython 7.16.1 was release immediately after 7.16.0 to fix a conda packaging issue. | |
603 | The source is identical to 7.16.0 but the file permissions in the tar are different. |
|
648 | The source is identical to 7.16.0 but the file permissions in the tar are different. | |
604 |
|
649 | |||
605 | IPython 7.16.2 pins jedi dependency to "<=0.17.2" which should prevent some |
|
650 | IPython 7.16.2 pins jedi dependency to "<=0.17.2" which should prevent some | |
606 | issues for users still on python 3.6. This may not be sufficient as pip may |
|
651 | issues for users still on python 3.6. This may not be sufficient as pip may | |
607 | still allow to downgrade IPython. |
|
652 | still allow to downgrade IPython. | |
608 |
|
653 | |||
609 | Compatibility with Jedi > 0.17.2 was not added as this would have meant bumping |
|
654 | Compatibility with Jedi > 0.17.2 was not added as this would have meant bumping | |
610 | the minimal version to >0.16. |
|
655 | the minimal version to >0.16. | |
611 |
|
656 | |||
612 | IPython 7.16 |
|
657 | IPython 7.16 | |
613 | ============ |
|
658 | ============ | |
614 |
|
659 | |||
615 |
|
660 | |||
616 | The default traceback mode will now skip frames that are marked with |
|
661 | The default traceback mode will now skip frames that are marked with | |
617 | ``__tracebackhide__ = True`` and show how many traceback frames have been |
|
662 | ``__tracebackhide__ = True`` and show how many traceback frames have been | |
618 | skipped. This can be toggled by using :magic:`xmode` with the ``--show`` or |
|
663 | skipped. This can be toggled by using :magic:`xmode` with the ``--show`` or | |
619 | ``--hide`` attribute. It will have no effect on non verbose traceback modes. |
|
664 | ``--hide`` attribute. It will have no effect on non verbose traceback modes. | |
620 |
|
665 | |||
621 | The ipython debugger also now understands ``__tracebackhide__`` as well and will |
|
666 | The ipython debugger also now understands ``__tracebackhide__`` as well and will | |
622 | skip hidden frames when displaying. Movement up and down the stack will skip the |
|
667 | skip hidden frames when displaying. Movement up and down the stack will skip the | |
623 | hidden frames and will show how many frames were hidden. Internal IPython frames |
|
668 | hidden frames and will show how many frames were hidden. Internal IPython frames | |
624 | are also now hidden by default. The behavior can be changed with the |
|
669 | are also now hidden by default. The behavior can be changed with the | |
625 | ``skip_hidden`` while in the debugger, command and accepts "yes", "no", "true" |
|
670 | ``skip_hidden`` while in the debugger, command and accepts "yes", "no", "true" | |
626 | and "false" case insensitive parameters. |
|
671 | and "false" case insensitive parameters. | |
627 |
|
672 | |||
628 |
|
673 | |||
629 | Misc Noticeable changes: |
|
674 | Misc Noticeable changes: | |
630 | ------------------------ |
|
675 | ------------------------ | |
631 |
|
676 | |||
632 | - Exceptions are now (re)raised when running notebooks via the :magic:`%run`, helping to catch issues in workflows and |
|
677 | - Exceptions are now (re)raised when running notebooks via the :magic:`%run`, helping to catch issues in workflows and | |
633 | pipelines. :ghpull:`12301` |
|
678 | pipelines. :ghpull:`12301` | |
634 | - Fix inputhook for qt 5.15.0 :ghpull:`12355` |
|
679 | - Fix inputhook for qt 5.15.0 :ghpull:`12355` | |
635 | - Fix wx inputhook :ghpull:`12375` |
|
680 | - Fix wx inputhook :ghpull:`12375` | |
636 | - Add handling for malformed pathext env var (Windows) :ghpull:`12367` |
|
681 | - Add handling for malformed pathext env var (Windows) :ghpull:`12367` | |
637 | - use $SHELL in system_piped :ghpull:`12360` for uniform behavior with |
|
682 | - use $SHELL in system_piped :ghpull:`12360` for uniform behavior with | |
638 | ipykernel. |
|
683 | ipykernel. | |
639 |
|
684 | |||
640 | Reproducible Build |
|
685 | Reproducible Build | |
641 | ------------------ |
|
686 | ------------------ | |
642 |
|
687 | |||
643 | IPython 7.15 reproducible build did not work, so we try again this month |
|
688 | IPython 7.15 reproducible build did not work, so we try again this month | |
644 | :ghpull:`12358`. |
|
689 | :ghpull:`12358`. | |
645 |
|
690 | |||
646 |
|
691 | |||
647 | API Changes |
|
692 | API Changes | |
648 | ----------- |
|
693 | ----------- | |
649 |
|
694 | |||
650 | Change of API and exposed objects automatically detected using `frappuccino |
|
695 | Change of API and exposed objects automatically detected using `frappuccino | |
651 | <https://pypi.org/project/frappuccino/>`_ (still in beta): |
|
696 | <https://pypi.org/project/frappuccino/>`_ (still in beta): | |
652 |
|
697 | |||
653 |
|
698 | |||
654 | The following items are new and mostly related to understanding ``__tracebackhide__``:: |
|
699 | The following items are new and mostly related to understanding ``__tracebackhide__``:: | |
655 |
|
700 | |||
656 | + IPython.core.debugger.Pdb.do_down(self, arg) |
|
701 | + IPython.core.debugger.Pdb.do_down(self, arg) | |
657 | + IPython.core.debugger.Pdb.do_skip_hidden(self, arg) |
|
702 | + IPython.core.debugger.Pdb.do_skip_hidden(self, arg) | |
658 | + IPython.core.debugger.Pdb.do_up(self, arg) |
|
703 | + IPython.core.debugger.Pdb.do_up(self, arg) | |
659 | + IPython.core.debugger.Pdb.hidden_frames(self, stack) |
|
704 | + IPython.core.debugger.Pdb.hidden_frames(self, stack) | |
660 | + IPython.core.debugger.Pdb.stop_here(self, frame) |
|
705 | + IPython.core.debugger.Pdb.stop_here(self, frame) | |
661 |
|
706 | |||
662 |
|
707 | |||
663 | The following items have been removed:: |
|
708 | The following items have been removed:: | |
664 |
|
709 | |||
665 | - IPython.core.debugger.Pdb.new_do_down |
|
710 | - IPython.core.debugger.Pdb.new_do_down | |
666 | - IPython.core.debugger.Pdb.new_do_up |
|
711 | - IPython.core.debugger.Pdb.new_do_up | |
667 |
|
712 | |||
668 | Those were implementation details. |
|
713 | Those were implementation details. | |
669 |
|
714 | |||
670 |
|
715 | |||
671 | .. _version 715: |
|
716 | .. _version 715: | |
672 |
|
717 | |||
673 | IPython 7.15 |
|
718 | IPython 7.15 | |
674 | ============ |
|
719 | ============ | |
675 |
|
720 | |||
676 | IPython 7.15 brings a number of bug fixes and user facing improvements. |
|
721 | IPython 7.15 brings a number of bug fixes and user facing improvements. | |
677 |
|
722 | |||
678 | Misc Noticeable changes: |
|
723 | Misc Noticeable changes: | |
679 | ------------------------ |
|
724 | ------------------------ | |
680 |
|
725 | |||
681 | - Long completion name have better elision in terminal :ghpull:`12284` |
|
726 | - Long completion name have better elision in terminal :ghpull:`12284` | |
682 | - I've started to test on Python 3.9 :ghpull:`12307` and fix some errors. |
|
727 | - I've started to test on Python 3.9 :ghpull:`12307` and fix some errors. | |
683 | - Hi DPI scaling of figures when using qt eventloop :ghpull:`12314` |
|
728 | - Hi DPI scaling of figures when using qt eventloop :ghpull:`12314` | |
684 | - Document the ability to have systemwide configuration for IPython. |
|
729 | - Document the ability to have systemwide configuration for IPython. | |
685 | :ghpull:`12328` |
|
730 | :ghpull:`12328` | |
686 | - Fix issues with input autoformatting :ghpull:`12336` |
|
731 | - Fix issues with input autoformatting :ghpull:`12336` | |
687 | - ``IPython.core.debugger.Pdb`` is now interruptible (:ghpull:`12168`, in 7.14 |
|
732 | - ``IPython.core.debugger.Pdb`` is now interruptible (:ghpull:`12168`, in 7.14 | |
688 | but forgotten in release notes) |
|
733 | but forgotten in release notes) | |
689 | - Video HTML attributes (:ghpull:`12212`, in 7.14 but forgotten in release |
|
734 | - Video HTML attributes (:ghpull:`12212`, in 7.14 but forgotten in release | |
690 | notes) |
|
735 | notes) | |
691 |
|
736 | |||
692 | Reproducible Build |
|
737 | Reproducible Build | |
693 | ------------------ |
|
738 | ------------------ | |
694 |
|
739 | |||
695 | Starting with IPython 7.15, I am attempting to provide reproducible builds, |
|
740 | Starting with IPython 7.15, I am attempting to provide reproducible builds, | |
696 | that is to say you should be able from the source tree to generate an sdist |
|
741 | that is to say you should be able from the source tree to generate an sdist | |
697 | and wheel that are identical byte for byte with the publish version on PyPI. |
|
742 | and wheel that are identical byte for byte with the publish version on PyPI. | |
698 |
|
743 | |||
699 | I've only tested on a couple of machines so far and the process is relatively |
|
744 | I've only tested on a couple of machines so far and the process is relatively | |
700 | straightforward, so this mean that IPython not only have a deterministic build |
|
745 | straightforward, so this mean that IPython not only have a deterministic build | |
701 | process, but also I have either removed, or put under control all effects of |
|
746 | process, but also I have either removed, or put under control all effects of | |
702 | the build environments on the final artifact. I encourage you to attempt the |
|
747 | the build environments on the final artifact. I encourage you to attempt the | |
703 | build process on your machine as documented in :ref:`core_developer_guide` |
|
748 | build process on your machine as documented in :ref:`core_developer_guide` | |
704 | and let me know if you do not obtain an identical artifact. |
|
749 | and let me know if you do not obtain an identical artifact. | |
705 |
|
750 | |||
706 | While reproducible builds is critical to check that the supply chain of (open |
|
751 | While reproducible builds is critical to check that the supply chain of (open | |
707 | source) software has not been compromised, it can also help to speedup many |
|
752 | source) software has not been compromised, it can also help to speedup many | |
708 | of the build processes in large environment (conda, apt...) by allowing |
|
753 | of the build processes in large environment (conda, apt...) by allowing | |
709 | better caching of intermediate build steps. |
|
754 | better caching of intermediate build steps. | |
710 |
|
755 | |||
711 | Learn more on `<https://reproducible-builds.org/>`_. `Reflections on trusting |
|
756 | Learn more on `<https://reproducible-builds.org/>`_. `Reflections on trusting | |
712 | trust <https://dl.acm.org/doi/10.1145/358198.358210>`_ is also one of the |
|
757 | trust <https://dl.acm.org/doi/10.1145/358198.358210>`_ is also one of the | |
713 | cornerstone and recommended reads on this subject. |
|
758 | cornerstone and recommended reads on this subject. | |
714 |
|
759 | |||
715 | .. note:: |
|
760 | .. note:: | |
716 |
|
761 | |||
717 | The build commit from which the sdist is generated is also `signed |
|
762 | The build commit from which the sdist is generated is also `signed | |
718 | <https://en.wikipedia.org/wiki/Digital_signature>`_, so you should be able to |
|
763 | <https://en.wikipedia.org/wiki/Digital_signature>`_, so you should be able to | |
719 | check it has not been compromised, and the git repository is a `merkle-tree |
|
764 | check it has not been compromised, and the git repository is a `merkle-tree | |
720 | <https://en.wikipedia.org/wiki/Merkle_tree>`_, you can check the consistency |
|
765 | <https://en.wikipedia.org/wiki/Merkle_tree>`_, you can check the consistency | |
721 | with `git-fsck <https://git-scm.com/docs/git-fsck>`_ which you likely `want |
|
766 | with `git-fsck <https://git-scm.com/docs/git-fsck>`_ which you likely `want | |
722 | to enable by default |
|
767 | to enable by default | |
723 | <https://gist.github.com/mbbx6spp/14b86437e794bffb4120>`_. |
|
768 | <https://gist.github.com/mbbx6spp/14b86437e794bffb4120>`_. | |
724 |
|
769 | |||
725 | NEP29: Last version to support Python 3.6 |
|
770 | NEP29: Last version to support Python 3.6 | |
726 | ----------------------------------------- |
|
771 | ----------------------------------------- | |
727 |
|
772 | |||
728 | IPython 7.15 will be the Last IPython version to officially support Python |
|
773 | IPython 7.15 will be the Last IPython version to officially support Python | |
729 | 3.6, as stated by `NumPy Enhancement Proposal 29 |
|
774 | 3.6, as stated by `NumPy Enhancement Proposal 29 | |
730 | <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_. Starting with |
|
775 | <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_. Starting with | |
731 | next minor version of IPython I may stop testing on Python 3.6 and may stop |
|
776 | next minor version of IPython I may stop testing on Python 3.6 and may stop | |
732 | publishing release artifacts that install on Python 3.6 |
|
777 | publishing release artifacts that install on Python 3.6 | |
733 |
|
778 | |||
734 | Highlighted features |
|
779 | Highlighted features | |
735 | -------------------- |
|
780 | -------------------- | |
736 |
|
781 | |||
737 | Highlighted features are not new, but seem to not be widely known, this |
|
782 | Highlighted features are not new, but seem to not be widely known, this | |
738 | section will help you discover in more narrative form what you can do with |
|
783 | section will help you discover in more narrative form what you can do with | |
739 | IPython. |
|
784 | IPython. | |
740 |
|
785 | |||
741 | Increase Tab Completion Menu Height |
|
786 | Increase Tab Completion Menu Height | |
742 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
787 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
743 |
|
788 | |||
744 | In terminal IPython it is possible to increase the hight of the tab-completion |
|
789 | In terminal IPython it is possible to increase the hight of the tab-completion | |
745 | menu. To do so set the value of |
|
790 | menu. To do so set the value of | |
746 | :configtrait:`TerminalInteractiveShell.space_for_menu`, this will reserve more |
|
791 | :configtrait:`TerminalInteractiveShell.space_for_menu`, this will reserve more | |
747 | space at the bottom of the screen for various kind of menus in IPython including |
|
792 | space at the bottom of the screen for various kind of menus in IPython including | |
748 | tab completion and searching in history. |
|
793 | tab completion and searching in history. | |
749 |
|
794 | |||
750 | Autoformat Code in the terminal |
|
795 | Autoformat Code in the terminal | |
751 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
796 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
752 |
|
797 | |||
753 | If you have a preferred code formatter, you can configure IPython to |
|
798 | If you have a preferred code formatter, you can configure IPython to | |
754 | reformat your code. Set the value of |
|
799 | reformat your code. Set the value of | |
755 | :configtrait:`TerminalInteractiveShell.autoformatter` to for example ``'black'`` |
|
800 | :configtrait:`TerminalInteractiveShell.autoformatter` to for example ``'black'`` | |
756 | and IPython will auto format your code when possible. |
|
801 | and IPython will auto format your code when possible. | |
757 |
|
802 | |||
758 |
|
803 | |||
759 | .. _version 714: |
|
804 | .. _version 714: | |
760 |
|
805 | |||
761 | IPython 7.14 |
|
806 | IPython 7.14 | |
762 | ============ |
|
807 | ============ | |
763 |
|
808 | |||
764 | IPython 7.14 is a minor release that fix a couple of bugs and prepare |
|
809 | IPython 7.14 is a minor release that fix a couple of bugs and prepare | |
765 | compatibility with new or future versions of some libraries. |
|
810 | compatibility with new or future versions of some libraries. | |
766 |
|
811 | |||
767 | Important changes: |
|
812 | Important changes: | |
768 | ------------------ |
|
813 | ------------------ | |
769 |
|
814 | |||
770 | - Fix compatibility with Sphinx 3+ :ghpull:`12235` |
|
815 | - Fix compatibility with Sphinx 3+ :ghpull:`12235` | |
771 | - Remove deprecated matplotlib parameter usage, compatibility with matplotlib |
|
816 | - Remove deprecated matplotlib parameter usage, compatibility with matplotlib | |
772 | 3.3+ :`122250` |
|
817 | 3.3+ :`122250` | |
773 |
|
818 | |||
774 | Misc Changes |
|
819 | Misc Changes | |
775 | ------------ |
|
820 | ------------ | |
776 |
|
821 | |||
777 | - set ``.py`` extension when editing current buffer in vi/emacs. :ghpull:`12167` |
|
822 | - set ``.py`` extension when editing current buffer in vi/emacs. :ghpull:`12167` | |
778 | - support for unicode identifiers in ``?``/``??`` :ghpull:`12208` |
|
823 | - support for unicode identifiers in ``?``/``??`` :ghpull:`12208` | |
779 | - add extra options to the ``Video`` Rich objects :ghpull:`12212` |
|
824 | - add extra options to the ``Video`` Rich objects :ghpull:`12212` | |
780 | - add pretty-printing to ``SimpleNamespace`` :ghpull:`12230` |
|
825 | - add pretty-printing to ``SimpleNamespace`` :ghpull:`12230` | |
781 |
|
826 | |||
782 | IPython.core.debugger.Pdb is now interruptible |
|
827 | IPython.core.debugger.Pdb is now interruptible | |
783 | ---------------------------------------------- |
|
828 | ---------------------------------------------- | |
784 |
|
829 | |||
785 | A ``KeyboardInterrupt`` will now interrupt IPython's extended debugger, in order to make Jupyter able to interrupt it. (:ghpull:`12168`) |
|
830 | A ``KeyboardInterrupt`` will now interrupt IPython's extended debugger, in order to make Jupyter able to interrupt it. (:ghpull:`12168`) | |
786 |
|
831 | |||
787 | Video HTML attributes |
|
832 | Video HTML attributes | |
788 | --------------------- |
|
833 | --------------------- | |
789 |
|
834 | |||
790 | Add an option to `IPython.display.Video` to change the attributes of the HTML display of the video (:ghpull:`12212`) |
|
835 | Add an option to `IPython.display.Video` to change the attributes of the HTML display of the video (:ghpull:`12212`) | |
791 |
|
836 | |||
792 |
|
837 | |||
793 | Pending deprecated imports |
|
838 | Pending deprecated imports | |
794 | -------------------------- |
|
839 | -------------------------- | |
795 |
|
840 | |||
796 | Many object present in ``IPython.core.display`` are there for internal use only, |
|
841 | Many object present in ``IPython.core.display`` are there for internal use only, | |
797 | and should already been imported from ``IPython.display`` by users and external |
|
842 | and should already been imported from ``IPython.display`` by users and external | |
798 | libraries. Trying to import those from ``IPython.core.display`` is still possible |
|
843 | libraries. Trying to import those from ``IPython.core.display`` is still possible | |
799 | but will trigger a |
|
844 | but will trigger a | |
800 | deprecation warning in later versions of IPython and will become errors in the |
|
845 | deprecation warning in later versions of IPython and will become errors in the | |
801 | future. |
|
846 | future. | |
802 |
|
847 | |||
803 | This will simplify compatibility with other Python kernels (like Xeus-Python), |
|
848 | This will simplify compatibility with other Python kernels (like Xeus-Python), | |
804 | and simplify code base. |
|
849 | and simplify code base. | |
805 |
|
850 | |||
806 |
|
851 | |||
807 |
|
852 | |||
808 |
|
853 | |||
809 | .. _version 713: |
|
854 | .. _version 713: | |
810 |
|
855 | |||
811 | IPython 7.13 |
|
856 | IPython 7.13 | |
812 | ============ |
|
857 | ============ | |
813 |
|
858 | |||
814 | IPython 7.13 is the final release of the 7.x branch since master is diverging |
|
859 | IPython 7.13 is the final release of the 7.x branch since master is diverging | |
815 | toward an 8.0. Exiting new features have already been merged in 8.0 and will |
|
860 | toward an 8.0. Exiting new features have already been merged in 8.0 and will | |
816 | not be available on the 7.x branch. All the changes below have been backported |
|
861 | not be available on the 7.x branch. All the changes below have been backported | |
817 | from the master branch. |
|
862 | from the master branch. | |
818 |
|
863 | |||
819 |
|
864 | |||
820 | - Fix inability to run PDB when inside an event loop :ghpull:`12141` |
|
865 | - Fix inability to run PDB when inside an event loop :ghpull:`12141` | |
821 | - Fix ability to interrupt some processes on windows :ghpull:`12137` |
|
866 | - Fix ability to interrupt some processes on windows :ghpull:`12137` | |
822 | - Fix debugger shortcuts :ghpull:`12132` |
|
867 | - Fix debugger shortcuts :ghpull:`12132` | |
823 | - improve tab completion when inside a string by removing irrelevant elements :ghpull:`12128` |
|
868 | - improve tab completion when inside a string by removing irrelevant elements :ghpull:`12128` | |
824 | - Fix display of filename tab completion when the path is long :ghpull:`12122` |
|
869 | - Fix display of filename tab completion when the path is long :ghpull:`12122` | |
825 | - Many removal of Python 2 specific code path :ghpull:`12110` |
|
870 | - Many removal of Python 2 specific code path :ghpull:`12110` | |
826 | - displaying wav files do not require NumPy anymore, and is 5x to 30x faster :ghpull:`12113` |
|
871 | - displaying wav files do not require NumPy anymore, and is 5x to 30x faster :ghpull:`12113` | |
827 |
|
872 | |||
828 | See the list of all closed issues and pull request on `github |
|
873 | See the list of all closed issues and pull request on `github | |
829 | <https://github.com/ipython/ipython/pulls?q=is%3Aclosed+milestone%3A7.13>`_. |
|
874 | <https://github.com/ipython/ipython/pulls?q=is%3Aclosed+milestone%3A7.13>`_. | |
830 |
|
875 | |||
831 | .. _version 712: |
|
876 | .. _version 712: | |
832 |
|
877 | |||
833 | IPython 7.12 |
|
878 | IPython 7.12 | |
834 | ============ |
|
879 | ============ | |
835 |
|
880 | |||
836 | IPython 7.12 is a minor update that mostly brings code cleanup, removal of |
|
881 | IPython 7.12 is a minor update that mostly brings code cleanup, removal of | |
837 | longtime deprecated function and a couple update to documentation cleanup as well. |
|
882 | longtime deprecated function and a couple update to documentation cleanup as well. | |
838 |
|
883 | |||
839 | Notable changes are the following: |
|
884 | Notable changes are the following: | |
840 |
|
885 | |||
841 | - Exit non-zero when ipython is given a file path to run that doesn't exist :ghpull:`12074` |
|
886 | - Exit non-zero when ipython is given a file path to run that doesn't exist :ghpull:`12074` | |
842 | - Test PR on ARM64 with Travis-CI :ghpull:`12073` |
|
887 | - Test PR on ARM64 with Travis-CI :ghpull:`12073` | |
843 | - Update CI to work with latest Pytest :ghpull:`12086` |
|
888 | - Update CI to work with latest Pytest :ghpull:`12086` | |
844 | - Add infrastructure to run ipykernel eventloop via trio :ghpull:`12097` |
|
889 | - Add infrastructure to run ipykernel eventloop via trio :ghpull:`12097` | |
845 | - Support git blame ignore revs :ghpull:`12091` |
|
890 | - Support git blame ignore revs :ghpull:`12091` | |
846 | - Start multi-line ``__repr__`` s on their own line :ghpull:`12099` |
|
891 | - Start multi-line ``__repr__`` s on their own line :ghpull:`12099` | |
847 |
|
892 | |||
848 | .. _version 7111: |
|
893 | .. _version 7111: | |
849 |
|
894 | |||
850 | IPython 7.11.1 |
|
895 | IPython 7.11.1 | |
851 | ============== |
|
896 | ============== | |
852 |
|
897 | |||
853 | A couple of deprecated functions (no-op) have been reintroduces in py3compat as |
|
898 | A couple of deprecated functions (no-op) have been reintroduces in py3compat as | |
854 | Cython was still relying on them, and will be removed in a couple of versions. |
|
899 | Cython was still relying on them, and will be removed in a couple of versions. | |
855 |
|
900 | |||
856 | .. _version 711: |
|
901 | .. _version 711: | |
857 |
|
902 | |||
858 | IPython 7.11 |
|
903 | IPython 7.11 | |
859 | ============ |
|
904 | ============ | |
860 |
|
905 | |||
861 | IPython 7.11 received a couple of compatibility fixes and code cleanup. |
|
906 | IPython 7.11 received a couple of compatibility fixes and code cleanup. | |
862 |
|
907 | |||
863 | A number of function in the ``py3compat`` have been removed; a number of types |
|
908 | A number of function in the ``py3compat`` have been removed; a number of types | |
864 | in the IPython code base are now non-ambiguous and now always ``unicode`` |
|
909 | in the IPython code base are now non-ambiguous and now always ``unicode`` | |
865 | instead of ``Union[Unicode,bytes]``; many of the relevant code path have thus |
|
910 | instead of ``Union[Unicode,bytes]``; many of the relevant code path have thus | |
866 | been simplified/cleaned and types annotation added. |
|
911 | been simplified/cleaned and types annotation added. | |
867 |
|
912 | |||
868 | IPython support several verbosity level from exceptions. ``xmode plain`` now |
|
913 | IPython support several verbosity level from exceptions. ``xmode plain`` now | |
869 | support chained exceptions. :ghpull:`11999` |
|
914 | support chained exceptions. :ghpull:`11999` | |
870 |
|
915 | |||
871 | We are starting to remove ``shell=True`` in some usages of subprocess. While not directly |
|
916 | We are starting to remove ``shell=True`` in some usages of subprocess. While not directly | |
872 | a security issue (as IPython is made to run arbitrary code anyway) it is not good |
|
917 | a security issue (as IPython is made to run arbitrary code anyway) it is not good | |
873 | practice and we'd like to show the example. :ghissue:`12023`. This discussion |
|
918 | practice and we'd like to show the example. :ghissue:`12023`. This discussion | |
874 | was started by ``@mschwager`` thanks to a new auditing tool they are working on |
|
919 | was started by ``@mschwager`` thanks to a new auditing tool they are working on | |
875 | with duo-labs (`dlint <https://github.com/duo-labs/dlint>`_). |
|
920 | with duo-labs (`dlint <https://github.com/duo-labs/dlint>`_). | |
876 |
|
921 | |||
877 | Work around some bugs in Python 3.9 tokenizer :ghpull:`12057` |
|
922 | Work around some bugs in Python 3.9 tokenizer :ghpull:`12057` | |
878 |
|
923 | |||
879 | IPython will now print its version after a crash. :ghpull:`11986` |
|
924 | IPython will now print its version after a crash. :ghpull:`11986` | |
880 |
|
925 | |||
881 | This is likely the last release from the 7.x series that will see new feature. |
|
926 | This is likely the last release from the 7.x series that will see new feature. | |
882 | The master branch will soon accept large code changes and thrilling new |
|
927 | The master branch will soon accept large code changes and thrilling new | |
883 | features; the 7.x branch will only start to accept critical bug fixes, and |
|
928 | features; the 7.x branch will only start to accept critical bug fixes, and | |
884 | update dependencies. |
|
929 | update dependencies. | |
885 |
|
930 | |||
886 | .. _version 7102: |
|
931 | .. _version 7102: | |
887 |
|
932 | |||
888 | IPython 7.10.2 |
|
933 | IPython 7.10.2 | |
889 | ============== |
|
934 | ============== | |
890 |
|
935 | |||
891 | IPython 7.10.2 fix a couple of extra incompatibility between IPython, ipdb, |
|
936 | IPython 7.10.2 fix a couple of extra incompatibility between IPython, ipdb, | |
892 | asyncio and Prompt Toolkit 3. |
|
937 | asyncio and Prompt Toolkit 3. | |
893 |
|
938 | |||
894 | .. _version 7101: |
|
939 | .. _version 7101: | |
895 |
|
940 | |||
896 | IPython 7.10.1 |
|
941 | IPython 7.10.1 | |
897 | ============== |
|
942 | ============== | |
898 |
|
943 | |||
899 | IPython 7.10.1 fix a couple of incompatibilities with Prompt toolkit 3 (please |
|
944 | IPython 7.10.1 fix a couple of incompatibilities with Prompt toolkit 3 (please | |
900 | update Prompt toolkit to 3.0.2 at least), and fixes some interaction with |
|
945 | update Prompt toolkit to 3.0.2 at least), and fixes some interaction with | |
901 | headless IPython. |
|
946 | headless IPython. | |
902 |
|
947 | |||
903 | .. _version 7100: |
|
948 | .. _version 7100: | |
904 |
|
949 | |||
905 | IPython 7.10.0 |
|
950 | IPython 7.10.0 | |
906 | ============== |
|
951 | ============== | |
907 |
|
952 | |||
908 | IPython 7.10 is the first double digit minor release in the last decade, and |
|
953 | IPython 7.10 is the first double digit minor release in the last decade, and | |
909 | first since the release of IPython 1.0, previous double digit minor release was |
|
954 | first since the release of IPython 1.0, previous double digit minor release was | |
910 | in August 2009. |
|
955 | in August 2009. | |
911 |
|
956 | |||
912 | We've been trying to give you regular release on the last Friday of every month |
|
957 | We've been trying to give you regular release on the last Friday of every month | |
913 | for a guaranty of rapid access to bug fixes and new features. |
|
958 | for a guaranty of rapid access to bug fixes and new features. | |
914 |
|
959 | |||
915 | Unlike the previous first few releases that have seen only a couple of code |
|
960 | Unlike the previous first few releases that have seen only a couple of code | |
916 | changes, 7.10 bring a number of changes, new features and bugfixes. |
|
961 | changes, 7.10 bring a number of changes, new features and bugfixes. | |
917 |
|
962 | |||
918 | Stop Support for Python 3.5 β Adopt NEP 29 |
|
963 | Stop Support for Python 3.5 β Adopt NEP 29 | |
919 | ------------------------------------------ |
|
964 | ------------------------------------------ | |
920 |
|
965 | |||
921 | IPython has decided to follow the informational `NEP 29 |
|
966 | IPython has decided to follow the informational `NEP 29 | |
922 | <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_ which layout a clear |
|
967 | <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_ which layout a clear | |
923 | policy as to which version of (C)Python and NumPy are supported. |
|
968 | policy as to which version of (C)Python and NumPy are supported. | |
924 |
|
969 | |||
925 | We thus dropped support for Python 3.5, and cleaned up a number of code path |
|
970 | We thus dropped support for Python 3.5, and cleaned up a number of code path | |
926 | that were Python-version dependant. If you are on 3.5 or earlier pip should |
|
971 | that were Python-version dependant. If you are on 3.5 or earlier pip should | |
927 | automatically give you the latest compatible version of IPython so you do not |
|
972 | automatically give you the latest compatible version of IPython so you do not | |
928 | need to pin to a given version. |
|
973 | need to pin to a given version. | |
929 |
|
974 | |||
930 | Support for Prompt Toolkit 3.0 |
|
975 | Support for Prompt Toolkit 3.0 | |
931 | ------------------------------ |
|
976 | ------------------------------ | |
932 |
|
977 | |||
933 | Prompt Toolkit 3.0 was release a week before IPython 7.10 and introduces a few |
|
978 | Prompt Toolkit 3.0 was release a week before IPython 7.10 and introduces a few | |
934 | breaking changes. We believe IPython 7.10 should be compatible with both Prompt |
|
979 | breaking changes. We believe IPython 7.10 should be compatible with both Prompt | |
935 | Toolkit 2.x and 3.x, though it has not been extensively tested with 3.x so |
|
980 | Toolkit 2.x and 3.x, though it has not been extensively tested with 3.x so | |
936 | please report any issues. |
|
981 | please report any issues. | |
937 |
|
982 | |||
938 |
|
983 | |||
939 | Prompt Rendering Performance improvements |
|
984 | Prompt Rendering Performance improvements | |
940 | ----------------------------------------- |
|
985 | ----------------------------------------- | |
941 |
|
986 | |||
942 | Pull Request :ghpull:`11933` introduced an optimisation in the prompt rendering |
|
987 | Pull Request :ghpull:`11933` introduced an optimisation in the prompt rendering | |
943 | logic that should decrease the resource usage of IPython when using the |
|
988 | logic that should decrease the resource usage of IPython when using the | |
944 | _default_ configuration but could potentially introduce a regression of |
|
989 | _default_ configuration but could potentially introduce a regression of | |
945 | functionalities if you are using a custom prompt. |
|
990 | functionalities if you are using a custom prompt. | |
946 |
|
991 | |||
947 | We know assume if you haven't changed the default keybindings that the prompt |
|
992 | We know assume if you haven't changed the default keybindings that the prompt | |
948 | **will not change** during the duration of your input β which is for example |
|
993 | **will not change** during the duration of your input β which is for example | |
949 | not true when using vi insert mode that switches between `[ins]` and `[nor]` |
|
994 | not true when using vi insert mode that switches between `[ins]` and `[nor]` | |
950 | for the current mode. |
|
995 | for the current mode. | |
951 |
|
996 | |||
952 | If you are experiencing any issue let us know. |
|
997 | If you are experiencing any issue let us know. | |
953 |
|
998 | |||
954 | Code autoformatting |
|
999 | Code autoformatting | |
955 | ------------------- |
|
1000 | ------------------- | |
956 |
|
1001 | |||
957 | The IPython terminal can now auto format your code just before entering a new |
|
1002 | The IPython terminal can now auto format your code just before entering a new | |
958 | line or executing a command. To do so use the |
|
1003 | line or executing a command. To do so use the | |
959 | ``--TerminalInteractiveShell.autoformatter`` option and set it to ``'black'``; |
|
1004 | ``--TerminalInteractiveShell.autoformatter`` option and set it to ``'black'``; | |
960 | if black is installed IPython will use black to format your code when possible. |
|
1005 | if black is installed IPython will use black to format your code when possible. | |
961 |
|
1006 | |||
962 | IPython cannot always properly format your code; in particular it will |
|
1007 | IPython cannot always properly format your code; in particular it will | |
963 | auto formatting with *black* will only work if: |
|
1008 | auto formatting with *black* will only work if: | |
964 |
|
1009 | |||
965 | - Your code does not contains magics or special python syntax. |
|
1010 | - Your code does not contains magics or special python syntax. | |
966 |
|
1011 | |||
967 | - There is no code after your cursor. |
|
1012 | - There is no code after your cursor. | |
968 |
|
1013 | |||
969 | The Black API is also still in motion; so this may not work with all versions of |
|
1014 | The Black API is also still in motion; so this may not work with all versions of | |
970 | black. |
|
1015 | black. | |
971 |
|
1016 | |||
972 | It should be possible to register custom formatter, though the API is till in |
|
1017 | It should be possible to register custom formatter, though the API is till in | |
973 | flux. |
|
1018 | flux. | |
974 |
|
1019 | |||
975 | Arbitrary Mimetypes Handing in Terminal (Aka inline images in terminal) |
|
1020 | Arbitrary Mimetypes Handing in Terminal (Aka inline images in terminal) | |
976 | ----------------------------------------------------------------------- |
|
1021 | ----------------------------------------------------------------------- | |
977 |
|
1022 | |||
978 | When using IPython terminal it is now possible to register function to handle |
|
1023 | When using IPython terminal it is now possible to register function to handle | |
979 | arbitrary mimetypes. While rendering non-text based representation was possible in |
|
1024 | arbitrary mimetypes. While rendering non-text based representation was possible in | |
980 | many jupyter frontend; it was not possible in terminal IPython, as usually |
|
1025 | many jupyter frontend; it was not possible in terminal IPython, as usually | |
981 | terminal are limited to displaying text. As many terminal these days provide |
|
1026 | terminal are limited to displaying text. As many terminal these days provide | |
982 | escape sequences to display non-text; bringing this loved feature to IPython CLI |
|
1027 | escape sequences to display non-text; bringing this loved feature to IPython CLI | |
983 | made a lot of sens. This functionality will not only allow inline images; but |
|
1028 | made a lot of sens. This functionality will not only allow inline images; but | |
984 | allow opening of external program; for example ``mplayer`` to "display" sound |
|
1029 | allow opening of external program; for example ``mplayer`` to "display" sound | |
985 | files. |
|
1030 | files. | |
986 |
|
1031 | |||
987 | So far only the hooks necessary for this are in place, but no default mime |
|
1032 | So far only the hooks necessary for this are in place, but no default mime | |
988 | renderers added; so inline images will only be available via extensions. We will |
|
1033 | renderers added; so inline images will only be available via extensions. We will | |
989 | progressively enable these features by default in the next few releases, and |
|
1034 | progressively enable these features by default in the next few releases, and | |
990 | contribution is welcomed. |
|
1035 | contribution is welcomed. | |
991 |
|
1036 | |||
992 | We welcome any feedback on the API. See :ref:`shell_mimerenderer` for more |
|
1037 | We welcome any feedback on the API. See :ref:`shell_mimerenderer` for more | |
993 | informations. |
|
1038 | informations. | |
994 |
|
1039 | |||
995 | This is originally based on work form in :ghpull:`10610` from @stephanh42 |
|
1040 | This is originally based on work form in :ghpull:`10610` from @stephanh42 | |
996 | started over two years ago, and still a lot need to be done. |
|
1041 | started over two years ago, and still a lot need to be done. | |
997 |
|
1042 | |||
998 | MISC |
|
1043 | MISC | |
999 | ---- |
|
1044 | ---- | |
1000 |
|
1045 | |||
1001 | - Completions can define their own ordering :ghpull:`11855` |
|
1046 | - Completions can define their own ordering :ghpull:`11855` | |
1002 | - Enable Plotting in the same cell than the one that import matplotlib |
|
1047 | - Enable Plotting in the same cell than the one that import matplotlib | |
1003 | :ghpull:`11916` |
|
1048 | :ghpull:`11916` | |
1004 | - Allow to store and restore multiple variables at once :ghpull:`11930` |
|
1049 | - Allow to store and restore multiple variables at once :ghpull:`11930` | |
1005 |
|
1050 | |||
1006 | You can see `all pull-requests <https://github.com/ipython/ipython/pulls?q=is%3Apr+milestone%3A7.10+is%3Aclosed>`_ for this release. |
|
1051 | You can see `all pull-requests <https://github.com/ipython/ipython/pulls?q=is%3Apr+milestone%3A7.10+is%3Aclosed>`_ for this release. | |
1007 |
|
1052 | |||
1008 | API Changes |
|
1053 | API Changes | |
1009 | ----------- |
|
1054 | ----------- | |
1010 |
|
1055 | |||
1011 | Change of API and exposed objects automatically detected using `frappuccino <https://pypi.org/project/frappuccino/>`_ (still in beta): |
|
1056 | Change of API and exposed objects automatically detected using `frappuccino <https://pypi.org/project/frappuccino/>`_ (still in beta): | |
1012 |
|
1057 | |||
1013 | The following items are new in IPython 7.10:: |
|
1058 | The following items are new in IPython 7.10:: | |
1014 |
|
1059 | |||
1015 | + IPython.terminal.shortcuts.reformat_text_before_cursor(buffer, document, shell) |
|
1060 | + IPython.terminal.shortcuts.reformat_text_before_cursor(buffer, document, shell) | |
1016 | + IPython.terminal.interactiveshell.PTK3 |
|
1061 | + IPython.terminal.interactiveshell.PTK3 | |
1017 | + IPython.terminal.interactiveshell.black_reformat_handler(text_before_cursor) |
|
1062 | + IPython.terminal.interactiveshell.black_reformat_handler(text_before_cursor) | |
1018 | + IPython.terminal.prompts.RichPromptDisplayHook.write_format_data(self, format_dict, md_dict='None') |
|
1063 | + IPython.terminal.prompts.RichPromptDisplayHook.write_format_data(self, format_dict, md_dict='None') | |
1019 |
|
1064 | |||
1020 | The following items have been removed in 7.10:: |
|
1065 | The following items have been removed in 7.10:: | |
1021 |
|
1066 | |||
1022 | - IPython.lib.pretty.DICT_IS_ORDERED |
|
1067 | - IPython.lib.pretty.DICT_IS_ORDERED | |
1023 |
|
1068 | |||
1024 | The following signatures differ between versions:: |
|
1069 | The following signatures differ between versions:: | |
1025 |
|
1070 | |||
1026 | - IPython.extensions.storemagic.restore_aliases(ip) |
|
1071 | - IPython.extensions.storemagic.restore_aliases(ip) | |
1027 | + IPython.extensions.storemagic.restore_aliases(ip, alias='None') |
|
1072 | + IPython.extensions.storemagic.restore_aliases(ip, alias='None') | |
1028 |
|
1073 | |||
1029 | Special Thanks |
|
1074 | Special Thanks | |
1030 | -------------- |
|
1075 | -------------- | |
1031 |
|
1076 | |||
1032 | - @stephanh42 who started the work on inline images in terminal 2 years ago |
|
1077 | - @stephanh42 who started the work on inline images in terminal 2 years ago | |
1033 | - @augustogoulart who spent a lot of time triaging issues and responding to |
|
1078 | - @augustogoulart who spent a lot of time triaging issues and responding to | |
1034 | users. |
|
1079 | users. | |
1035 | - @con-f-use who is my (@Carreau) first sponsor on GitHub, as a reminder if you |
|
1080 | - @con-f-use who is my (@Carreau) first sponsor on GitHub, as a reminder if you | |
1036 | like IPython, Jupyter and many other library of the SciPy stack you can |
|
1081 | like IPython, Jupyter and many other library of the SciPy stack you can | |
1037 | donate to numfocus.org non profit |
|
1082 | donate to numfocus.org non profit | |
1038 |
|
1083 | |||
1039 | .. _version 790: |
|
1084 | .. _version 790: | |
1040 |
|
1085 | |||
1041 | IPython 7.9.0 |
|
1086 | IPython 7.9.0 | |
1042 | ============= |
|
1087 | ============= | |
1043 |
|
1088 | |||
1044 | IPython 7.9 is a small release with a couple of improvement and bug fixes. |
|
1089 | IPython 7.9 is a small release with a couple of improvement and bug fixes. | |
1045 |
|
1090 | |||
1046 | - Xterm terminal title should be restored on exit :ghpull:`11910` |
|
1091 | - Xterm terminal title should be restored on exit :ghpull:`11910` | |
1047 | - special variables ``_``,``__``, ``___`` are not set anymore when cache size |
|
1092 | - special variables ``_``,``__``, ``___`` are not set anymore when cache size | |
1048 | is 0 or less. :ghpull:`11877` |
|
1093 | is 0 or less. :ghpull:`11877` | |
1049 | - Autoreload should have regained some speed by using a new heuristic logic to |
|
1094 | - Autoreload should have regained some speed by using a new heuristic logic to | |
1050 | find all objects needing reload. This should avoid large objects traversal |
|
1095 | find all objects needing reload. This should avoid large objects traversal | |
1051 | like pandas dataframes. :ghpull:`11876` |
|
1096 | like pandas dataframes. :ghpull:`11876` | |
1052 | - Get ready for Python 4. :ghpull:`11874` |
|
1097 | - Get ready for Python 4. :ghpull:`11874` | |
1053 | - `%env` Magic now has heuristic to hide potentially sensitive values :ghpull:`11896` |
|
1098 | - `%env` Magic now has heuristic to hide potentially sensitive values :ghpull:`11896` | |
1054 |
|
1099 | |||
1055 | This is a small release despite a number of Pull Request Pending that need to |
|
1100 | This is a small release despite a number of Pull Request Pending that need to | |
1056 | be reviewed/worked on. Many of the core developers have been busy outside of |
|
1101 | be reviewed/worked on. Many of the core developers have been busy outside of | |
1057 | IPython/Jupyter and we thanks all contributor for their patience; we'll work on |
|
1102 | IPython/Jupyter and we thanks all contributor for their patience; we'll work on | |
1058 | these as soon as we have time. |
|
1103 | these as soon as we have time. | |
1059 |
|
1104 | |||
1060 |
|
1105 | |||
1061 | .. _version780: |
|
1106 | .. _version780: | |
1062 |
|
1107 | |||
1063 | IPython 7.8.0 |
|
1108 | IPython 7.8.0 | |
1064 | ============= |
|
1109 | ============= | |
1065 |
|
1110 | |||
1066 | IPython 7.8.0 contain a few bugfix and 2 new APIs: |
|
1111 | IPython 7.8.0 contain a few bugfix and 2 new APIs: | |
1067 |
|
1112 | |||
1068 | - Enable changing the font color for LaTeX rendering :ghpull:`11840` |
|
1113 | - Enable changing the font color for LaTeX rendering :ghpull:`11840` | |
1069 | - and Re-Expose some PDB API (see below) |
|
1114 | - and Re-Expose some PDB API (see below) | |
1070 |
|
1115 | |||
1071 | Expose Pdb API |
|
1116 | Expose Pdb API | |
1072 | -------------- |
|
1117 | -------------- | |
1073 |
|
1118 | |||
1074 | Expose the built-in ``pdb.Pdb`` API. ``Pdb`` constructor arguments are generically |
|
1119 | Expose the built-in ``pdb.Pdb`` API. ``Pdb`` constructor arguments are generically | |
1075 | exposed, regardless of python version. |
|
1120 | exposed, regardless of python version. | |
1076 | Newly exposed arguments: |
|
1121 | Newly exposed arguments: | |
1077 |
|
1122 | |||
1078 | - ``skip`` - Python 3.1+ |
|
1123 | - ``skip`` - Python 3.1+ | |
1079 | - ``nosiginnt`` - Python 3.2+ |
|
1124 | - ``nosiginnt`` - Python 3.2+ | |
1080 | - ``readrc`` - Python 3.6+ |
|
1125 | - ``readrc`` - Python 3.6+ | |
1081 |
|
1126 | |||
1082 | Try it out:: |
|
1127 | Try it out:: | |
1083 |
|
1128 | |||
1084 | from IPython.terminal.debugger import TerminalPdb |
|
1129 | from IPython.terminal.debugger import TerminalPdb | |
1085 | pdb = TerminalPdb(skip=["skipthismodule"]) |
|
1130 | pdb = TerminalPdb(skip=["skipthismodule"]) | |
1086 |
|
1131 | |||
1087 |
|
1132 | |||
1088 | See :ghpull:`11840` |
|
1133 | See :ghpull:`11840` | |
1089 |
|
1134 | |||
1090 | .. _version770: |
|
1135 | .. _version770: | |
1091 |
|
1136 | |||
1092 | IPython 7.7.0 |
|
1137 | IPython 7.7.0 | |
1093 | ============= |
|
1138 | ============= | |
1094 |
|
1139 | |||
1095 | IPython 7.7.0 contain multiple bug fixes and documentation updates; Here are a |
|
1140 | IPython 7.7.0 contain multiple bug fixes and documentation updates; Here are a | |
1096 | few of the outstanding issue fixed: |
|
1141 | few of the outstanding issue fixed: | |
1097 |
|
1142 | |||
1098 | - Fix a bug introduced in 7.6 where the ``%matplotlib`` magic would fail on |
|
1143 | - Fix a bug introduced in 7.6 where the ``%matplotlib`` magic would fail on | |
1099 | previously acceptable arguments :ghpull:`11814`. |
|
1144 | previously acceptable arguments :ghpull:`11814`. | |
1100 | - Fix the manage location on freebsd :ghpull:`11808`. |
|
1145 | - Fix the manage location on freebsd :ghpull:`11808`. | |
1101 | - Fix error message about aliases after ``%reset`` call in ipykernel |
|
1146 | - Fix error message about aliases after ``%reset`` call in ipykernel | |
1102 | :ghpull:`11806` |
|
1147 | :ghpull:`11806` | |
1103 | - Fix Duplication completions in emacs :ghpull:`11803` |
|
1148 | - Fix Duplication completions in emacs :ghpull:`11803` | |
1104 |
|
1149 | |||
1105 | We are planning to adopt `NEP29 <https://github.com/numpy/numpy/pull/14086>`_ |
|
1150 | We are planning to adopt `NEP29 <https://github.com/numpy/numpy/pull/14086>`_ | |
1106 | (still currently in draft) which may make this minor version of IPython the |
|
1151 | (still currently in draft) which may make this minor version of IPython the | |
1107 | last one to support Python 3.5 and will make the code base more aggressive |
|
1152 | last one to support Python 3.5 and will make the code base more aggressive | |
1108 | toward removing compatibility with older versions of Python. |
|
1153 | toward removing compatibility with older versions of Python. | |
1109 |
|
1154 | |||
1110 | GitHub now support to give only "Triage" permissions to users; if you'd like to |
|
1155 | GitHub now support to give only "Triage" permissions to users; if you'd like to | |
1111 | help close stale issues and labels issues please reach to us with your GitHub |
|
1156 | help close stale issues and labels issues please reach to us with your GitHub | |
1112 | Username and we'll add you to the triage team. It is a great way to start |
|
1157 | Username and we'll add you to the triage team. It is a great way to start | |
1113 | contributing and a path toward getting commit rights. |
|
1158 | contributing and a path toward getting commit rights. | |
1114 |
|
1159 | |||
1115 | .. _version761: |
|
1160 | .. _version761: | |
1116 |
|
1161 | |||
1117 | IPython 7.6.1 |
|
1162 | IPython 7.6.1 | |
1118 | ============= |
|
1163 | ============= | |
1119 |
|
1164 | |||
1120 | IPython 7.6.1 contain a critical bugfix in the ``%timeit`` magic, which would |
|
1165 | IPython 7.6.1 contain a critical bugfix in the ``%timeit`` magic, which would | |
1121 | crash on some inputs as a side effect of :ghpull:`11716`. See :ghpull:`11812` |
|
1166 | crash on some inputs as a side effect of :ghpull:`11716`. See :ghpull:`11812` | |
1122 |
|
1167 | |||
1123 |
|
1168 | |||
1124 | .. _whatsnew760: |
|
1169 | .. _whatsnew760: | |
1125 |
|
1170 | |||
1126 | IPython 7.6.0 |
|
1171 | IPython 7.6.0 | |
1127 | ============= |
|
1172 | ============= | |
1128 |
|
1173 | |||
1129 | IPython 7.6.0 contains a couple of bug fixes and number of small features |
|
1174 | IPython 7.6.0 contains a couple of bug fixes and number of small features | |
1130 | additions as well as some compatibility with the current development version of |
|
1175 | additions as well as some compatibility with the current development version of | |
1131 | Python 3.8. |
|
1176 | Python 3.8. | |
1132 |
|
1177 | |||
1133 | - Add a ``-l`` option to :magic:`psearch` to list the available search |
|
1178 | - Add a ``-l`` option to :magic:`psearch` to list the available search | |
1134 | types. :ghpull:`11672` |
|
1179 | types. :ghpull:`11672` | |
1135 | - Support ``PathLike`` for ``DisplayObject`` and ``Image``. :ghpull:`11764` |
|
1180 | - Support ``PathLike`` for ``DisplayObject`` and ``Image``. :ghpull:`11764` | |
1136 | - Configurability of timeout in the test suite for slow platforms. |
|
1181 | - Configurability of timeout in the test suite for slow platforms. | |
1137 | :ghpull:`11756` |
|
1182 | :ghpull:`11756` | |
1138 | - Accept any casing for matplotlib backend. :ghpull:`121748` |
|
1183 | - Accept any casing for matplotlib backend. :ghpull:`121748` | |
1139 | - Properly skip test that requires numpy to be installed :ghpull:`11723` |
|
1184 | - Properly skip test that requires numpy to be installed :ghpull:`11723` | |
1140 | - More support for Python 3.8 and positional only arguments (pep570) |
|
1185 | - More support for Python 3.8 and positional only arguments (pep570) | |
1141 | :ghpull:`11720` |
|
1186 | :ghpull:`11720` | |
1142 | - Unicode names for the completion are loaded lazily on first use which |
|
1187 | - Unicode names for the completion are loaded lazily on first use which | |
1143 | should decrease startup time. :ghpull:`11693` |
|
1188 | should decrease startup time. :ghpull:`11693` | |
1144 | - Autoreload now update the types of reloaded objects; this for example allow |
|
1189 | - Autoreload now update the types of reloaded objects; this for example allow | |
1145 | pickling of reloaded objects. :ghpull:`11644` |
|
1190 | pickling of reloaded objects. :ghpull:`11644` | |
1146 | - Fix a bug where ``%%time`` magic would suppress cell output. :ghpull:`11716` |
|
1191 | - Fix a bug where ``%%time`` magic would suppress cell output. :ghpull:`11716` | |
1147 |
|
1192 | |||
1148 |
|
1193 | |||
1149 | Prepare migration to pytest (instead of nose) for testing |
|
1194 | Prepare migration to pytest (instead of nose) for testing | |
1150 | --------------------------------------------------------- |
|
1195 | --------------------------------------------------------- | |
1151 |
|
1196 | |||
1152 | Most of the work between 7.5 and 7.6 was to prepare the migration from our |
|
1197 | Most of the work between 7.5 and 7.6 was to prepare the migration from our | |
1153 | testing framework to pytest. Most of the test suite should now work by simply |
|
1198 | testing framework to pytest. Most of the test suite should now work by simply | |
1154 | issuing ``pytest`` from the root of the repository. |
|
1199 | issuing ``pytest`` from the root of the repository. | |
1155 |
|
1200 | |||
1156 | The migration to pytest is just at its beginning. Many of our test still rely |
|
1201 | The migration to pytest is just at its beginning. Many of our test still rely | |
1157 | on IPython-specific plugins for nose using pytest (doctest using IPython syntax |
|
1202 | on IPython-specific plugins for nose using pytest (doctest using IPython syntax | |
1158 | is one example of this where test appear as "passing", while no code has been |
|
1203 | is one example of this where test appear as "passing", while no code has been | |
1159 | ran). Many test also need to be updated like ``yield-test`` to be properly |
|
1204 | ran). Many test also need to be updated like ``yield-test`` to be properly | |
1160 | parametrized tests. |
|
1205 | parametrized tests. | |
1161 |
|
1206 | |||
1162 | Migration to pytest allowed me to discover a number of issues in our test |
|
1207 | Migration to pytest allowed me to discover a number of issues in our test | |
1163 | suite; which was hiding a number of subtle issues βΒ or not actually running |
|
1208 | suite; which was hiding a number of subtle issues βΒ or not actually running | |
1164 | some of the tests in our test suite β I have thus corrected many of those; like |
|
1209 | some of the tests in our test suite β I have thus corrected many of those; like | |
1165 | improperly closed resources; or used of deprecated features. I also made use of |
|
1210 | improperly closed resources; or used of deprecated features. I also made use of | |
1166 | the ``pytest --durations=...`` to find some of our slowest test and speed them |
|
1211 | the ``pytest --durations=...`` to find some of our slowest test and speed them | |
1167 | up (our test suite can now be up to 10% faster). Pytest as also a variety of |
|
1212 | up (our test suite can now be up to 10% faster). Pytest as also a variety of | |
1168 | plugins and flags which will make the code quality of IPython and the testing |
|
1213 | plugins and flags which will make the code quality of IPython and the testing | |
1169 | experience better. |
|
1214 | experience better. | |
1170 |
|
1215 | |||
1171 | Misc |
|
1216 | Misc | |
1172 | ---- |
|
1217 | ---- | |
1173 |
|
1218 | |||
1174 | We skipped the release of 7.6 at the end of May, but will attempt to get back |
|
1219 | We skipped the release of 7.6 at the end of May, but will attempt to get back | |
1175 | on schedule. We are starting to think about making introducing backward |
|
1220 | on schedule. We are starting to think about making introducing backward | |
1176 | incompatible change and start the 8.0 series. |
|
1221 | incompatible change and start the 8.0 series. | |
1177 |
|
1222 | |||
1178 | Special Thanks to Gabriel (@gpotter2 on GitHub), who among other took care many |
|
1223 | Special Thanks to Gabriel (@gpotter2 on GitHub), who among other took care many | |
1179 | of the remaining task for 7.4 and 7.5, like updating the website. |
|
1224 | of the remaining task for 7.4 and 7.5, like updating the website. | |
1180 |
|
1225 | |||
1181 | .. _whatsnew750: |
|
1226 | .. _whatsnew750: | |
1182 |
|
1227 | |||
1183 | IPython 7.5.0 |
|
1228 | IPython 7.5.0 | |
1184 | ============= |
|
1229 | ============= | |
1185 |
|
1230 | |||
1186 | IPython 7.5.0 consist mostly of bug-fixes, and documentation updates, with one |
|
1231 | IPython 7.5.0 consist mostly of bug-fixes, and documentation updates, with one | |
1187 | minor new feature. The `Audio` display element can now be assigned an element |
|
1232 | minor new feature. The `Audio` display element can now be assigned an element | |
1188 | id when displayed in browser. See :ghpull:`11670` |
|
1233 | id when displayed in browser. See :ghpull:`11670` | |
1189 |
|
1234 | |||
1190 | The major outstanding bug fix correct a change of behavior that was introduce |
|
1235 | The major outstanding bug fix correct a change of behavior that was introduce | |
1191 | in 7.4.0 where some cell magics would not be able to access or modify global |
|
1236 | in 7.4.0 where some cell magics would not be able to access or modify global | |
1192 | scope when using the ``@needs_local_scope`` decorator. This was typically |
|
1237 | scope when using the ``@needs_local_scope`` decorator. This was typically | |
1193 | encountered with the ``%%time`` and ``%%timeit`` magics. See :ghissue:`11659` |
|
1238 | encountered with the ``%%time`` and ``%%timeit`` magics. See :ghissue:`11659` | |
1194 | and :ghpull:`11698`. |
|
1239 | and :ghpull:`11698`. | |
1195 |
|
1240 | |||
1196 | .. _whatsnew740: |
|
1241 | .. _whatsnew740: | |
1197 |
|
1242 | |||
1198 | IPython 7.4.0 |
|
1243 | IPython 7.4.0 | |
1199 | ============= |
|
1244 | ============= | |
1200 |
|
1245 | |||
1201 | Unicode name completions |
|
1246 | Unicode name completions | |
1202 | ------------------------ |
|
1247 | ------------------------ | |
1203 |
|
1248 | |||
1204 | Previously, we provided completion for a unicode name with its relative symbol. |
|
1249 | Previously, we provided completion for a unicode name with its relative symbol. | |
1205 | With this, now IPython provides complete suggestions to unicode name symbols. |
|
1250 | With this, now IPython provides complete suggestions to unicode name symbols. | |
1206 |
|
1251 | |||
1207 | As on the PR, if user types ``\LAT<tab>``, IPython provides a list of |
|
1252 | As on the PR, if user types ``\LAT<tab>``, IPython provides a list of | |
1208 | possible completions. In this case, it would be something like:: |
|
1253 | possible completions. In this case, it would be something like:: | |
1209 |
|
1254 | |||
1210 | 'LATIN CAPITAL LETTER A', |
|
1255 | 'LATIN CAPITAL LETTER A', | |
1211 | 'LATIN CAPITAL LETTER B', |
|
1256 | 'LATIN CAPITAL LETTER B', | |
1212 | 'LATIN CAPITAL LETTER C', |
|
1257 | 'LATIN CAPITAL LETTER C', | |
1213 | 'LATIN CAPITAL LETTER D', |
|
1258 | 'LATIN CAPITAL LETTER D', | |
1214 | .... |
|
1259 | .... | |
1215 |
|
1260 | |||
1216 | This help to type unicode character that do not have short latex aliases, and |
|
1261 | This help to type unicode character that do not have short latex aliases, and | |
1217 | have long unicode names. for example ``Ν°``, ``\GREEK CAPITAL LETTER HETA``. |
|
1262 | have long unicode names. for example ``Ν°``, ``\GREEK CAPITAL LETTER HETA``. | |
1218 |
|
1263 | |||
1219 | This feature was contributed by Luciana Marques :ghpull:`11583`. |
|
1264 | This feature was contributed by Luciana Marques :ghpull:`11583`. | |
1220 |
|
1265 | |||
1221 | Make audio normalization optional |
|
1266 | Make audio normalization optional | |
1222 | --------------------------------- |
|
1267 | --------------------------------- | |
1223 |
|
1268 | |||
1224 | Added 'normalize' argument to `IPython.display.Audio`. This argument applies |
|
1269 | Added 'normalize' argument to `IPython.display.Audio`. This argument applies | |
1225 | when audio data is given as an array of samples. The default of `normalize=True` |
|
1270 | when audio data is given as an array of samples. The default of `normalize=True` | |
1226 | preserves prior behavior of normalizing the audio to the maximum possible range. |
|
1271 | preserves prior behavior of normalizing the audio to the maximum possible range. | |
1227 | Setting to `False` disables normalization. |
|
1272 | Setting to `False` disables normalization. | |
1228 |
|
1273 | |||
1229 |
|
1274 | |||
1230 | Miscellaneous |
|
1275 | Miscellaneous | |
1231 | ------------- |
|
1276 | ------------- | |
1232 |
|
1277 | |||
1233 | - Fix improper acceptation of ``return`` outside of functions. :ghpull:`11641`. |
|
1278 | - Fix improper acceptation of ``return`` outside of functions. :ghpull:`11641`. | |
1234 | - Fixed PyQt 5.11 backwards incompatibility causing sip import failure. |
|
1279 | - Fixed PyQt 5.11 backwards incompatibility causing sip import failure. | |
1235 | :ghpull:`11613`. |
|
1280 | :ghpull:`11613`. | |
1236 | - Fix Bug where ``type?`` would crash IPython. :ghpull:`1608`. |
|
1281 | - Fix Bug where ``type?`` would crash IPython. :ghpull:`1608`. | |
1237 | - Allow to apply ``@needs_local_scope`` to cell magics for convenience. |
|
1282 | - Allow to apply ``@needs_local_scope`` to cell magics for convenience. | |
1238 | :ghpull:`11542`. |
|
1283 | :ghpull:`11542`. | |
1239 |
|
1284 | |||
1240 | .. _whatsnew730: |
|
1285 | .. _whatsnew730: | |
1241 |
|
1286 | |||
1242 | IPython 7.3.0 |
|
1287 | IPython 7.3.0 | |
1243 | ============= |
|
1288 | ============= | |
1244 |
|
1289 | |||
1245 | .. _whatsnew720: |
|
1290 | .. _whatsnew720: | |
1246 |
|
1291 | |||
1247 | IPython 7.3.0 bring several bug fixes and small improvements that you will |
|
1292 | IPython 7.3.0 bring several bug fixes and small improvements that you will | |
1248 | described bellow. |
|
1293 | described bellow. | |
1249 |
|
1294 | |||
1250 | The biggest change to this release is the implementation of the ``%conda`` and |
|
1295 | The biggest change to this release is the implementation of the ``%conda`` and | |
1251 | ``%pip`` magics, that will attempt to install packages in the **current |
|
1296 | ``%pip`` magics, that will attempt to install packages in the **current | |
1252 | environment**. You may still need to restart your interpreter or kernel for the |
|
1297 | environment**. You may still need to restart your interpreter or kernel for the | |
1253 | change to be taken into account, but it should simplify installation of packages |
|
1298 | change to be taken into account, but it should simplify installation of packages | |
1254 | into remote environment. Installing using pip/conda from the command line is |
|
1299 | into remote environment. Installing using pip/conda from the command line is | |
1255 | still the prefer method. |
|
1300 | still the prefer method. | |
1256 |
|
1301 | |||
1257 | The ``%pip`` magic was already present, but was only printing a warning; now it |
|
1302 | The ``%pip`` magic was already present, but was only printing a warning; now it | |
1258 | will actually forward commands to pip. |
|
1303 | will actually forward commands to pip. | |
1259 |
|
1304 | |||
1260 | Misc bug fixes and improvements: |
|
1305 | Misc bug fixes and improvements: | |
1261 |
|
1306 | |||
1262 | - Compatibility with Python 3.8. |
|
1307 | - Compatibility with Python 3.8. | |
1263 | - Do not expand shell variable in execution magics, and added the |
|
1308 | - Do not expand shell variable in execution magics, and added the | |
1264 | ``no_var_expand`` decorator for magic requiring a similar functionality |
|
1309 | ``no_var_expand`` decorator for magic requiring a similar functionality | |
1265 | :ghpull:`11516` |
|
1310 | :ghpull:`11516` | |
1266 | - Add ``%pip`` and ``%conda`` magic :ghpull:`11524` |
|
1311 | - Add ``%pip`` and ``%conda`` magic :ghpull:`11524` | |
1267 | - Re-initialize posix aliases after a ``%reset`` :ghpull:`11528` |
|
1312 | - Re-initialize posix aliases after a ``%reset`` :ghpull:`11528` | |
1268 | - Allow the IPython command line to run ``*.ipynb`` files :ghpull:`11529` |
|
1313 | - Allow the IPython command line to run ``*.ipynb`` files :ghpull:`11529` | |
1269 |
|
1314 | |||
1270 | IPython 7.2.0 |
|
1315 | IPython 7.2.0 | |
1271 | ============= |
|
1316 | ============= | |
1272 |
|
1317 | |||
1273 | IPython 7.2.0 brings minor bugfixes, improvements, and new configuration options: |
|
1318 | IPython 7.2.0 brings minor bugfixes, improvements, and new configuration options: | |
1274 |
|
1319 | |||
1275 | - Fix a bug preventing PySide2 GUI integration from working :ghpull:`11464` |
|
1320 | - Fix a bug preventing PySide2 GUI integration from working :ghpull:`11464` | |
1276 | - Run CI on Mac OS ! :ghpull:`11471` |
|
1321 | - Run CI on Mac OS ! :ghpull:`11471` | |
1277 | - Fix IPython "Demo" mode. :ghpull:`11498` |
|
1322 | - Fix IPython "Demo" mode. :ghpull:`11498` | |
1278 | - Fix ``%run`` magic with path in name :ghpull:`11499` |
|
1323 | - Fix ``%run`` magic with path in name :ghpull:`11499` | |
1279 | - Fix: add CWD to sys.path *after* stdlib :ghpull:`11502` |
|
1324 | - Fix: add CWD to sys.path *after* stdlib :ghpull:`11502` | |
1280 | - Better rendering of signatures, especially long ones. :ghpull:`11505` |
|
1325 | - Better rendering of signatures, especially long ones. :ghpull:`11505` | |
1281 | - Re-enable jedi by default if it's installed :ghpull:`11506` |
|
1326 | - Re-enable jedi by default if it's installed :ghpull:`11506` | |
1282 | - Add New ``minimal`` exception reporting mode (useful for educational purpose). See :ghpull:`11509` |
|
1327 | - Add New ``minimal`` exception reporting mode (useful for educational purpose). See :ghpull:`11509` | |
1283 |
|
1328 | |||
1284 |
|
1329 | |||
1285 | Added ability to show subclasses when using pinfo and other utilities |
|
1330 | Added ability to show subclasses when using pinfo and other utilities | |
1286 | --------------------------------------------------------------------- |
|
1331 | --------------------------------------------------------------------- | |
1287 |
|
1332 | |||
1288 | When using ``?``/``??`` on a class, IPython will now list the first 10 subclasses. |
|
1333 | When using ``?``/``??`` on a class, IPython will now list the first 10 subclasses. | |
1289 |
|
1334 | |||
1290 | Special Thanks to Chris Mentzel of the Moore Foundation for this feature. Chris |
|
1335 | Special Thanks to Chris Mentzel of the Moore Foundation for this feature. Chris | |
1291 | is one of the people who played a critical role in IPython/Jupyter getting |
|
1336 | is one of the people who played a critical role in IPython/Jupyter getting | |
1292 | funding. |
|
1337 | funding. | |
1293 |
|
1338 | |||
1294 | We are grateful for all the help Chris has given us over the years, |
|
1339 | We are grateful for all the help Chris has given us over the years, | |
1295 | and we're now proud to have code contributed by Chris in IPython. |
|
1340 | and we're now proud to have code contributed by Chris in IPython. | |
1296 |
|
1341 | |||
1297 | OSMagics.cd_force_quiet configuration option |
|
1342 | OSMagics.cd_force_quiet configuration option | |
1298 | -------------------------------------------- |
|
1343 | -------------------------------------------- | |
1299 |
|
1344 | |||
1300 | You can set this option to force the %cd magic to behave as if ``-q`` was passed: |
|
1345 | You can set this option to force the %cd magic to behave as if ``-q`` was passed: | |
1301 | :: |
|
1346 | :: | |
1302 |
|
1347 | |||
1303 | In [1]: cd / |
|
1348 | In [1]: cd / | |
1304 | / |
|
1349 | / | |
1305 |
|
1350 | |||
1306 | In [2]: %config OSMagics.cd_force_quiet = True |
|
1351 | In [2]: %config OSMagics.cd_force_quiet = True | |
1307 |
|
1352 | |||
1308 | In [3]: cd /tmp |
|
1353 | In [3]: cd /tmp | |
1309 |
|
1354 | |||
1310 | In [4]: |
|
1355 | In [4]: | |
1311 |
|
1356 | |||
1312 | See :ghpull:`11491` |
|
1357 | See :ghpull:`11491` | |
1313 |
|
1358 | |||
1314 | In vi editing mode, whether the prompt includes the current vi mode can now be configured |
|
1359 | In vi editing mode, whether the prompt includes the current vi mode can now be configured | |
1315 | ----------------------------------------------------------------------------------------- |
|
1360 | ----------------------------------------------------------------------------------------- | |
1316 |
|
1361 | |||
1317 | Set the ``TerminalInteractiveShell.prompt_includes_vi_mode`` to a boolean value |
|
1362 | Set the ``TerminalInteractiveShell.prompt_includes_vi_mode`` to a boolean value | |
1318 | (default: True) to control this feature. See :ghpull:`11492` |
|
1363 | (default: True) to control this feature. See :ghpull:`11492` | |
1319 |
|
1364 | |||
1320 | .. _whatsnew710: |
|
1365 | .. _whatsnew710: | |
1321 |
|
1366 | |||
1322 | IPython 7.1.0 |
|
1367 | IPython 7.1.0 | |
1323 | ============= |
|
1368 | ============= | |
1324 |
|
1369 | |||
1325 | IPython 7.1.0 is the first minor release after 7.0.0 and mostly brings fixes to |
|
1370 | IPython 7.1.0 is the first minor release after 7.0.0 and mostly brings fixes to | |
1326 | new features, internal refactoring, and fixes for regressions that happened during the 6.x->7.x |
|
1371 | new features, internal refactoring, and fixes for regressions that happened during the 6.x->7.x | |
1327 | transition. It also brings **Compatibility with Python 3.7.1**, as we're |
|
1372 | transition. It also brings **Compatibility with Python 3.7.1**, as we're | |
1328 | unwillingly relying on a bug in CPython. |
|
1373 | unwillingly relying on a bug in CPython. | |
1329 |
|
1374 | |||
1330 | New Core Dev: |
|
1375 | New Core Dev: | |
1331 |
|
1376 | |||
1332 | - We welcome Jonathan Slenders to the commiters. Jonathan has done a fantastic |
|
1377 | - We welcome Jonathan Slenders to the commiters. Jonathan has done a fantastic | |
1333 | work on prompt_toolkit, and we'd like to recognise his impact by giving him |
|
1378 | work on prompt_toolkit, and we'd like to recognise his impact by giving him | |
1334 | commit rights. :ghissue:`11397` |
|
1379 | commit rights. :ghissue:`11397` | |
1335 |
|
1380 | |||
1336 | Notable Changes |
|
1381 | Notable Changes | |
1337 |
|
1382 | |||
1338 | - Major update of "latex to unicode" tab completion map (see below) |
|
1383 | - Major update of "latex to unicode" tab completion map (see below) | |
1339 |
|
1384 | |||
1340 | Notable New Features: |
|
1385 | Notable New Features: | |
1341 |
|
1386 | |||
1342 | - Restore functionality and documentation of the **sphinx directive**, which |
|
1387 | - Restore functionality and documentation of the **sphinx directive**, which | |
1343 | is now stricter (fail on error by daefault), has new configuration options, |
|
1388 | is now stricter (fail on error by daefault), has new configuration options, | |
1344 | has a brand new documentation page :ref:`ipython_directive` (which needs |
|
1389 | has a brand new documentation page :ref:`ipython_directive` (which needs | |
1345 | some cleanup). It is also now *tested* so we hope to have less regressions. |
|
1390 | some cleanup). It is also now *tested* so we hope to have less regressions. | |
1346 | :ghpull:`11402` |
|
1391 | :ghpull:`11402` | |
1347 |
|
1392 | |||
1348 | - ``IPython.display.Video`` now supports ``width`` and ``height`` arguments, |
|
1393 | - ``IPython.display.Video`` now supports ``width`` and ``height`` arguments, | |
1349 | allowing a custom width and height to be set instead of using the video's |
|
1394 | allowing a custom width and height to be set instead of using the video's | |
1350 | width and height. :ghpull:`11353` |
|
1395 | width and height. :ghpull:`11353` | |
1351 |
|
1396 | |||
1352 | - Warn when using ``HTML('<iframe>')`` instead of ``IFrame`` :ghpull:`11350` |
|
1397 | - Warn when using ``HTML('<iframe>')`` instead of ``IFrame`` :ghpull:`11350` | |
1353 |
|
1398 | |||
1354 | - Allow Dynamic switching of editing mode between vi/emacs and show |
|
1399 | - Allow Dynamic switching of editing mode between vi/emacs and show | |
1355 | normal/input mode in prompt when using vi. :ghpull:`11390`. Use ``%config |
|
1400 | normal/input mode in prompt when using vi. :ghpull:`11390`. Use ``%config | |
1356 | TerminalInteractiveShell.editing_mode = 'vi'`` or ``%config |
|
1401 | TerminalInteractiveShell.editing_mode = 'vi'`` or ``%config | |
1357 | TerminalInteractiveShell.editing_mode = 'emacs'`` to dynamically switch |
|
1402 | TerminalInteractiveShell.editing_mode = 'emacs'`` to dynamically switch | |
1358 | between modes. |
|
1403 | between modes. | |
1359 |
|
1404 | |||
1360 |
|
1405 | |||
1361 | Notable Fixes: |
|
1406 | Notable Fixes: | |
1362 |
|
1407 | |||
1363 | - Fix entering of **multi-line blocks in terminal** IPython, and various |
|
1408 | - Fix entering of **multi-line blocks in terminal** IPython, and various | |
1364 | crashes in the new input transformation machinery :ghpull:`11354`, |
|
1409 | crashes in the new input transformation machinery :ghpull:`11354`, | |
1365 | :ghpull:`11356`, :ghpull:`11358`. These also fix a **Compatibility bug |
|
1410 | :ghpull:`11356`, :ghpull:`11358`. These also fix a **Compatibility bug | |
1366 | with Python 3.7.1**. |
|
1411 | with Python 3.7.1**. | |
1367 |
|
1412 | |||
1368 | - Fix moving through generator stack in ipdb :ghpull:`11266` |
|
1413 | - Fix moving through generator stack in ipdb :ghpull:`11266` | |
1369 |
|
1414 | |||
1370 | - %Magic command arguments now support quoting. :ghpull:`11330` |
|
1415 | - %Magic command arguments now support quoting. :ghpull:`11330` | |
1371 |
|
1416 | |||
1372 | - Re-add ``rprint`` and ``rprinte`` aliases. :ghpull:`11331` |
|
1417 | - Re-add ``rprint`` and ``rprinte`` aliases. :ghpull:`11331` | |
1373 |
|
1418 | |||
1374 | - Remove implicit dependency on ``ipython_genutils`` :ghpull:`11317` |
|
1419 | - Remove implicit dependency on ``ipython_genutils`` :ghpull:`11317` | |
1375 |
|
1420 | |||
1376 | - Make ``nonlocal`` raise ``SyntaxError`` instead of silently failing in async |
|
1421 | - Make ``nonlocal`` raise ``SyntaxError`` instead of silently failing in async | |
1377 | mode. :ghpull:`11382` |
|
1422 | mode. :ghpull:`11382` | |
1378 |
|
1423 | |||
1379 | - Fix mishandling of magics and ``= !`` assignment just after a dedent in |
|
1424 | - Fix mishandling of magics and ``= !`` assignment just after a dedent in | |
1380 | nested code blocks :ghpull:`11418` |
|
1425 | nested code blocks :ghpull:`11418` | |
1381 |
|
1426 | |||
1382 | - Fix instructions for custom shortcuts :ghpull:`11426` |
|
1427 | - Fix instructions for custom shortcuts :ghpull:`11426` | |
1383 |
|
1428 | |||
1384 |
|
1429 | |||
1385 | Notable Internals improvements: |
|
1430 | Notable Internals improvements: | |
1386 |
|
1431 | |||
1387 | - Use of ``os.scandir`` (Python 3 only) to speed up some file system operations. |
|
1432 | - Use of ``os.scandir`` (Python 3 only) to speed up some file system operations. | |
1388 | :ghpull:`11365` |
|
1433 | :ghpull:`11365` | |
1389 |
|
1434 | |||
1390 | - use ``perf_counter`` instead of ``clock`` for more precise |
|
1435 | - use ``perf_counter`` instead of ``clock`` for more precise | |
1391 | timing results with ``%time`` :ghpull:`11376` |
|
1436 | timing results with ``%time`` :ghpull:`11376` | |
1392 |
|
1437 | |||
1393 | Many thanks to all the contributors and in particular to ``bartskowron`` and |
|
1438 | Many thanks to all the contributors and in particular to ``bartskowron`` and | |
1394 | ``tonyfast`` who handled some pretty complicated bugs in the input machinery. We |
|
1439 | ``tonyfast`` who handled some pretty complicated bugs in the input machinery. We | |
1395 | had a number of first time contributors and maybe hacktoberfest participants that |
|
1440 | had a number of first time contributors and maybe hacktoberfest participants that | |
1396 | made significant contributions and helped us free some time to focus on more |
|
1441 | made significant contributions and helped us free some time to focus on more | |
1397 | complicated bugs. |
|
1442 | complicated bugs. | |
1398 |
|
1443 | |||
1399 | You |
|
1444 | You | |
1400 | can see all the closed issues and Merged PR, new features and fixes `here |
|
1445 | can see all the closed issues and Merged PR, new features and fixes `here | |
1401 | <https://github.com/ipython/ipython/issues?utf8=%E2%9C%93&q=+is%3Aclosed+milestone%3A7.1+>`_. |
|
1446 | <https://github.com/ipython/ipython/issues?utf8=%E2%9C%93&q=+is%3Aclosed+milestone%3A7.1+>`_. | |
1402 |
|
1447 | |||
1403 | Unicode Completion update |
|
1448 | Unicode Completion update | |
1404 | ------------------------- |
|
1449 | ------------------------- | |
1405 |
|
1450 | |||
1406 | In IPython 7.1 the Unicode completion map has been updated and synchronized with |
|
1451 | In IPython 7.1 the Unicode completion map has been updated and synchronized with | |
1407 | the Julia language. |
|
1452 | the Julia language. | |
1408 |
|
1453 | |||
1409 | Added and removed character characters: |
|
1454 | Added and removed character characters: | |
1410 |
|
1455 | |||
1411 | ``\jmath`` (``Θ·``), ``\\underleftrightarrow`` (U+034D, combining) have been |
|
1456 | ``\jmath`` (``Θ·``), ``\\underleftrightarrow`` (U+034D, combining) have been | |
1412 | added, while ``\\textasciicaron`` have been removed |
|
1457 | added, while ``\\textasciicaron`` have been removed | |
1413 |
|
1458 | |||
1414 | Some sequences have seen their prefix removed: |
|
1459 | Some sequences have seen their prefix removed: | |
1415 |
|
1460 | |||
1416 | - 6 characters ``\text...<tab>`` should now be inputed with ``\...<tab>`` directly, |
|
1461 | - 6 characters ``\text...<tab>`` should now be inputed with ``\...<tab>`` directly, | |
1417 | - 45 characters ``\Elz...<tab>`` should now be inputed with ``\...<tab>`` directly, |
|
1462 | - 45 characters ``\Elz...<tab>`` should now be inputed with ``\...<tab>`` directly, | |
1418 | - 65 characters ``\B...<tab>`` should now be inputed with ``\...<tab>`` directly, |
|
1463 | - 65 characters ``\B...<tab>`` should now be inputed with ``\...<tab>`` directly, | |
1419 | - 450 characters ``\m...<tab>`` should now be inputed with ``\...<tab>`` directly, |
|
1464 | - 450 characters ``\m...<tab>`` should now be inputed with ``\...<tab>`` directly, | |
1420 |
|
1465 | |||
1421 | Some sequences have seen their prefix shortened: |
|
1466 | Some sequences have seen their prefix shortened: | |
1422 |
|
1467 | |||
1423 | - 5 characters ``\mitBbb...<tab>`` should now be inputed with ``\bbi...<tab>`` directly, |
|
1468 | - 5 characters ``\mitBbb...<tab>`` should now be inputed with ``\bbi...<tab>`` directly, | |
1424 | - 52 characters ``\mit...<tab>`` should now be inputed with ``\i...<tab>`` directly, |
|
1469 | - 52 characters ``\mit...<tab>`` should now be inputed with ``\i...<tab>`` directly, | |
1425 | - 216 characters ``\mbfit...<tab>`` should now be inputed with ``\bi...<tab>`` directly, |
|
1470 | - 216 characters ``\mbfit...<tab>`` should now be inputed with ``\bi...<tab>`` directly, | |
1426 | - 222 characters ``\mbf...<tab>`` should now be inputed with ``\b...<tab>`` directly, |
|
1471 | - 222 characters ``\mbf...<tab>`` should now be inputed with ``\b...<tab>`` directly, | |
1427 |
|
1472 | |||
1428 | A couple of characters had their sequence simplified: |
|
1473 | A couple of characters had their sequence simplified: | |
1429 |
|
1474 | |||
1430 | - ``Γ°``, type ``\dh<tab>``, instead of ``\eth<tab>`` |
|
1475 | - ``Γ°``, type ``\dh<tab>``, instead of ``\eth<tab>`` | |
1431 | - ``Δ§``, type ``\hbar<tab>``, instead of ``\Elzxh<tab>`` |
|
1476 | - ``Δ§``, type ``\hbar<tab>``, instead of ``\Elzxh<tab>`` | |
1432 | - ``ΙΈ``, type ``\ltphi<tab>``, instead of ``\textphi<tab>`` |
|
1477 | - ``ΙΈ``, type ``\ltphi<tab>``, instead of ``\textphi<tab>`` | |
1433 | - ``Ο΄``, type ``\varTheta<tab>``, instead of ``\textTheta<tab>`` |
|
1478 | - ``Ο΄``, type ``\varTheta<tab>``, instead of ``\textTheta<tab>`` | |
1434 | - ``β``, type ``\eulermascheroni<tab>``, instead of ``\Eulerconst<tab>`` |
|
1479 | - ``β``, type ``\eulermascheroni<tab>``, instead of ``\Eulerconst<tab>`` | |
1435 | - ``β``, type ``\planck<tab>``, instead of ``\Planckconst<tab>`` |
|
1480 | - ``β``, type ``\planck<tab>``, instead of ``\Planckconst<tab>`` | |
1436 |
|
1481 | |||
1437 | - U+0336 (COMBINING LONG STROKE OVERLAY), type ``\strike<tab>``, instead of ``\Elzbar<tab>``. |
|
1482 | - U+0336 (COMBINING LONG STROKE OVERLAY), type ``\strike<tab>``, instead of ``\Elzbar<tab>``. | |
1438 |
|
1483 | |||
1439 | A couple of sequences have been updated: |
|
1484 | A couple of sequences have been updated: | |
1440 |
|
1485 | |||
1441 | - ``\varepsilon`` now gives ``Ι`` (GREEK SMALL LETTER EPSILON) instead of ``Ξ΅`` (GREEK LUNATE EPSILON SYMBOL), |
|
1486 | - ``\varepsilon`` now gives ``Ι`` (GREEK SMALL LETTER EPSILON) instead of ``Ξ΅`` (GREEK LUNATE EPSILON SYMBOL), | |
1442 | - ``\underbar`` now gives U+0331 (COMBINING MACRON BELOW) instead of U+0332 (COMBINING LOW LINE). |
|
1487 | - ``\underbar`` now gives U+0331 (COMBINING MACRON BELOW) instead of U+0332 (COMBINING LOW LINE). | |
1443 |
|
1488 | |||
1444 |
|
1489 | |||
1445 | .. _whatsnew700: |
|
1490 | .. _whatsnew700: | |
1446 |
|
1491 | |||
1447 | IPython 7.0.0 |
|
1492 | IPython 7.0.0 | |
1448 | ============= |
|
1493 | ============= | |
1449 |
|
1494 | |||
1450 | Released Thursday September 27th, 2018 |
|
1495 | Released Thursday September 27th, 2018 | |
1451 |
|
1496 | |||
1452 | IPython 7 includes major feature improvements. |
|
1497 | IPython 7 includes major feature improvements. | |
1453 | This is also the second major version of IPython to support only |
|
1498 | This is also the second major version of IPython to support only | |
1454 | Python 3 βΒ starting at Python 3.4. Python 2 is still community-supported |
|
1499 | Python 3 βΒ starting at Python 3.4. Python 2 is still community-supported | |
1455 | on the bugfix only 5.x branch, but we remind you that Python 2 "end of life" |
|
1500 | on the bugfix only 5.x branch, but we remind you that Python 2 "end of life" | |
1456 | is on Jan 1st 2020. |
|
1501 | is on Jan 1st 2020. | |
1457 |
|
1502 | |||
1458 | We were able to backport bug fixes to the 5.x branch thanks to our backport bot which |
|
1503 | We were able to backport bug fixes to the 5.x branch thanks to our backport bot which | |
1459 | backported more than `70 Pull-Requests |
|
1504 | backported more than `70 Pull-Requests | |
1460 | <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>`_ |
|
1505 | <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>`_ | |
1461 |
|
1506 | |||
1462 | The IPython 6.x branch will likely not see any further release unless critical |
|
1507 | The IPython 6.x branch will likely not see any further release unless critical | |
1463 | bugs are found. |
|
1508 | bugs are found. | |
1464 |
|
1509 | |||
1465 | Make sure you have pip > 9.0 before upgrading. You should be able to update by running: |
|
1510 | Make sure you have pip > 9.0 before upgrading. You should be able to update by running: | |
1466 |
|
1511 | |||
1467 | .. code:: |
|
1512 | .. code:: | |
1468 |
|
1513 | |||
1469 | pip install ipython --upgrade |
|
1514 | pip install ipython --upgrade | |
1470 |
|
1515 | |||
1471 | .. only:: ipydev |
|
1516 | .. only:: ipydev | |
1472 |
|
1517 | |||
1473 | If you are trying to install or update an ``alpha``, ``beta``, or ``rc`` |
|
1518 | If you are trying to install or update an ``alpha``, ``beta``, or ``rc`` | |
1474 | version, use pip ``--pre`` flag. |
|
1519 | version, use pip ``--pre`` flag. | |
1475 |
|
1520 | |||
1476 | .. code:: |
|
1521 | .. code:: | |
1477 |
|
1522 | |||
1478 | pip install ipython --upgrade --pre |
|
1523 | pip install ipython --upgrade --pre | |
1479 |
|
1524 | |||
1480 |
|
1525 | |||
1481 | Or, if you have conda installed: |
|
1526 | Or, if you have conda installed: | |
1482 |
|
1527 | |||
1483 | .. code:: |
|
1528 | .. code:: | |
1484 |
|
1529 | |||
1485 | conda install ipython |
|
1530 | conda install ipython | |
1486 |
|
1531 | |||
1487 |
|
1532 | |||
1488 |
|
1533 | |||
1489 | Prompt Toolkit 2.0 |
|
1534 | Prompt Toolkit 2.0 | |
1490 | ------------------ |
|
1535 | ------------------ | |
1491 |
|
1536 | |||
1492 | IPython 7.0+ now uses ``prompt_toolkit 2.0``. If you still need to use an earlier |
|
1537 | IPython 7.0+ now uses ``prompt_toolkit 2.0``. If you still need to use an earlier | |
1493 | ``prompt_toolkit`` version, you may need to pin IPython to ``<7.0``. |
|
1538 | ``prompt_toolkit`` version, you may need to pin IPython to ``<7.0``. | |
1494 |
|
1539 | |||
1495 | Autowait: Asynchronous REPL |
|
1540 | Autowait: Asynchronous REPL | |
1496 | --------------------------- |
|
1541 | --------------------------- | |
1497 |
|
1542 | |||
1498 | Staring with IPython 7.0 on Python 3.6+, IPython can automatically ``await`` |
|
1543 | Staring with IPython 7.0 on Python 3.6+, IPython can automatically ``await`` | |
1499 | top level code. You should not need to access an event loop or runner |
|
1544 | top level code. You should not need to access an event loop or runner | |
1500 | yourself. To learn more, read the :ref:`autoawait` section of our docs, see |
|
1545 | yourself. To learn more, read the :ref:`autoawait` section of our docs, see | |
1501 | :ghpull:`11265`, or try the following code:: |
|
1546 | :ghpull:`11265`, or try the following code:: | |
1502 |
|
1547 | |||
1503 | Python 3.6.0 |
|
1548 | Python 3.6.0 | |
1504 | Type 'copyright', 'credits' or 'license' for more information |
|
1549 | Type 'copyright', 'credits' or 'license' for more information | |
1505 | IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help. |
|
1550 | IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help. | |
1506 |
|
1551 | |||
1507 | In [1]: import aiohttp |
|
1552 | In [1]: import aiohttp | |
1508 | ...: result = aiohttp.get('https://api.github.com') |
|
1553 | ...: result = aiohttp.get('https://api.github.com') | |
1509 |
|
1554 | |||
1510 | In [2]: response = await result |
|
1555 | In [2]: response = await result | |
1511 | <pause for a few 100s ms> |
|
1556 | <pause for a few 100s ms> | |
1512 |
|
1557 | |||
1513 | In [3]: await response.json() |
|
1558 | In [3]: await response.json() | |
1514 | Out[3]: |
|
1559 | Out[3]: | |
1515 | {'authorizations_url': 'https://api.github.com/authorizations', |
|
1560 | {'authorizations_url': 'https://api.github.com/authorizations', | |
1516 | 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}', |
|
1561 | 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}', | |
1517 | ... |
|
1562 | ... | |
1518 | } |
|
1563 | } | |
1519 |
|
1564 | |||
1520 | .. note:: |
|
1565 | .. note:: | |
1521 |
|
1566 | |||
1522 | Async integration is experimental code, behavior may change or be removed |
|
1567 | Async integration is experimental code, behavior may change or be removed | |
1523 | between Python and IPython versions without warnings. |
|
1568 | between Python and IPython versions without warnings. | |
1524 |
|
1569 | |||
1525 | Integration is by default with `asyncio`, but other libraries can be configured -- |
|
1570 | Integration is by default with `asyncio`, but other libraries can be configured -- | |
1526 | like ``curio`` or ``trio`` -- to improve concurrency in the REPL:: |
|
1571 | like ``curio`` or ``trio`` -- to improve concurrency in the REPL:: | |
1527 |
|
1572 | |||
1528 | In [1]: %autoawait trio |
|
1573 | In [1]: %autoawait trio | |
1529 |
|
1574 | |||
1530 | In [2]: import trio |
|
1575 | In [2]: import trio | |
1531 |
|
1576 | |||
1532 | In [3]: async def child(i): |
|
1577 | In [3]: async def child(i): | |
1533 | ...: print(" child %s goes to sleep"%i) |
|
1578 | ...: print(" child %s goes to sleep"%i) | |
1534 | ...: await trio.sleep(2) |
|
1579 | ...: await trio.sleep(2) | |
1535 | ...: print(" child %s wakes up"%i) |
|
1580 | ...: print(" child %s wakes up"%i) | |
1536 |
|
1581 | |||
1537 | In [4]: print('parent start') |
|
1582 | In [4]: print('parent start') | |
1538 | ...: async with trio.open_nursery() as n: |
|
1583 | ...: async with trio.open_nursery() as n: | |
1539 | ...: for i in range(3): |
|
1584 | ...: for i in range(3): | |
1540 | ...: n.spawn(child, i) |
|
1585 | ...: n.spawn(child, i) | |
1541 | ...: print('parent end') |
|
1586 | ...: print('parent end') | |
1542 | parent start |
|
1587 | parent start | |
1543 | child 2 goes to sleep |
|
1588 | child 2 goes to sleep | |
1544 | child 0 goes to sleep |
|
1589 | child 0 goes to sleep | |
1545 | child 1 goes to sleep |
|
1590 | child 1 goes to sleep | |
1546 | <about 2 seconds pause> |
|
1591 | <about 2 seconds pause> | |
1547 | child 2 wakes up |
|
1592 | child 2 wakes up | |
1548 | child 1 wakes up |
|
1593 | child 1 wakes up | |
1549 | child 0 wakes up |
|
1594 | child 0 wakes up | |
1550 | parent end |
|
1595 | parent end | |
1551 |
|
1596 | |||
1552 | See :ref:`autoawait` for more information. |
|
1597 | See :ref:`autoawait` for more information. | |
1553 |
|
1598 | |||
1554 |
|
1599 | |||
1555 | Asynchronous code in a Notebook interface or any other frontend using the |
|
1600 | Asynchronous code in a Notebook interface or any other frontend using the | |
1556 | Jupyter Protocol will require further updates to the IPykernel package. |
|
1601 | Jupyter Protocol will require further updates to the IPykernel package. | |
1557 |
|
1602 | |||
1558 | Non-Asynchronous code |
|
1603 | Non-Asynchronous code | |
1559 | ~~~~~~~~~~~~~~~~~~~~~ |
|
1604 | ~~~~~~~~~~~~~~~~~~~~~ | |
1560 |
|
1605 | |||
1561 | As the internal API of IPython is now asynchronous, IPython needs to run under |
|
1606 | As the internal API of IPython is now asynchronous, IPython needs to run under | |
1562 | an event loop. In order to allow many workflows, (like using the :magic:`%run` |
|
1607 | an event loop. In order to allow many workflows, (like using the :magic:`%run` | |
1563 | magic, or copy-pasting code that explicitly starts/stop event loop), when |
|
1608 | magic, or copy-pasting code that explicitly starts/stop event loop), when | |
1564 | top-level code is detected as not being asynchronous, IPython code is advanced |
|
1609 | top-level code is detected as not being asynchronous, IPython code is advanced | |
1565 | via a pseudo-synchronous runner, and may not advance pending tasks. |
|
1610 | via a pseudo-synchronous runner, and may not advance pending tasks. | |
1566 |
|
1611 | |||
1567 | Change to Nested Embed |
|
1612 | Change to Nested Embed | |
1568 | ~~~~~~~~~~~~~~~~~~~~~~ |
|
1613 | ~~~~~~~~~~~~~~~~~~~~~~ | |
1569 |
|
1614 | |||
1570 | The introduction of the ability to run async code had some effect on the |
|
1615 | The introduction of the ability to run async code had some effect on the | |
1571 | ``IPython.embed()`` API. By default, embed will not allow you to run asynchronous |
|
1616 | ``IPython.embed()`` API. By default, embed will not allow you to run asynchronous | |
1572 | code unless an event loop is specified. |
|
1617 | code unless an event loop is specified. | |
1573 |
|
1618 | |||
1574 | Effects on Magics |
|
1619 | Effects on Magics | |
1575 | ~~~~~~~~~~~~~~~~~ |
|
1620 | ~~~~~~~~~~~~~~~~~ | |
1576 |
|
1621 | |||
1577 | Some magics will not work with async until they're updated. |
|
1622 | Some magics will not work with async until they're updated. | |
1578 | Contributions welcome. |
|
1623 | Contributions welcome. | |
1579 |
|
1624 | |||
1580 | Expected Future changes |
|
1625 | Expected Future changes | |
1581 | ~~~~~~~~~~~~~~~~~~~~~~~ |
|
1626 | ~~~~~~~~~~~~~~~~~~~~~~~ | |
1582 |
|
1627 | |||
1583 | We expect more internal but public IPython functions to become ``async``, and |
|
1628 | We expect more internal but public IPython functions to become ``async``, and | |
1584 | will likely end up having a persistent event loop while IPython is running. |
|
1629 | will likely end up having a persistent event loop while IPython is running. | |
1585 |
|
1630 | |||
1586 | Thanks |
|
1631 | Thanks | |
1587 | ~~~~~~ |
|
1632 | ~~~~~~ | |
1588 |
|
1633 | |||
1589 | This release took more than a year in the making. |
|
1634 | This release took more than a year in the making. | |
1590 | The code was rebased a number of |
|
1635 | The code was rebased a number of | |
1591 | times; leading to commit authorship that may have been lost in the final |
|
1636 | times; leading to commit authorship that may have been lost in the final | |
1592 | Pull-Request. Huge thanks to many people for contribution, discussion, code, |
|
1637 | Pull-Request. Huge thanks to many people for contribution, discussion, code, | |
1593 | documentation, use-cases: dalejung, danielballan, ellisonbg, fperez, gnestor, |
|
1638 | documentation, use-cases: dalejung, danielballan, ellisonbg, fperez, gnestor, | |
1594 | minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many others. |
|
1639 | minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many others. | |
1595 |
|
1640 | |||
1596 |
|
1641 | |||
1597 | Autoreload Improvement |
|
1642 | Autoreload Improvement | |
1598 | ---------------------- |
|
1643 | ---------------------- | |
1599 |
|
1644 | |||
1600 | The magic :magic:`%autoreload 2 <autoreload>` now captures new methods added to |
|
1645 | The magic :magic:`%autoreload 2 <autoreload>` now captures new methods added to | |
1601 | classes. Earlier, only methods existing as of the initial import were being |
|
1646 | classes. Earlier, only methods existing as of the initial import were being | |
1602 | tracked and updated. |
|
1647 | tracked and updated. | |
1603 |
|
1648 | |||
1604 | This new feature helps dual environment development - Jupyter+IDE - where the |
|
1649 | This new feature helps dual environment development - Jupyter+IDE - where the | |
1605 | code gradually moves from notebook cells to package files as it gets |
|
1650 | code gradually moves from notebook cells to package files as it gets | |
1606 | structured. |
|
1651 | structured. | |
1607 |
|
1652 | |||
1608 | **Example**: An instance of the class ``MyClass`` will be able to access the |
|
1653 | **Example**: An instance of the class ``MyClass`` will be able to access the | |
1609 | method ``cube()`` after it is uncommented and the file ``file1.py`` is saved on |
|
1654 | method ``cube()`` after it is uncommented and the file ``file1.py`` is saved on | |
1610 | disk. |
|
1655 | disk. | |
1611 |
|
1656 | |||
1612 |
|
1657 | |||
1613 | .. code:: |
|
1658 | .. code:: | |
1614 |
|
1659 | |||
1615 | # notebook |
|
1660 | # notebook | |
1616 |
|
1661 | |||
1617 | from mymodule import MyClass |
|
1662 | from mymodule import MyClass | |
1618 | first = MyClass(5) |
|
1663 | first = MyClass(5) | |
1619 |
|
1664 | |||
1620 | .. code:: |
|
1665 | .. code:: | |
1621 |
|
1666 | |||
1622 | # mymodule/file1.py |
|
1667 | # mymodule/file1.py | |
1623 |
|
1668 | |||
1624 | class MyClass: |
|
1669 | class MyClass: | |
1625 |
|
1670 | |||
1626 | def __init__(self, a=10): |
|
1671 | def __init__(self, a=10): | |
1627 | self.a = a |
|
1672 | self.a = a | |
1628 |
|
1673 | |||
1629 | def square(self): |
|
1674 | def square(self): | |
1630 | print('compute square') |
|
1675 | print('compute square') | |
1631 | return self.a*self.a |
|
1676 | return self.a*self.a | |
1632 |
|
1677 | |||
1633 | # def cube(self): |
|
1678 | # def cube(self): | |
1634 | # print('compute cube') |
|
1679 | # print('compute cube') | |
1635 | # return self.a*self.a*self.a |
|
1680 | # return self.a*self.a*self.a | |
1636 |
|
1681 | |||
1637 |
|
1682 | |||
1638 |
|
1683 | |||
1639 |
|
1684 | |||
1640 | Misc |
|
1685 | Misc | |
1641 | ---- |
|
1686 | ---- | |
1642 |
|
1687 | |||
1643 | The autoindent feature that was deprecated in 5.x was re-enabled and |
|
1688 | The autoindent feature that was deprecated in 5.x was re-enabled and | |
1644 | un-deprecated in :ghpull:`11257` |
|
1689 | un-deprecated in :ghpull:`11257` | |
1645 |
|
1690 | |||
1646 | Make :magic:`%run -n -i ... <run>` work correctly. Earlier, if :magic:`%run` was |
|
1691 | Make :magic:`%run -n -i ... <run>` work correctly. Earlier, if :magic:`%run` was | |
1647 | passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308` |
|
1692 | passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308` | |
1648 |
|
1693 | |||
1649 |
|
1694 | |||
1650 | The :cellmagic:`%%script` (as well as :cellmagic:`%%bash`, |
|
1695 | The :cellmagic:`%%script` (as well as :cellmagic:`%%bash`, | |
1651 | :cellmagic:`%%ruby`... ) cell magics now raise by default if the return code of |
|
1696 | :cellmagic:`%%ruby`... ) cell magics now raise by default if the return code of | |
1652 | the given code is non-zero (thus halting execution of further cells in a |
|
1697 | the given code is non-zero (thus halting execution of further cells in a | |
1653 | notebook). The behavior can be disable by passing the ``--no-raise-error`` flag. |
|
1698 | notebook). The behavior can be disable by passing the ``--no-raise-error`` flag. | |
1654 |
|
1699 | |||
1655 |
|
1700 | |||
1656 | Deprecations |
|
1701 | Deprecations | |
1657 | ------------ |
|
1702 | ------------ | |
1658 |
|
1703 | |||
1659 | A couple of unused functions and methods have been deprecated and will be removed |
|
1704 | A couple of unused functions and methods have been deprecated and will be removed | |
1660 | in future versions: |
|
1705 | in future versions: | |
1661 |
|
1706 | |||
1662 | - ``IPython.utils.io.raw_print_err`` |
|
1707 | - ``IPython.utils.io.raw_print_err`` | |
1663 | - ``IPython.utils.io.raw_print`` |
|
1708 | - ``IPython.utils.io.raw_print`` | |
1664 |
|
1709 | |||
1665 |
|
1710 | |||
1666 | Backwards incompatible changes |
|
1711 | Backwards incompatible changes | |
1667 | ------------------------------ |
|
1712 | ------------------------------ | |
1668 |
|
1713 | |||
1669 | * The API for transforming input before it is parsed as Python code has been |
|
1714 | * The API for transforming input before it is parsed as Python code has been | |
1670 | completely redesigned: any custom input transformations will need to be |
|
1715 | completely redesigned: any custom input transformations will need to be | |
1671 | rewritten. See :doc:`/config/inputtransforms` for details of the new API. |
|
1716 | 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