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