Show More
@@ -1,32 +1,33 b'' | |||||
1 | ===================== |
|
1 | ===================== | |
2 | Development version |
|
2 | Development version | |
3 | ===================== |
|
3 | ===================== | |
4 |
|
4 | |||
5 | This document describes in-flight development work. |
|
5 | This document describes in-flight development work. | |
6 |
|
6 | |||
7 | .. warning:: |
|
7 | .. warning:: | |
8 |
|
8 | |||
9 | Please do not edit this file by hand (doing so will likely cause merge |
|
9 | Please do not edit this file by hand (doing so will likely cause merge | |
10 | conflicts for other Pull Requests). Instead, create a new file in the |
|
10 | conflicts for other Pull Requests). Instead, create a new file in the | |
11 | `docs/source/whatsnew/pr` folder |
|
11 | `docs/source/whatsnew/pr` folder | |
12 |
|
12 | |||
13 |
|
13 | |||
14 | Released .... ...., 2017 |
|
14 | Released .... ...., 2017 | |
15 |
|
15 | |||
16 |
|
16 | |||
17 | Need to be updated: |
|
17 | Need to be updated: | |
18 |
|
18 | |||
19 | .. toctree:: |
|
19 | .. toctree:: | |
20 | :maxdepth: 2 |
|
20 | :maxdepth: 2 | |
21 | :glob: |
|
21 | :glob: | |
22 |
|
22 | |||
23 | pr/* |
|
23 | pr/* | |
24 |
|
24 | |||
25 |
|
25 | |||
|
26 | ||||
26 | .. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT. |
|
27 | .. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT. | |
27 |
|
28 | |||
28 |
|
29 | |||
29 | Backwards incompatible changes |
|
30 | Backwards incompatible changes | |
30 | ------------------------------ |
|
31 | ------------------------------ | |
31 |
|
32 | |||
32 | .. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT. |
|
33 | .. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT. |
@@ -1,303 +1,354 b'' | |||||
1 | ============ |
|
1 | ============ | |
2 | 7.x Series |
|
2 | 7.x Series | |
3 | ============ |
|
3 | ============ | |
4 |
|
4 | |||
5 | .. _whatsnew710: |
|
5 | .. _whatsnew710: | |
6 |
|
6 | |||
7 | IPython 7.1.0 |
|
7 | IPython 7.1.0 | |
8 | ============= |
|
8 | ============= | |
9 |
|
9 | |||
10 |
|
||||
11 | IPython 7.1.0 is the first minor release after 7.0.0 and mostly bring fixes to |
|
10 | IPython 7.1.0 is the first minor release after 7.0.0 and mostly bring fixes to | |
12 | new feature, internal refactor and regressions that happen during the 6.x->7.x |
|
11 | new feature, internal refactor and regressions that happen during the 6.x->7.x | |
13 | transition. It also bring **Compatibility with Python 3.7.1**, as were |
|
12 | transition. It also bring **Compatibility with Python 3.7.1**, as were | |
14 | unwillingly relying on a bug in CPython. |
|
13 | unwillingly relying on a bug in CPython. | |
15 |
|
14 | |||
16 | New Core Dev: |
|
15 | New Core Dev: | |
17 |
|
16 | |||
18 | - We welcome Jonathan Slenders to the commiters. Jonathan has done a fantastic |
|
17 | - We welcome Jonathan Slenders to the commiters. Jonathan has done a fantastic | |
19 | work on Prompt toolkit, and we'd like to recognise his impact by giving him |
|
18 | work on Prompt toolkit, and we'd like to recognise his impact by giving him | |
20 | commit rights. :ghissue:`11397` |
|
19 | commit rights. :ghissue:`11397` | |
21 |
|
20 | |||
|
21 | Notables Changes | |||
|
22 | ||||
|
23 | - Major update of "latex to unicode" tab completion map (see below) | |||
|
24 | ||||
22 | Notable New Features: |
|
25 | Notable New Features: | |
23 |
|
26 | |||
24 |
- Restore functionality and documentation of the **sphinx directive**, which |
|
27 | - Restore functionality and documentation of the **sphinx directive**, which | |
25 |
now stricter (fail on error by default), gained configuration options, |
|
28 | is now stricter (fail on error by default), gained configuration options, | |
26 |
brand new documentation page :ref:`ipython_directive`, which need |
|
29 | have a brand new documentation page :ref:`ipython_directive`, which need | |
27 | It is also now *tested* so we hope to have less regressions. |
|
30 | some cleanup. It is also now *tested* so we hope to have less regressions. | |
28 | :ghpull:`11402` |
|
31 | :ghpull:`11402` | |
29 |
|
32 | |||
30 | - ``IPython.display.Video`` now supports ``width`` and ``height`` arguments, |
|
33 | - ``IPython.display.Video`` now supports ``width`` and ``height`` arguments, | |
31 | allowing a custom width and height to be set instead of using the video's |
|
34 | allowing a custom width and height to be set instead of using the video's | |
32 | width and height. :ghpull:`11353` |
|
35 | width and height. :ghpull:`11353` | |
33 |
|
36 | |||
34 | - Warn when using ``HTML('<iframe>')`` instead of ``IFrame`` :ghpull:`11350` |
|
37 | - Warn when using ``HTML('<iframe>')`` instead of ``IFrame`` :ghpull:`11350` | |
35 |
|
38 | |||
36 | - Allow Dynamic switching of editing mode between vi/emacs and show |
|
39 | - Allow Dynamic switching of editing mode between vi/emacs and show | |
37 | normal/input mode in prompt when using vi. :ghpull:`11390`. Use ``%config |
|
40 | normal/input mode in prompt when using vi. :ghpull:`11390`. Use ``%config | |
38 | TerminalInteractiveShell.editing_mode = 'vi'`` or ``%config |
|
41 | TerminalInteractiveShell.editing_mode = 'vi'`` or ``%config | |
39 | TerminalInteractiveShell.editing_mode = 'emacs'`` to dynamically spwitch |
|
42 | TerminalInteractiveShell.editing_mode = 'emacs'`` to dynamically spwitch | |
40 |
|
43 | |||
41 |
|
44 | |||
42 | Notable Fixes: |
|
45 | Notable Fixes: | |
43 |
|
46 | |||
44 |
- Fix entering of **multi-line block in terminal** IPython, and various |
|
47 | - Fix entering of **multi-line block in terminal** IPython, and various | |
45 |
in the new input transformation machinery :ghpull:`11354`, |
|
48 | crashes in the new input transformation machinery :ghpull:`11354`, | |
46 | ones also fix a **Compatibility but with Python 3.7.1**. |
|
49 | :ghpull:`11356`, :ghpull:`11358`, these ones also fix a **Compatibility but | |
|
50 | with Python 3.7.1**. | |||
47 |
|
51 | |||
48 | - Fix moving through generator stack in ipdb :ghpull:`11266` |
|
52 | - Fix moving through generator stack in ipdb :ghpull:`11266` | |
49 |
|
53 | |||
50 | - Magics arguments now support quoting. :ghpull:`11330` |
|
54 | - Magics arguments now support quoting. :ghpull:`11330` | |
51 |
|
55 | |||
52 | - Re-add ``rprint`` and ``rprinte`` aliases. :ghpull:`11331` |
|
56 | - Re-add ``rprint`` and ``rprinte`` aliases. :ghpull:`11331` | |
53 |
|
57 | |||
54 | - Remove implicit dependency to ``ipython_genutils`` :ghpull:`11317` |
|
58 | - Remove implicit dependency to ``ipython_genutils`` :ghpull:`11317` | |
55 |
|
59 | |||
56 | - Make ``nonlocal`` raise ``SyntaxError`` instead of silently failing in async |
|
60 | - Make ``nonlocal`` raise ``SyntaxError`` instead of silently failing in async | |
57 | mode. :ghpull:`11382` |
|
61 | mode. :ghpull:`11382` | |
58 |
|
62 | |||
|
63 | - Fix mishandling of magics and ``= !`` assignment just after a dedent in | |||
|
64 | nested code blocks :ghpull:`11418` | |||
|
65 | ||||
|
66 | - Fix instructions for custom shortcuts :ghpull:`11426` | |||
|
67 | ||||
59 |
|
68 | |||
60 | Notable Internals improvements: |
|
69 | Notable Internals improvements: | |
61 |
|
70 | |||
62 | - Use of ``os.scandir`` (Python 3 only) to speedup some file system operations. |
|
71 | - Use of ``os.scandir`` (Python 3 only) to speedup some file system operations. | |
63 | :ghpull:`11365` |
|
72 | :ghpull:`11365` | |
64 |
|
73 | |||
65 | - use ``perf_counter`` instead of ``clock`` for more precise |
|
74 | - use ``perf_counter`` instead of ``clock`` for more precise | |
66 | timing result with ``%time`` :ghpull:`11376` |
|
75 | timing result with ``%time`` :ghpull:`11376` | |
67 |
|
76 | |||
68 | Many thanks to all the contributors and in particular to ``bartskowron``, and |
|
77 | Many thanks to all the contributors and in particular to ``bartskowron``, and | |
69 | ``tonyfast`` who handled a pretty complicated bugs in the input machinery. We |
|
78 | ``tonyfast`` who handled a pretty complicated bugs in the input machinery. We | |
70 | had a number of first time contributors and maybe hacktoberfest participant that |
|
79 | had a number of first time contributors and maybe hacktoberfest participant that | |
71 | made significant contributions, and helped us free some time to focus on more |
|
80 | made significant contributions, and helped us free some time to focus on more | |
72 | complicated bugs. |
|
81 | complicated bugs. | |
73 |
|
82 | |||
74 | You |
|
83 | You | |
75 | can see all the closed issues and Merged PR, new features and fixes `here |
|
84 | can see all the closed issues and Merged PR, new features and fixes `here | |
76 | <https://github.com/ipython/ipython/issues?utf8=%E2%9C%93&q=+is%3Aclosed+milestone%3A7.1+>`_. |
|
85 | <https://github.com/ipython/ipython/issues?utf8=%E2%9C%93&q=+is%3Aclosed+milestone%3A7.1+>`_. | |
77 |
|
86 | |||
|
87 | Unicode Completion update | |||
|
88 | ------------------------- | |||
|
89 | ||||
|
90 | In IPython 7.1 the Unicode completion map has been updated and synchronized with | |||
|
91 | the Julia language. | |||
|
92 | ||||
|
93 | Added and removed character characters: | |||
|
94 | ||||
|
95 | ``\jmath`` (``ȷ``), ``\\underleftrightarrow`` (U+034D, combining) have been | |||
|
96 | added, while ``\\textasciicaron`` have been removed | |||
|
97 | ||||
|
98 | Some sequence have seen their prefix removed: | |||
|
99 | ||||
|
100 | - 6 characters ``\text...<tab>`` should now be inputed with ``\...<tab>`` directly, | |||
|
101 | - 45 characters ``\Elz...<tab>`` should now be inputed with ``\...<tab>`` directly, | |||
|
102 | - 65 characters ``\B...<tab>`` should now be inputed with ``\...<tab>`` directly, | |||
|
103 | - 450 characters ``\m...<tab>`` should now be inputed with ``\...<tab>`` directly, | |||
|
104 | ||||
|
105 | Some sequence have seen their prefix shortened: | |||
|
106 | ||||
|
107 | - 5 characters ``\mitBbb...<tab>`` should now be inputed with ``\bbi...<tab>`` directly, | |||
|
108 | - 52 characters ``\mit...<tab>`` should now be inputed with ``\i...<tab>`` directly, | |||
|
109 | - 216 characters ``\mbfit...<tab>`` should now be inputed with ``\bi...<tab>`` directly, | |||
|
110 | - 222 characters ``\mbf...<tab>`` should now be inputed with ``\b...<tab>`` directly, | |||
|
111 | ||||
|
112 | A couple of character had their sequence simplified: | |||
|
113 | ||||
|
114 | - ``ð``, type ``\dh<tab>``, instead of ``\eth<tab>`` | |||
|
115 | - ``ħ``, type ``\hbar<tab>``, instead of ``\Elzxh<tab>`` | |||
|
116 | - ``ɸ``, type ``\ltphi<tab>``, instead of ``\textphi<tab>`` | |||
|
117 | - ``ϴ``, type ``\varTheta<tab>``, instead of ``\textTheta<tab>`` | |||
|
118 | - ``ℇ``, type ``\eulermascheroni<tab>``, instead of ``\Eulerconst<tab>`` | |||
|
119 | - ``ℎ``, type ``\planck<tab>``, instead of ``\Planckconst<tab>`` | |||
|
120 | ||||
|
121 | - U+0336 (COMBINING LONG STROKE OVERLAY), type ``\strike<tab>``, instead of ``\Elzbar<tab>``. | |||
|
122 | ||||
|
123 | A couple of sequences have been updated: | |||
|
124 | ||||
|
125 | - ``\varepsilon`` now give ``ɛ`` (GREEK SMALL LETTER EPSILON) instead of ``ε`` (GREEK LUNATE EPSILON SYMBOL), | |||
|
126 | - ``\underbar`` now give U+0331 (COMBINING MACRON BELOW) instead of U+0332 (COMBINING LOW LINE). | |||
|
127 | ||||
|
128 | ||||
78 | .. _whatsnew700: |
|
129 | .. _whatsnew700: | |
79 |
|
130 | |||
80 | IPython 7.0.0 |
|
131 | IPython 7.0.0 | |
81 | ============= |
|
132 | ============= | |
82 |
|
133 | |||
83 | Released Thursday September 27th, 2018 |
|
134 | Released Thursday September 27th, 2018 | |
84 |
|
135 | |||
85 | IPython 7 include major features improvement as you can read in the following |
|
136 | IPython 7 include major features improvement as you can read in the following | |
86 | changelog. This is also the second major version of IPython to support only |
|
137 | changelog. This is also the second major version of IPython to support only | |
87 | Python 3 – starting at Python 3.4. Python 2 is still community supported |
|
138 | Python 3 – starting at Python 3.4. Python 2 is still community supported | |
88 | on the bugfix only 5.x branch, but we remind you that Python 2 "end of life" |
|
139 | on the bugfix only 5.x branch, but we remind you that Python 2 "end of life" | |
89 | is on Jan 1st 2020. |
|
140 | is on Jan 1st 2020. | |
90 |
|
141 | |||
91 | We were able to backport bug fixes to the 5.x branch thanks to our backport bot which |
|
142 | We were able to backport bug fixes to the 5.x branch thanks to our backport bot which | |
92 | backported more than `70 Pull-Requests |
|
143 | backported more than `70 Pull-Requests | |
93 | <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 manually work, and this is an area of the project were you can easily contribute by looking for `PRs still needed backport <https://github.com/ipython/ipython/issues?q=label%3A%22Still+Needs+Manual+Backport%22+is%3Aclosed+sort%3Aupdated-desc>`_ |
|
144 | <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 manually work, and this is an area of the project were you can easily contribute by looking for `PRs still needed backport <https://github.com/ipython/ipython/issues?q=label%3A%22Still+Needs+Manual+Backport%22+is%3Aclosed+sort%3Aupdated-desc>`_ | |
94 |
|
145 | |||
95 | IPython 6.x branch will likely not see any further release unless critical |
|
146 | IPython 6.x branch will likely not see any further release unless critical | |
96 | bugs are found. |
|
147 | bugs are found. | |
97 |
|
148 | |||
98 | Make sure you have pip > 9.0 before upgrading. You should be able to update by simply running |
|
149 | Make sure you have pip > 9.0 before upgrading. You should be able to update by simply running | |
99 |
|
150 | |||
100 | .. code:: |
|
151 | .. code:: | |
101 |
|
152 | |||
102 | pip install ipython --upgrade |
|
153 | pip install ipython --upgrade | |
103 |
|
154 | |||
104 | .. only:: ipydev |
|
155 | .. only:: ipydev | |
105 |
|
156 | |||
106 | If you are trying to install or update an ``alpha``, ``beta``, or ``rc`` |
|
157 | If you are trying to install or update an ``alpha``, ``beta``, or ``rc`` | |
107 | version, use pip ``--pre`` flag. |
|
158 | version, use pip ``--pre`` flag. | |
108 |
|
159 | |||
109 | .. code:: |
|
160 | .. code:: | |
110 |
|
161 | |||
111 | pip install ipython --upgrade --pre |
|
162 | pip install ipython --upgrade --pre | |
112 |
|
163 | |||
113 |
|
164 | |||
114 | Or if you have conda installed: |
|
165 | Or if you have conda installed: | |
115 |
|
166 | |||
116 | .. code:: |
|
167 | .. code:: | |
117 |
|
168 | |||
118 | conda install ipython |
|
169 | conda install ipython | |
119 |
|
170 | |||
120 |
|
171 | |||
121 |
|
172 | |||
122 | Prompt Toolkit 2.0 |
|
173 | Prompt Toolkit 2.0 | |
123 | ------------------ |
|
174 | ------------------ | |
124 |
|
175 | |||
125 | IPython 7.0+ now uses ``prompt_toolkit 2.0``, if you still need to use earlier |
|
176 | IPython 7.0+ now uses ``prompt_toolkit 2.0``, if you still need to use earlier | |
126 | ``prompt_toolkit`` version you may need to pin IPython to ``<7.0``. |
|
177 | ``prompt_toolkit`` version you may need to pin IPython to ``<7.0``. | |
127 |
|
178 | |||
128 | Autowait: Asynchronous REPL |
|
179 | Autowait: Asynchronous REPL | |
129 | --------------------------- |
|
180 | --------------------------- | |
130 |
|
181 | |||
131 | Staring with IPython 7.0 and on Python 3.6+, IPython can automatically await |
|
182 | Staring with IPython 7.0 and on Python 3.6+, IPython can automatically await | |
132 | code at top level, you should not need to access an event loop or runner |
|
183 | code at top level, you should not need to access an event loop or runner | |
133 | yourself. To know more read the :ref:`autoawait` section of our docs, see |
|
184 | yourself. To know more read the :ref:`autoawait` section of our docs, see | |
134 | :ghpull:`11265` or try the following code:: |
|
185 | :ghpull:`11265` or try the following code:: | |
135 |
|
186 | |||
136 | Python 3.6.0 |
|
187 | Python 3.6.0 | |
137 | Type 'copyright', 'credits' or 'license' for more information |
|
188 | Type 'copyright', 'credits' or 'license' for more information | |
138 | IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help. |
|
189 | IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help. | |
139 |
|
190 | |||
140 | In [1]: import aiohttp |
|
191 | In [1]: import aiohttp | |
141 | ...: result = aiohttp.get('https://api.github.com') |
|
192 | ...: result = aiohttp.get('https://api.github.com') | |
142 |
|
193 | |||
143 | In [2]: response = await result |
|
194 | In [2]: response = await result | |
144 | <pause for a few 100s ms> |
|
195 | <pause for a few 100s ms> | |
145 |
|
196 | |||
146 | In [3]: await response.json() |
|
197 | In [3]: await response.json() | |
147 | Out[3]: |
|
198 | Out[3]: | |
148 | {'authorizations_url': 'https://api.github.com/authorizations', |
|
199 | {'authorizations_url': 'https://api.github.com/authorizations', | |
149 | 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}', |
|
200 | 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}', | |
150 | ... |
|
201 | ... | |
151 | } |
|
202 | } | |
152 |
|
203 | |||
153 | .. note:: |
|
204 | .. note:: | |
154 |
|
205 | |||
155 | Async integration is experimental code, behavior may change or be removed |
|
206 | Async integration is experimental code, behavior may change or be removed | |
156 | between Python and IPython versions without warnings. |
|
207 | between Python and IPython versions without warnings. | |
157 |
|
208 | |||
158 | Integration is by default with `asyncio`, but other libraries can be configured, |
|
209 | Integration is by default with `asyncio`, but other libraries can be configured, | |
159 | like ``curio`` or ``trio``, to improve concurrency in the REPL:: |
|
210 | like ``curio`` or ``trio``, to improve concurrency in the REPL:: | |
160 |
|
211 | |||
161 | In [1]: %autoawait trio |
|
212 | In [1]: %autoawait trio | |
162 |
|
213 | |||
163 | In [2]: import trio |
|
214 | In [2]: import trio | |
164 |
|
215 | |||
165 | In [3]: async def child(i): |
|
216 | In [3]: async def child(i): | |
166 | ...: print(" child %s goes to sleep"%i) |
|
217 | ...: print(" child %s goes to sleep"%i) | |
167 | ...: await trio.sleep(2) |
|
218 | ...: await trio.sleep(2) | |
168 | ...: print(" child %s wakes up"%i) |
|
219 | ...: print(" child %s wakes up"%i) | |
169 |
|
220 | |||
170 | In [4]: print('parent start') |
|
221 | In [4]: print('parent start') | |
171 | ...: async with trio.open_nursery() as n: |
|
222 | ...: async with trio.open_nursery() as n: | |
172 | ...: for i in range(3): |
|
223 | ...: for i in range(3): | |
173 | ...: n.spawn(child, i) |
|
224 | ...: n.spawn(child, i) | |
174 | ...: print('parent end') |
|
225 | ...: print('parent end') | |
175 | parent start |
|
226 | parent start | |
176 | child 2 goes to sleep |
|
227 | child 2 goes to sleep | |
177 | child 0 goes to sleep |
|
228 | child 0 goes to sleep | |
178 | child 1 goes to sleep |
|
229 | child 1 goes to sleep | |
179 | <about 2 seconds pause> |
|
230 | <about 2 seconds pause> | |
180 | child 2 wakes up |
|
231 | child 2 wakes up | |
181 | child 1 wakes up |
|
232 | child 1 wakes up | |
182 | child 0 wakes up |
|
233 | child 0 wakes up | |
183 | parent end |
|
234 | parent end | |
184 |
|
235 | |||
185 | See :ref:`autoawait` for more information. |
|
236 | See :ref:`autoawait` for more information. | |
186 |
|
237 | |||
187 |
|
238 | |||
188 | Asynchronous code in a Notebook interface or any other frontend using the |
|
239 | Asynchronous code in a Notebook interface or any other frontend using the | |
189 | Jupyter Protocol will need further updates of the IPykernel package. |
|
240 | Jupyter Protocol will need further updates of the IPykernel package. | |
190 |
|
241 | |||
191 | Non-Asynchronous code |
|
242 | Non-Asynchronous code | |
192 | ~~~~~~~~~~~~~~~~~~~~~ |
|
243 | ~~~~~~~~~~~~~~~~~~~~~ | |
193 |
|
244 | |||
194 | As the internal API of IPython is now asynchronous, IPython needs to run under |
|
245 | As the internal API of IPython is now asynchronous, IPython needs to run under | |
195 | an event loop. In order to allow many workflows, (like using the :magic:`%run` |
|
246 | an event loop. In order to allow many workflows, (like using the :magic:`%run` | |
196 | magic, or copy_pasting code that explicitly starts/stop event loop), when |
|
247 | magic, or copy_pasting code that explicitly starts/stop event loop), when | |
197 | top-level code is detected as not being asynchronous, IPython code is advanced |
|
248 | top-level code is detected as not being asynchronous, IPython code is advanced | |
198 | via a pseudo-synchronous runner, and may not advance pending tasks. |
|
249 | via a pseudo-synchronous runner, and may not advance pending tasks. | |
199 |
|
250 | |||
200 | Change to Nested Embed |
|
251 | Change to Nested Embed | |
201 | ~~~~~~~~~~~~~~~~~~~~~~ |
|
252 | ~~~~~~~~~~~~~~~~~~~~~~ | |
202 |
|
253 | |||
203 | The introduction of the ability to run async code had some effect on the |
|
254 | The introduction of the ability to run async code had some effect on the | |
204 | ``IPython.embed()`` API. By default embed will not allow you to run asynchronous |
|
255 | ``IPython.embed()`` API. By default embed will not allow you to run asynchronous | |
205 | code unless a event loop is specified. |
|
256 | code unless a event loop is specified. | |
206 |
|
257 | |||
207 | Effects on Magics |
|
258 | Effects on Magics | |
208 | ~~~~~~~~~~~~~~~~~ |
|
259 | ~~~~~~~~~~~~~~~~~ | |
209 |
|
260 | |||
210 | Some magics will not work with Async, and will need updates. Contribution |
|
261 | Some magics will not work with Async, and will need updates. Contribution | |
211 | welcome. |
|
262 | welcome. | |
212 |
|
263 | |||
213 | Expected Future changes |
|
264 | Expected Future changes | |
214 | ~~~~~~~~~~~~~~~~~~~~~~~ |
|
265 | ~~~~~~~~~~~~~~~~~~~~~~~ | |
215 |
|
266 | |||
216 | We expect more internal but public IPython function to become ``async``, and |
|
267 | We expect more internal but public IPython function to become ``async``, and | |
217 | will likely end up having a persisting event loop while IPython is running. |
|
268 | will likely end up having a persisting event loop while IPython is running. | |
218 |
|
269 | |||
219 | Thanks |
|
270 | Thanks | |
220 | ~~~~~~ |
|
271 | ~~~~~~ | |
221 |
|
272 | |||
222 | This took more than a year in the making, and the code was rebased a number of |
|
273 | This took more than a year in the making, and the code was rebased a number of | |
223 | time leading to commit authorship that may have been lost in the final |
|
274 | time leading to commit authorship that may have been lost in the final | |
224 | Pull-Request. Huge thanks to many people for contribution, discussion, code, |
|
275 | Pull-Request. Huge thanks to many people for contribution, discussion, code, | |
225 | documentation, use-case: dalejung, danielballan, ellisonbg, fperez, gnestor, |
|
276 | documentation, use-case: dalejung, danielballan, ellisonbg, fperez, gnestor, | |
226 | minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many others. |
|
277 | minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many others. | |
227 |
|
278 | |||
228 |
|
279 | |||
229 | Autoreload Improvement |
|
280 | Autoreload Improvement | |
230 | ---------------------- |
|
281 | ---------------------- | |
231 |
|
282 | |||
232 | The magic :magic:`%autoreload 2 <autoreload>` now captures new methods added to |
|
283 | The magic :magic:`%autoreload 2 <autoreload>` now captures new methods added to | |
233 | classes. Earlier, only methods existing as of the initial import were being |
|
284 | classes. Earlier, only methods existing as of the initial import were being | |
234 | tracked and updated. |
|
285 | tracked and updated. | |
235 |
|
286 | |||
236 | This new feature helps dual environment development - Jupyter+IDE - where the |
|
287 | This new feature helps dual environment development - Jupyter+IDE - where the | |
237 | code gradually moves from notebook cells to package files, as it gets |
|
288 | code gradually moves from notebook cells to package files, as it gets | |
238 | structured. |
|
289 | structured. | |
239 |
|
290 | |||
240 | **Example**: An instance of the class ``MyClass`` will be able to access the |
|
291 | **Example**: An instance of the class ``MyClass`` will be able to access the | |
241 | method ``cube()`` after it is uncommented and the file ``file1.py`` saved on |
|
292 | method ``cube()`` after it is uncommented and the file ``file1.py`` saved on | |
242 | disk. |
|
293 | disk. | |
243 |
|
294 | |||
244 |
|
295 | |||
245 | .. code:: |
|
296 | .. code:: | |
246 |
|
297 | |||
247 | # notebook |
|
298 | # notebook | |
248 |
|
299 | |||
249 | from mymodule import MyClass |
|
300 | from mymodule import MyClass | |
250 | first = MyClass(5) |
|
301 | first = MyClass(5) | |
251 |
|
302 | |||
252 | .. code:: |
|
303 | .. code:: | |
253 |
|
304 | |||
254 | # mymodule/file1.py |
|
305 | # mymodule/file1.py | |
255 |
|
306 | |||
256 | class MyClass: |
|
307 | class MyClass: | |
257 |
|
308 | |||
258 | def __init__(self, a=10): |
|
309 | def __init__(self, a=10): | |
259 | self.a = a |
|
310 | self.a = a | |
260 |
|
311 | |||
261 | def square(self): |
|
312 | def square(self): | |
262 | print('compute square') |
|
313 | print('compute square') | |
263 | return self.a*self.a |
|
314 | return self.a*self.a | |
264 |
|
315 | |||
265 | # def cube(self): |
|
316 | # def cube(self): | |
266 | # print('compute cube') |
|
317 | # print('compute cube') | |
267 | # return self.a*self.a*self.a |
|
318 | # return self.a*self.a*self.a | |
268 |
|
319 | |||
269 |
|
320 | |||
270 |
|
321 | |||
271 |
|
322 | |||
272 | Misc |
|
323 | Misc | |
273 | ---- |
|
324 | ---- | |
274 |
|
325 | |||
275 | The autoindent feature that was deprecated in 5.x was re-enabled and |
|
326 | The autoindent feature that was deprecated in 5.x was re-enabled and | |
276 | un-deprecated in :ghpull:`11257` |
|
327 | un-deprecated in :ghpull:`11257` | |
277 |
|
328 | |||
278 | Make :magic:`%run -n -i ... <run>` work correctly. Earlier, if :magic:`%run` was |
|
329 | Make :magic:`%run -n -i ... <run>` work correctly. Earlier, if :magic:`%run` was | |
279 | passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308` |
|
330 | passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308` | |
280 |
|
331 | |||
281 |
|
332 | |||
282 | The :cellmagic:`%%script` (as well as :cellmagic:`%%bash`, |
|
333 | The :cellmagic:`%%script` (as well as :cellmagic:`%%bash`, | |
283 | :cellmagic:`%%ruby`... ) cell magics now raise by default if the return code of |
|
334 | :cellmagic:`%%ruby`... ) cell magics now raise by default if the return code of | |
284 | the given code is non-zero (thus halting execution of further cells in a |
|
335 | the given code is non-zero (thus halting execution of further cells in a | |
285 | notebook). The behavior can be disable by passing the ``--no-raise-error`` flag. |
|
336 | notebook). The behavior can be disable by passing the ``--no-raise-error`` flag. | |
286 |
|
337 | |||
287 |
|
338 | |||
288 | Deprecations |
|
339 | Deprecations | |
289 | ------------ |
|
340 | ------------ | |
290 |
|
341 | |||
291 | A couple of unused function and methods have been deprecated and will be removed |
|
342 | A couple of unused function and methods have been deprecated and will be removed | |
292 | in future versions: |
|
343 | in future versions: | |
293 |
|
344 | |||
294 | - ``IPython.utils.io.raw_print_err`` |
|
345 | - ``IPython.utils.io.raw_print_err`` | |
295 | - ``IPython.utils.io.raw_print`` |
|
346 | - ``IPython.utils.io.raw_print`` | |
296 |
|
347 | |||
297 |
|
348 | |||
298 | Backwards incompatible changes |
|
349 | Backwards incompatible changes | |
299 | ------------------------------ |
|
350 | ------------------------------ | |
300 |
|
351 | |||
301 | * The API for transforming input before it is parsed as Python code has been |
|
352 | * The API for transforming input before it is parsed as Python code has been | |
302 | completely redesigned, and any custom input transformations will need to be |
|
353 | completely redesigned, and any custom input transformations will need to be | |
303 | rewritten. See :doc:`/config/inputtransforms` for details of the new API. |
|
354 | rewritten. See :doc:`/config/inputtransforms` for details of the new API. |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now