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