Show More
@@ -1,1163 +1,1193 | |||||
1 | ============ |
|
1 | ============ | |
2 | 7.x Series |
|
2 | 7.x Series | |
3 | ============ |
|
3 | ============ | |
4 |
|
4 | |||
|
5 | .. _version 719: | |||
|
6 | ||||
|
7 | IPython 7.19 | |||
|
8 | ============ | |||
|
9 | ||||
|
10 | IPython 7.19 accumulative two month of works, bug fixes and improvements, there | |||
|
11 | was exceptionally no release last month. | |||
|
12 | ||||
|
13 | - Fix to restore the ability to specify more than one extension using command | |||
|
14 | line flags when using traitlets 5.0 :ghpull:`12543` | |||
|
15 | - Docs docs formatting that make the install commands work on zsh | |||
|
16 | :ghpull:`12587` | |||
|
17 | - Always display the last frame in tracebacks even if hidden with | |||
|
18 | ``__traceback_hide__`` :ghpull:`12601` | |||
|
19 | - Avoid an issue where a callback can be registered multiple times. | |||
|
20 | :ghpull:`12625` | |||
|
21 | - Avoid an issue in debugger mode where frames changes could be lost. | |||
|
22 | :ghpull:`12627` | |||
|
23 | ||||
|
24 | - Never hide the frames that invoke a debugger, even if marked as hidden by | |||
|
25 | ``__traceback_hide__`` :ghpull:`12631` | |||
|
26 | - Fix calling the debugger in a recursive manner :ghpull:`12659` | |||
|
27 | ||||
|
28 | ||||
|
29 | A number of code changes have landed on master and we are getting close to | |||
|
30 | enough new features and codebase improvement that a 8.0 start to make sens. | |||
|
31 | For downstream packages, please start working on migrating downstream testing | |||
|
32 | away from iptest and using pytest, as nose will not work on Python 3.10 and we | |||
|
33 | will likely start removing it as a dependency for testing. | |||
|
34 | ||||
5 | .. _version 718: |
|
35 | .. _version 718: | |
6 |
|
36 | |||
7 | IPython 7.18 |
|
37 | IPython 7.18 | |
8 | ============ |
|
38 | ============ | |
9 |
|
39 | |||
10 | IPython 7.18 is a minor release that mostly contains bugfixes. |
|
40 | IPython 7.18 is a minor release that mostly contains bugfixes. | |
11 |
|
41 | |||
12 | - ``CRLF`` is now handled by magics my default; solving some issues due to copy |
|
42 | - ``CRLF`` is now handled by magics my default; solving some issues due to copy | |
13 | pasting on windows. :ghpull:`12475` |
|
43 | pasting on windows. :ghpull:`12475` | |
14 |
|
44 | |||
15 | - Requiring pexpect ``>=4.3`` as we are Python 3.7+ only and earlier version of |
|
45 | - Requiring pexpect ``>=4.3`` as we are Python 3.7+ only and earlier version of | |
16 | pexpect will be incompatible. :ghpull:`12510` |
|
46 | pexpect will be incompatible. :ghpull:`12510` | |
17 |
|
47 | |||
18 | - Minimum jedi version is now 0.16. :ghpull:`12488` |
|
48 | - Minimum jedi version is now 0.16. :ghpull:`12488` | |
19 |
|
49 | |||
20 |
|
50 | |||
21 |
|
51 | |||
22 | .. _version 717: |
|
52 | .. _version 717: | |
23 |
|
53 | |||
24 | IPython 7.17 |
|
54 | IPython 7.17 | |
25 | ============ |
|
55 | ============ | |
26 |
|
56 | |||
27 | IPython 7.17 brings a couple of new improvements to API and a couple of user |
|
57 | IPython 7.17 brings a couple of new improvements to API and a couple of user | |
28 | facing changes to make the terminal experience more user friendly. |
|
58 | facing changes to make the terminal experience more user friendly. | |
29 |
|
59 | |||
30 | :ghpull:`12407` introduces the ability to pass extra argument to the IPython |
|
60 | :ghpull:`12407` introduces the ability to pass extra argument to the IPython | |
31 | debugger class; this is to help a new project from ``kmaork`` |
|
61 | debugger class; this is to help a new project from ``kmaork`` | |
32 | (https://github.com/kmaork/madbg) to feature a fully remote debugger. |
|
62 | (https://github.com/kmaork/madbg) to feature a fully remote debugger. | |
33 |
|
63 | |||
34 | :ghpull:`12410` finally remove support for 3.6, while the codebase is still |
|
64 | :ghpull:`12410` finally remove support for 3.6, while the codebase is still | |
35 | technically compatible; IPython will not install on Python 3.6. |
|
65 | technically compatible; IPython will not install on Python 3.6. | |
36 |
|
66 | |||
37 | lots of work on the debugger and hidden frames from ``@impact27`` in |
|
67 | lots of work on the debugger and hidden frames from ``@impact27`` in | |
38 | :ghpull:`12437`, :ghpull:`12445`, :ghpull:`12460` and in particular |
|
68 | :ghpull:`12437`, :ghpull:`12445`, :ghpull:`12460` and in particular | |
39 | :ghpull:`12453` which make the debug magic more robust at handling spaces. |
|
69 | :ghpull:`12453` which make the debug magic more robust at handling spaces. | |
40 |
|
70 | |||
41 | Biggest API addition is code transformation which is done before code execution; |
|
71 | Biggest API addition is code transformation which is done before code execution; | |
42 | IPython allows a number of hooks to catch non-valid Python syntax (magic, prompt |
|
72 | IPython allows a number of hooks to catch non-valid Python syntax (magic, prompt | |
43 | stripping...etc). Transformers are usually called many time; typically: |
|
73 | stripping...etc). Transformers are usually called many time; typically: | |
44 |
|
74 | |||
45 | - When trying to figure out whether the code is complete and valid (should we |
|
75 | - When trying to figure out whether the code is complete and valid (should we | |
46 | insert a new line or execute ?) |
|
76 | insert a new line or execute ?) | |
47 | - During actual code execution pass before giving the code to Python's |
|
77 | - During actual code execution pass before giving the code to Python's | |
48 | ``exec``. |
|
78 | ``exec``. | |
49 |
|
79 | |||
50 | This lead to issues when transformer might have had side effects; or do external |
|
80 | This lead to issues when transformer might have had side effects; or do external | |
51 | queries. Starting with IPython 7.17 you can expect your transformer to be called |
|
81 | queries. Starting with IPython 7.17 you can expect your transformer to be called | |
52 | less time. |
|
82 | less time. | |
53 |
|
83 | |||
54 | Input transformers are now called only once in the execution path of |
|
84 | Input transformers are now called only once in the execution path of | |
55 | `InteractiveShell`, allowing to register transformer that potentially have side |
|
85 | `InteractiveShell`, allowing to register transformer that potentially have side | |
56 | effects (note that this is not recommended). Internal methods `should_run_async`, and |
|
86 | effects (note that this is not recommended). Internal methods `should_run_async`, and | |
57 | `run_cell_async` now take a recommended optional `transformed_cell`, and |
|
87 | `run_cell_async` now take a recommended optional `transformed_cell`, and | |
58 | `preprocessing_exc_tuple` parameters that will become mandatory at some point in |
|
88 | `preprocessing_exc_tuple` parameters that will become mandatory at some point in | |
59 | the future; that is to say cells need to be explicitly transformed to be valid |
|
89 | the future; that is to say cells need to be explicitly transformed to be valid | |
60 | Python syntax ahead of trying to run them. :ghpull:`12440`; |
|
90 | Python syntax ahead of trying to run them. :ghpull:`12440`; | |
61 |
|
91 | |||
62 | ``input_transformers`` can now also have an attribute ``has_side_effects`` set |
|
92 | ``input_transformers`` can now also have an attribute ``has_side_effects`` set | |
63 | to `True`, when this attribute is present; this will prevent the transformers |
|
93 | to `True`, when this attribute is present; this will prevent the transformers | |
64 | from being ran when IPython is trying to guess whether the user input is |
|
94 | from being ran when IPython is trying to guess whether the user input is | |
65 | complete. Note that this may means you will need to explicitly execute in some |
|
95 | complete. Note that this may means you will need to explicitly execute in some | |
66 | case where your transformations are now not ran; but will not affect users with |
|
96 | case where your transformations are now not ran; but will not affect users with | |
67 | no custom extensions. |
|
97 | no custom extensions. | |
68 |
|
98 | |||
69 |
|
99 | |||
70 | API Changes |
|
100 | API Changes | |
71 | ----------- |
|
101 | ----------- | |
72 |
|
102 | |||
73 | Change of API and exposed objects automatically detected using `frappuccino |
|
103 | Change of API and exposed objects automatically detected using `frappuccino | |
74 | <https://pypi.org/project/frappuccino/>`_ |
|
104 | <https://pypi.org/project/frappuccino/>`_ | |
75 |
|
105 | |||
76 |
|
106 | |||
77 | The following items are new since 7.16.0:: |
|
107 | The following items are new since 7.16.0:: | |
78 |
|
108 | |||
79 | + IPython.core.interactiveshell.InteractiveShell.get_local_scope(self, stack_depth) |
|
109 | + IPython.core.interactiveshell.InteractiveShell.get_local_scope(self, stack_depth) | |
80 |
|
110 | |||
81 | The following signatures differ since 7.16.0:: |
|
111 | The following signatures differ since 7.16.0:: | |
82 |
|
112 | |||
83 | - IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True) |
|
113 | - IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True) | |
84 | + IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True, *, transformed_cell=None, preprocessing_exc_tuple=None) |
|
114 | + IPython.core.interactiveshell.InteractiveShell.run_cell_async(self, raw_cell, store_history=False, silent=False, shell_futures=True, *, transformed_cell=None, preprocessing_exc_tuple=None) | |
85 |
|
115 | |||
86 | - IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell) |
|
116 | - IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell) | |
87 | + IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell, *, transformed_cell=None, preprocessing_exc_tuple=None) |
|
117 | + IPython.core.interactiveshell.InteractiveShell.should_run_async(self, raw_cell, *, transformed_cell=None, preprocessing_exc_tuple=None) | |
88 |
|
118 | |||
89 | - IPython.terminal.debugger.TerminalPdb.pt_init(self) |
|
119 | - IPython.terminal.debugger.TerminalPdb.pt_init(self) | |
90 | + IPython.terminal.debugger.TerminalPdb.pt_init(self, pt_session_options=None) |
|
120 | + IPython.terminal.debugger.TerminalPdb.pt_init(self, pt_session_options=None) | |
91 |
|
121 | |||
92 | This method was added:: |
|
122 | This method was added:: | |
93 |
|
123 | |||
94 | + IPython.core.interactiveshell.InteractiveShell.get_local_scope |
|
124 | + IPython.core.interactiveshell.InteractiveShell.get_local_scope | |
95 |
|
125 | |||
96 | Which is now also present on subclasses:: |
|
126 | Which is now also present on subclasses:: | |
97 |
|
127 | |||
98 | + IPython.terminal.embed.InteractiveShellEmbed.get_local_scope |
|
128 | + IPython.terminal.embed.InteractiveShellEmbed.get_local_scope | |
99 | + IPython.terminal.interactiveshell.TerminalInteractiveShell.get_local_scope |
|
129 | + IPython.terminal.interactiveshell.TerminalInteractiveShell.get_local_scope | |
100 |
|
130 | |||
101 |
|
131 | |||
102 | .. _version 716: |
|
132 | .. _version 716: | |
103 |
|
133 | |||
104 | IPython 7.16 |
|
134 | IPython 7.16 | |
105 | ============ |
|
135 | ============ | |
106 |
|
136 | |||
107 |
|
137 | |||
108 | The default traceback mode will now skip frames that are marked with |
|
138 | The default traceback mode will now skip frames that are marked with | |
109 | ``__tracebackhide__ = True`` and show how many traceback frames have been |
|
139 | ``__tracebackhide__ = True`` and show how many traceback frames have been | |
110 | skipped. This can be toggled by using :magic:`xmode` with the ``--show`` or |
|
140 | skipped. This can be toggled by using :magic:`xmode` with the ``--show`` or | |
111 | ``--hide`` attribute. It will have no effect on non verbose traceback modes. |
|
141 | ``--hide`` attribute. It will have no effect on non verbose traceback modes. | |
112 |
|
142 | |||
113 | The ipython debugger also now understands ``__tracebackhide__`` as well and will |
|
143 | The ipython debugger also now understands ``__tracebackhide__`` as well and will | |
114 | skip hidden frames when displaying. Movement up and down the stack will skip the |
|
144 | skip hidden frames when displaying. Movement up and down the stack will skip the | |
115 | hidden frames and will show how many frames were hidden. Internal IPython frames |
|
145 | hidden frames and will show how many frames were hidden. Internal IPython frames | |
116 | are also now hidden by default. The behavior can be changed with the |
|
146 | are also now hidden by default. The behavior can be changed with the | |
117 | ``skip_hidden`` while in the debugger, command and accepts "yes", "no", "true" |
|
147 | ``skip_hidden`` while in the debugger, command and accepts "yes", "no", "true" | |
118 | and "false" case insensitive parameters. |
|
148 | and "false" case insensitive parameters. | |
119 |
|
149 | |||
120 |
|
150 | |||
121 | Misc Noticeable changes: |
|
151 | Misc Noticeable changes: | |
122 | ------------------------ |
|
152 | ------------------------ | |
123 |
|
153 | |||
124 | - Exceptions are now (re)raised when running notebooks via the :magic:`%run`, helping to catch issues in workflows and |
|
154 | - Exceptions are now (re)raised when running notebooks via the :magic:`%run`, helping to catch issues in workflows and | |
125 | pipelines. :ghpull:`12301` |
|
155 | pipelines. :ghpull:`12301` | |
126 | - Fix inputhook for qt 5.15.0 :ghpull:`12355` |
|
156 | - Fix inputhook for qt 5.15.0 :ghpull:`12355` | |
127 | - Fix wx inputhook :ghpull:`12375` |
|
157 | - Fix wx inputhook :ghpull:`12375` | |
128 | - Add handling for malformed pathext env var (Windows) :ghpull:`12367` |
|
158 | - Add handling for malformed pathext env var (Windows) :ghpull:`12367` | |
129 | - use $SHELL in system_piped :ghpull:`12360` for uniform behavior with |
|
159 | - use $SHELL in system_piped :ghpull:`12360` for uniform behavior with | |
130 | ipykernel. |
|
160 | ipykernel. | |
131 |
|
161 | |||
132 | Reproducible Build |
|
162 | Reproducible Build | |
133 | ------------------ |
|
163 | ------------------ | |
134 |
|
164 | |||
135 | IPython 7.15 reproducible build did not work, so we try again this month |
|
165 | IPython 7.15 reproducible build did not work, so we try again this month | |
136 | :ghpull:`12358`. |
|
166 | :ghpull:`12358`. | |
137 |
|
167 | |||
138 |
|
168 | |||
139 | API Changes |
|
169 | API Changes | |
140 | ----------- |
|
170 | ----------- | |
141 |
|
171 | |||
142 | Change of API and exposed objects automatically detected using `frappuccino |
|
172 | Change of API and exposed objects automatically detected using `frappuccino | |
143 | <https://pypi.org/project/frappuccino/>`_ (still in beta): |
|
173 | <https://pypi.org/project/frappuccino/>`_ (still in beta): | |
144 |
|
174 | |||
145 |
|
175 | |||
146 | The following items are new and mostly related to understanding ``__tracebackbhide__``:: |
|
176 | The following items are new and mostly related to understanding ``__tracebackbhide__``:: | |
147 |
|
177 | |||
148 | + IPython.core.debugger.Pdb.do_down(self, arg) |
|
178 | + IPython.core.debugger.Pdb.do_down(self, arg) | |
149 | + IPython.core.debugger.Pdb.do_skip_hidden(self, arg) |
|
179 | + IPython.core.debugger.Pdb.do_skip_hidden(self, arg) | |
150 | + IPython.core.debugger.Pdb.do_up(self, arg) |
|
180 | + IPython.core.debugger.Pdb.do_up(self, arg) | |
151 | + IPython.core.debugger.Pdb.hidden_frames(self, stack) |
|
181 | + IPython.core.debugger.Pdb.hidden_frames(self, stack) | |
152 | + IPython.core.debugger.Pdb.stop_here(self, frame) |
|
182 | + IPython.core.debugger.Pdb.stop_here(self, frame) | |
153 |
|
183 | |||
154 |
|
184 | |||
155 | The following items have been removed:: |
|
185 | The following items have been removed:: | |
156 |
|
186 | |||
157 | - IPython.core.debugger.Pdb.new_do_down |
|
187 | - IPython.core.debugger.Pdb.new_do_down | |
158 | - IPython.core.debugger.Pdb.new_do_up |
|
188 | - IPython.core.debugger.Pdb.new_do_up | |
159 |
|
189 | |||
160 | Those were implementation details. |
|
190 | Those were implementation details. | |
161 |
|
191 | |||
162 |
|
192 | |||
163 | .. _version 715: |
|
193 | .. _version 715: | |
164 |
|
194 | |||
165 | IPython 7.15 |
|
195 | IPython 7.15 | |
166 | ============ |
|
196 | ============ | |
167 |
|
197 | |||
168 | IPython 7.15 brings a number of bug fixes and user facing improvements. |
|
198 | IPython 7.15 brings a number of bug fixes and user facing improvements. | |
169 |
|
199 | |||
170 | Misc Noticeable changes: |
|
200 | Misc Noticeable changes: | |
171 | ------------------------ |
|
201 | ------------------------ | |
172 |
|
202 | |||
173 | - Long completion name have better elision in terminal :ghpull:`12284` |
|
203 | - Long completion name have better elision in terminal :ghpull:`12284` | |
174 | - I've started to test on Python 3.9 :ghpull:`12307` and fix some errors. |
|
204 | - I've started to test on Python 3.9 :ghpull:`12307` and fix some errors. | |
175 | - Hi DPI scaling of figures when using qt eventloop :ghpull:`12314` |
|
205 | - Hi DPI scaling of figures when using qt eventloop :ghpull:`12314` | |
176 | - Document the ability to have systemwide configuration for IPython. |
|
206 | - Document the ability to have systemwide configuration for IPython. | |
177 | :ghpull:`12328` |
|
207 | :ghpull:`12328` | |
178 | - Fix issues with input autoformatting :ghpull:`12336` |
|
208 | - Fix issues with input autoformatting :ghpull:`12336` | |
179 | - ``IPython.core.debugger.Pdb`` is now interruptible (:ghpull:`12168`, in 7.14 |
|
209 | - ``IPython.core.debugger.Pdb`` is now interruptible (:ghpull:`12168`, in 7.14 | |
180 | but forgotten in release notes) |
|
210 | but forgotten in release notes) | |
181 | - Video HTML attributes (:ghpull:`12212`, in 7.14 but forgotten in release |
|
211 | - Video HTML attributes (:ghpull:`12212`, in 7.14 but forgotten in release | |
182 | notes) |
|
212 | notes) | |
183 |
|
213 | |||
184 | Reproducible Build |
|
214 | Reproducible Build | |
185 | ------------------ |
|
215 | ------------------ | |
186 |
|
216 | |||
187 | Starting with IPython 7.15, I am attempting to provide reproducible builds, |
|
217 | Starting with IPython 7.15, I am attempting to provide reproducible builds, | |
188 | that is to say you should be able from the source tree to generate an sdist |
|
218 | that is to say you should be able from the source tree to generate an sdist | |
189 | and wheel that are identical byte for byte with the publish version on PyPI. |
|
219 | and wheel that are identical byte for byte with the publish version on PyPI. | |
190 |
|
220 | |||
191 | I've only tested on a couple of machines so far and the process is relatively |
|
221 | I've only tested on a couple of machines so far and the process is relatively | |
192 | straightforward, so this mean that IPython not only have a deterministic build |
|
222 | straightforward, so this mean that IPython not only have a deterministic build | |
193 | process, but also I have either removed, or put under control all effects of |
|
223 | process, but also I have either removed, or put under control all effects of | |
194 | the build environments on the final artifact. I encourage you to attempt the |
|
224 | the build environments on the final artifact. I encourage you to attempt the | |
195 | build process on your machine as documented in :ref:`core_developer_guide` |
|
225 | build process on your machine as documented in :ref:`core_developer_guide` | |
196 | and let me know if you do not obtain an identical artifact. |
|
226 | and let me know if you do not obtain an identical artifact. | |
197 |
|
227 | |||
198 | While reproducible builds is critical to check that the supply chain of (open |
|
228 | While reproducible builds is critical to check that the supply chain of (open | |
199 | source) software has not been compromised, it can also help to speedup many |
|
229 | source) software has not been compromised, it can also help to speedup many | |
200 | of the build processes in large environment (conda, apt...) by allowing |
|
230 | of the build processes in large environment (conda, apt...) by allowing | |
201 | better caching of intermediate build steps. |
|
231 | better caching of intermediate build steps. | |
202 |
|
232 | |||
203 | Learn more on `<https://reproducible-builds.org/>`_. `Reflections on trusting |
|
233 | Learn more on `<https://reproducible-builds.org/>`_. `Reflections on trusting | |
204 | trust <https://dl.acm.org/doi/10.1145/358198.358210>`_ is also one of the |
|
234 | trust <https://dl.acm.org/doi/10.1145/358198.358210>`_ is also one of the | |
205 | cornerstone and recommended reads on this subject. |
|
235 | cornerstone and recommended reads on this subject. | |
206 |
|
236 | |||
207 | .. note:: |
|
237 | .. note:: | |
208 |
|
238 | |||
209 | The build commit from which the sdist is generated is also `signed |
|
239 | The build commit from which the sdist is generated is also `signed | |
210 | <https://en.wikipedia.org/wiki/Digital_signature>`_, so you should be able to |
|
240 | <https://en.wikipedia.org/wiki/Digital_signature>`_, so you should be able to | |
211 | check it has not been compromised, and the git repository is a `merkle-tree |
|
241 | check it has not been compromised, and the git repository is a `merkle-tree | |
212 | <https://en.wikipedia.org/wiki/Merkle_tree>`_, you can check the consistency |
|
242 | <https://en.wikipedia.org/wiki/Merkle_tree>`_, you can check the consistency | |
213 | with `git-fsck <https://git-scm.com/docs/git-fsck>`_ which you likely `want |
|
243 | with `git-fsck <https://git-scm.com/docs/git-fsck>`_ which you likely `want | |
214 | to enable by default |
|
244 | to enable by default | |
215 | <https://gist.github.com/mbbx6spp/14b86437e794bffb4120>`_. |
|
245 | <https://gist.github.com/mbbx6spp/14b86437e794bffb4120>`_. | |
216 |
|
246 | |||
217 | NEP29: Last version to support Python 3.6 |
|
247 | NEP29: Last version to support Python 3.6 | |
218 | ----------------------------------------- |
|
248 | ----------------------------------------- | |
219 |
|
249 | |||
220 | IPython 7.15 will be the Last IPython version to officially support Python |
|
250 | IPython 7.15 will be the Last IPython version to officially support Python | |
221 | 3.6, as stated by `NumPy Enhancement Proposal 29 |
|
251 | 3.6, as stated by `NumPy Enhancement Proposal 29 | |
222 | <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_. Starting with |
|
252 | <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_. Starting with | |
223 | next minor version of IPython I may stop testing on Python 3.6 and may stop |
|
253 | next minor version of IPython I may stop testing on Python 3.6 and may stop | |
224 | publishing release artifacts that install on Python 3.6 |
|
254 | publishing release artifacts that install on Python 3.6 | |
225 |
|
255 | |||
226 | Highlighted features |
|
256 | Highlighted features | |
227 | -------------------- |
|
257 | -------------------- | |
228 |
|
258 | |||
229 | Highlighted features are not new, but seem to not be widely known, this |
|
259 | Highlighted features are not new, but seem to not be widely known, this | |
230 | section will help you discover in more narrative form what you can do with |
|
260 | section will help you discover in more narrative form what you can do with | |
231 | IPython. |
|
261 | IPython. | |
232 |
|
262 | |||
233 | Increase Tab Completion Menu Height |
|
263 | Increase Tab Completion Menu Height | |
234 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
264 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
235 |
|
265 | |||
236 | In terminal IPython it is possible to increase the hight of the tab-completion |
|
266 | In terminal IPython it is possible to increase the hight of the tab-completion | |
237 | menu. To do so set the value of |
|
267 | menu. To do so set the value of | |
238 | :configtrait:`TerminalInteractiveShell.space_for_menu`, this will reserve more |
|
268 | :configtrait:`TerminalInteractiveShell.space_for_menu`, this will reserve more | |
239 | space at the bottom of the screen for various kind of menus in IPython including |
|
269 | space at the bottom of the screen for various kind of menus in IPython including | |
240 | tab completion and searching in history. |
|
270 | tab completion and searching in history. | |
241 |
|
271 | |||
242 | Autoformat Code in the terminal |
|
272 | Autoformat Code in the terminal | |
243 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
273 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
244 |
|
274 | |||
245 | If you have a preferred code formatter, you can configure IPython to |
|
275 | If you have a preferred code formatter, you can configure IPython to | |
246 | reformat your code. Set the value of |
|
276 | reformat your code. Set the value of | |
247 | :configtrait:`TerminalInteractiveShell.autoformatter` to for example ``'black'`` |
|
277 | :configtrait:`TerminalInteractiveShell.autoformatter` to for example ``'black'`` | |
248 | and IPython will auto format your code when possible. |
|
278 | and IPython will auto format your code when possible. | |
249 |
|
279 | |||
250 |
|
280 | |||
251 | .. _version 714: |
|
281 | .. _version 714: | |
252 |
|
282 | |||
253 | IPython 7.14 |
|
283 | IPython 7.14 | |
254 | ============ |
|
284 | ============ | |
255 |
|
285 | |||
256 | IPython 7.14 is a minor release that fix a couple of bugs and prepare |
|
286 | IPython 7.14 is a minor release that fix a couple of bugs and prepare | |
257 | compatibility with new or future versions of some libraries. |
|
287 | compatibility with new or future versions of some libraries. | |
258 |
|
288 | |||
259 | Important changes: |
|
289 | Important changes: | |
260 | ------------------ |
|
290 | ------------------ | |
261 |
|
291 | |||
262 | - Fix compatibility with Sphinx 3+ :ghpull:`12235` |
|
292 | - Fix compatibility with Sphinx 3+ :ghpull:`12235` | |
263 | - Remove deprecated matplotlib parameter usage, compatibility with matplotlib |
|
293 | - Remove deprecated matplotlib parameter usage, compatibility with matplotlib | |
264 | 3.3+ :`122250` |
|
294 | 3.3+ :`122250` | |
265 |
|
295 | |||
266 | Misc Changes |
|
296 | Misc Changes | |
267 | ------------ |
|
297 | ------------ | |
268 |
|
298 | |||
269 | - set ``.py`` extension when editing current buffer in vi/emacs. :ghpull:`12167` |
|
299 | - set ``.py`` extension when editing current buffer in vi/emacs. :ghpull:`12167` | |
270 | - support for unicode identifiers in ``?``/``??`` :ghpull:`12208` |
|
300 | - support for unicode identifiers in ``?``/``??`` :ghpull:`12208` | |
271 | - add extra options to the ``Video`` Rich objects :ghpull:`12212` |
|
301 | - add extra options to the ``Video`` Rich objects :ghpull:`12212` | |
272 | - add pretty-printing to ``SimpleNamespace`` :ghpull:`12230` |
|
302 | - add pretty-printing to ``SimpleNamespace`` :ghpull:`12230` | |
273 |
|
303 | |||
274 | IPython.core.debugger.Pdb is now interruptible |
|
304 | IPython.core.debugger.Pdb is now interruptible | |
275 | ---------------------------------------------- |
|
305 | ---------------------------------------------- | |
276 |
|
306 | |||
277 | A ``KeyboardInterrupt`` will now interrupt IPython's extended debugger, in order to make Jupyter able to interrupt it. (:ghpull:`12168`) |
|
307 | A ``KeyboardInterrupt`` will now interrupt IPython's extended debugger, in order to make Jupyter able to interrupt it. (:ghpull:`12168`) | |
278 |
|
308 | |||
279 | Video HTML attributes |
|
309 | Video HTML attributes | |
280 | --------------------- |
|
310 | --------------------- | |
281 |
|
311 | |||
282 | Add an option to `IPython.display.Video` to change the attributes of the HTML display of the video (:ghpull:`12212`) |
|
312 | Add an option to `IPython.display.Video` to change the attributes of the HTML display of the video (:ghpull:`12212`) | |
283 |
|
313 | |||
284 |
|
314 | |||
285 | Pending deprecated imports |
|
315 | Pending deprecated imports | |
286 | -------------------------- |
|
316 | -------------------------- | |
287 |
|
317 | |||
288 | Many object present in ``IPython.core.display`` are there for internal use only, |
|
318 | Many object present in ``IPython.core.display`` are there for internal use only, | |
289 | and should already been imported from ``IPython.display`` by users and external |
|
319 | and should already been imported from ``IPython.display`` by users and external | |
290 | libraries. Trying to import those from ``IPython.core.display`` is still possible |
|
320 | libraries. Trying to import those from ``IPython.core.display`` is still possible | |
291 | but will trigger a |
|
321 | but will trigger a | |
292 | deprecation warning in later versions of IPython and will become errors in the |
|
322 | deprecation warning in later versions of IPython and will become errors in the | |
293 | future. |
|
323 | future. | |
294 |
|
324 | |||
295 | This will simplify compatibility with other Python kernels (like Xeus-Python), |
|
325 | This will simplify compatibility with other Python kernels (like Xeus-Python), | |
296 | and simplify code base. |
|
326 | and simplify code base. | |
297 |
|
327 | |||
298 |
|
328 | |||
299 |
|
329 | |||
300 |
|
330 | |||
301 | .. _version 713: |
|
331 | .. _version 713: | |
302 |
|
332 | |||
303 | IPython 7.13 |
|
333 | IPython 7.13 | |
304 | ============ |
|
334 | ============ | |
305 |
|
335 | |||
306 | IPython 7.13 is the final release of the 7.x branch since master is diverging |
|
336 | IPython 7.13 is the final release of the 7.x branch since master is diverging | |
307 | toward an 8.0. Exiting new features have already been merged in 8.0 and will |
|
337 | toward an 8.0. Exiting new features have already been merged in 8.0 and will | |
308 | not be available on the 7.x branch. All the changes below have been backported |
|
338 | not be available on the 7.x branch. All the changes below have been backported | |
309 | from the master branch. |
|
339 | from the master branch. | |
310 |
|
340 | |||
311 |
|
341 | |||
312 | - Fix inability to run PDB when inside an event loop :ghpull:`12141` |
|
342 | - Fix inability to run PDB when inside an event loop :ghpull:`12141` | |
313 | - Fix ability to interrupt some processes on windows :ghpull:`12137` |
|
343 | - Fix ability to interrupt some processes on windows :ghpull:`12137` | |
314 | - Fix debugger shortcuts :ghpull:`12132` |
|
344 | - Fix debugger shortcuts :ghpull:`12132` | |
315 | - improve tab completion when inside a string by removing irrelevant elements :ghpull:`12128` |
|
345 | - improve tab completion when inside a string by removing irrelevant elements :ghpull:`12128` | |
316 | - Fix display of filename tab completion when the path is long :ghpull:`12122` |
|
346 | - Fix display of filename tab completion when the path is long :ghpull:`12122` | |
317 | - Many removal of Python 2 specific code path :ghpull:`12110` |
|
347 | - Many removal of Python 2 specific code path :ghpull:`12110` | |
318 | - displaying wav files do not require NumPy anymore, and is 5x to 30x faster :ghpull:`12113` |
|
348 | - displaying wav files do not require NumPy anymore, and is 5x to 30x faster :ghpull:`12113` | |
319 |
|
349 | |||
320 | See the list of all closed issues and pull request on `github |
|
350 | See the list of all closed issues and pull request on `github | |
321 | <https://github.com/ipython/ipython/pulls?q=is%3Aclosed+milestone%3A7.13>`_. |
|
351 | <https://github.com/ipython/ipython/pulls?q=is%3Aclosed+milestone%3A7.13>`_. | |
322 |
|
352 | |||
323 | .. _version 712: |
|
353 | .. _version 712: | |
324 |
|
354 | |||
325 | IPython 7.12 |
|
355 | IPython 7.12 | |
326 | ============ |
|
356 | ============ | |
327 |
|
357 | |||
328 | IPython 7.12 is a minor update that mostly brings code cleanup, removal of |
|
358 | IPython 7.12 is a minor update that mostly brings code cleanup, removal of | |
329 | longtime deprecated function and a couple update to documentation cleanup as well. |
|
359 | longtime deprecated function and a couple update to documentation cleanup as well. | |
330 |
|
360 | |||
331 | Notable changes are the following: |
|
361 | Notable changes are the following: | |
332 |
|
362 | |||
333 | - Exit non-zero when ipython is given a file path to run that doesn't exist :ghpull:`12074` |
|
363 | - Exit non-zero when ipython is given a file path to run that doesn't exist :ghpull:`12074` | |
334 | - Test PR on ARM64 with Travis-CI :ghpull:`12073` |
|
364 | - Test PR on ARM64 with Travis-CI :ghpull:`12073` | |
335 | - Update CI to work with latest Pytest :ghpull:`12086` |
|
365 | - Update CI to work with latest Pytest :ghpull:`12086` | |
336 | - Add infrastructure to run ipykernel eventloop via trio :ghpull:`12097` |
|
366 | - Add infrastructure to run ipykernel eventloop via trio :ghpull:`12097` | |
337 | - Support git blame ignore revs :ghpull:`12091` |
|
367 | - Support git blame ignore revs :ghpull:`12091` | |
338 | - Start multi-line ``__repr__`` s on their own line :ghpull:`12099` |
|
368 | - Start multi-line ``__repr__`` s on their own line :ghpull:`12099` | |
339 |
|
369 | |||
340 | .. _version 7111: |
|
370 | .. _version 7111: | |
341 |
|
371 | |||
342 | IPython 7.11.1 |
|
372 | IPython 7.11.1 | |
343 | ============== |
|
373 | ============== | |
344 |
|
374 | |||
345 | A couple of deprecated functions (no-op) have been reintroduces in py3compat as |
|
375 | A couple of deprecated functions (no-op) have been reintroduces in py3compat as | |
346 | Cython was still relying on them, and will be removed in a couple of versions. |
|
376 | Cython was still relying on them, and will be removed in a couple of versions. | |
347 |
|
377 | |||
348 | .. _version 711: |
|
378 | .. _version 711: | |
349 |
|
379 | |||
350 | IPython 7.11 |
|
380 | IPython 7.11 | |
351 | ============ |
|
381 | ============ | |
352 |
|
382 | |||
353 | IPython 7.11 received a couple of compatibility fixes and code cleanup. |
|
383 | IPython 7.11 received a couple of compatibility fixes and code cleanup. | |
354 |
|
384 | |||
355 | A number of function in the ``py3compat`` have been removed; a number of types |
|
385 | A number of function in the ``py3compat`` have been removed; a number of types | |
356 | in the IPython code base are now non-ambiguous and now always ``unicode`` |
|
386 | in the IPython code base are now non-ambiguous and now always ``unicode`` | |
357 | instead of ``Union[Unicode,bytes]``; many of the relevant code path have thus |
|
387 | instead of ``Union[Unicode,bytes]``; many of the relevant code path have thus | |
358 | been simplified/cleaned and types annotation added. |
|
388 | been simplified/cleaned and types annotation added. | |
359 |
|
389 | |||
360 | IPython support several verbosity level from exceptions. ``xmode plain`` now |
|
390 | IPython support several verbosity level from exceptions. ``xmode plain`` now | |
361 | support chained exceptions. :ghpull:`11999` |
|
391 | support chained exceptions. :ghpull:`11999` | |
362 |
|
392 | |||
363 | We are starting to remove ``shell=True`` in some usages of subprocess. While not directly |
|
393 | We are starting to remove ``shell=True`` in some usages of subprocess. While not directly | |
364 | a security issue (as IPython is made to run arbitrary code anyway) it is not good |
|
394 | a security issue (as IPython is made to run arbitrary code anyway) it is not good | |
365 | practice and we'd like to show the example. :ghissue:`12023`. This discussion |
|
395 | practice and we'd like to show the example. :ghissue:`12023`. This discussion | |
366 | was started by ``@mschwager`` thanks to a new auditing tool they are working on |
|
396 | was started by ``@mschwager`` thanks to a new auditing tool they are working on | |
367 | with duo-labs (`dlint <https://github.com/duo-labs/dlint>`_). |
|
397 | with duo-labs (`dlint <https://github.com/duo-labs/dlint>`_). | |
368 |
|
398 | |||
369 | Work around some bugs in Python 3.9 tokenizer :ghpull:`12057` |
|
399 | Work around some bugs in Python 3.9 tokenizer :ghpull:`12057` | |
370 |
|
400 | |||
371 | IPython will now print its version after a crash. :ghpull:`11986` |
|
401 | IPython will now print its version after a crash. :ghpull:`11986` | |
372 |
|
402 | |||
373 | This is likely the last release from the 7.x series that will see new feature. |
|
403 | This is likely the last release from the 7.x series that will see new feature. | |
374 | The master branch will soon accept large code changes and thrilling new |
|
404 | The master branch will soon accept large code changes and thrilling new | |
375 | features; the 7.x branch will only start to accept critical bug fixes, and |
|
405 | features; the 7.x branch will only start to accept critical bug fixes, and | |
376 | update dependencies. |
|
406 | update dependencies. | |
377 |
|
407 | |||
378 | .. _version 7102: |
|
408 | .. _version 7102: | |
379 |
|
409 | |||
380 | IPython 7.10.2 |
|
410 | IPython 7.10.2 | |
381 | ============== |
|
411 | ============== | |
382 |
|
412 | |||
383 | IPython 7.10.2 fix a couple of extra incompatibility between IPython, ipdb, |
|
413 | IPython 7.10.2 fix a couple of extra incompatibility between IPython, ipdb, | |
384 | asyncio and Prompt Toolkit 3. |
|
414 | asyncio and Prompt Toolkit 3. | |
385 |
|
415 | |||
386 | .. _version 7101: |
|
416 | .. _version 7101: | |
387 |
|
417 | |||
388 | IPython 7.10.1 |
|
418 | IPython 7.10.1 | |
389 | ============== |
|
419 | ============== | |
390 |
|
420 | |||
391 | IPython 7.10.1 fix a couple of incompatibilities with Prompt toolkit 3 (please |
|
421 | IPython 7.10.1 fix a couple of incompatibilities with Prompt toolkit 3 (please | |
392 | update Prompt toolkit to 3.0.2 at least), and fixes some interaction with |
|
422 | update Prompt toolkit to 3.0.2 at least), and fixes some interaction with | |
393 | headless IPython. |
|
423 | headless IPython. | |
394 |
|
424 | |||
395 | .. _version 7100: |
|
425 | .. _version 7100: | |
396 |
|
426 | |||
397 | IPython 7.10.0 |
|
427 | IPython 7.10.0 | |
398 | ============== |
|
428 | ============== | |
399 |
|
429 | |||
400 | IPython 7.10 is the first double digit minor release in the last decade, and |
|
430 | IPython 7.10 is the first double digit minor release in the last decade, and | |
401 | first since the release of IPython 1.0, previous double digit minor release was |
|
431 | first since the release of IPython 1.0, previous double digit minor release was | |
402 | in August 2009. |
|
432 | in August 2009. | |
403 |
|
433 | |||
404 | We've been trying to give you regular release on the last Friday of every month |
|
434 | We've been trying to give you regular release on the last Friday of every month | |
405 | for a guaranty of rapid access to bug fixes and new features. |
|
435 | for a guaranty of rapid access to bug fixes and new features. | |
406 |
|
436 | |||
407 | Unlike the previous first few releases that have seen only a couple of code |
|
437 | Unlike the previous first few releases that have seen only a couple of code | |
408 | changes, 7.10 bring a number of changes, new features and bugfixes. |
|
438 | changes, 7.10 bring a number of changes, new features and bugfixes. | |
409 |
|
439 | |||
410 | Stop Support for Python 3.5 β Adopt NEP 29 |
|
440 | Stop Support for Python 3.5 β Adopt NEP 29 | |
411 | ------------------------------------------ |
|
441 | ------------------------------------------ | |
412 |
|
442 | |||
413 | IPython has decided to follow the informational `NEP 29 |
|
443 | IPython has decided to follow the informational `NEP 29 | |
414 | <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_ which layout a clear |
|
444 | <https://numpy.org/neps/nep-0029-deprecation_policy.html>`_ which layout a clear | |
415 | policy as to which version of (C)Python and NumPy are supported. |
|
445 | policy as to which version of (C)Python and NumPy are supported. | |
416 |
|
446 | |||
417 | We thus dropped support for Python 3.5, and cleaned up a number of code path |
|
447 | We thus dropped support for Python 3.5, and cleaned up a number of code path | |
418 | that were Python-version dependant. If you are on 3.5 or earlier pip should |
|
448 | that were Python-version dependant. If you are on 3.5 or earlier pip should | |
419 | automatically give you the latest compatible version of IPython so you do not |
|
449 | automatically give you the latest compatible version of IPython so you do not | |
420 | need to pin to a given version. |
|
450 | need to pin to a given version. | |
421 |
|
451 | |||
422 | Support for Prompt Toolkit 3.0 |
|
452 | Support for Prompt Toolkit 3.0 | |
423 | ------------------------------ |
|
453 | ------------------------------ | |
424 |
|
454 | |||
425 | Prompt Toolkit 3.0 was release a week before IPython 7.10 and introduces a few |
|
455 | Prompt Toolkit 3.0 was release a week before IPython 7.10 and introduces a few | |
426 | breaking changes. We believe IPython 7.10 should be compatible with both Prompt |
|
456 | breaking changes. We believe IPython 7.10 should be compatible with both Prompt | |
427 | Toolkit 2.x and 3.x, though it has not been extensively tested with 3.x so |
|
457 | Toolkit 2.x and 3.x, though it has not been extensively tested with 3.x so | |
428 | please report any issues. |
|
458 | please report any issues. | |
429 |
|
459 | |||
430 |
|
460 | |||
431 | Prompt Rendering Performance improvements |
|
461 | Prompt Rendering Performance improvements | |
432 | ----------------------------------------- |
|
462 | ----------------------------------------- | |
433 |
|
463 | |||
434 | Pull Request :ghpull:`11933` introduced an optimisation in the prompt rendering |
|
464 | Pull Request :ghpull:`11933` introduced an optimisation in the prompt rendering | |
435 | logic that should decrease the resource usage of IPython when using the |
|
465 | logic that should decrease the resource usage of IPython when using the | |
436 | _default_ configuration but could potentially introduce a regression of |
|
466 | _default_ configuration but could potentially introduce a regression of | |
437 | functionalities if you are using a custom prompt. |
|
467 | functionalities if you are using a custom prompt. | |
438 |
|
468 | |||
439 | We know assume if you haven't changed the default keybindings that the prompt |
|
469 | We know assume if you haven't changed the default keybindings that the prompt | |
440 | **will not change** during the duration of your input β which is for example |
|
470 | **will not change** during the duration of your input β which is for example | |
441 | not true when using vi insert mode that switches between `[ins]` and `[nor]` |
|
471 | not true when using vi insert mode that switches between `[ins]` and `[nor]` | |
442 | for the current mode. |
|
472 | for the current mode. | |
443 |
|
473 | |||
444 | If you are experiencing any issue let us know. |
|
474 | If you are experiencing any issue let us know. | |
445 |
|
475 | |||
446 | Code autoformatting |
|
476 | Code autoformatting | |
447 | ------------------- |
|
477 | ------------------- | |
448 |
|
478 | |||
449 | The IPython terminal can now auto format your code just before entering a new |
|
479 | The IPython terminal can now auto format your code just before entering a new | |
450 | line or executing a command. To do so use the |
|
480 | line or executing a command. To do so use the | |
451 | ``--TerminalInteractiveShell.autoformatter`` option and set it to ``'black'``; |
|
481 | ``--TerminalInteractiveShell.autoformatter`` option and set it to ``'black'``; | |
452 | if black is installed IPython will use black to format your code when possible. |
|
482 | if black is installed IPython will use black to format your code when possible. | |
453 |
|
483 | |||
454 | IPython cannot always properly format your code; in particular it will |
|
484 | IPython cannot always properly format your code; in particular it will | |
455 | auto formatting with *black* will only work if: |
|
485 | auto formatting with *black* will only work if: | |
456 |
|
486 | |||
457 | - Your code does not contains magics or special python syntax. |
|
487 | - Your code does not contains magics or special python syntax. | |
458 |
|
488 | |||
459 | - There is no code after your cursor. |
|
489 | - There is no code after your cursor. | |
460 |
|
490 | |||
461 | The Black API is also still in motion; so this may not work with all versions of |
|
491 | The Black API is also still in motion; so this may not work with all versions of | |
462 | black. |
|
492 | black. | |
463 |
|
493 | |||
464 | It should be possible to register custom formatter, though the API is till in |
|
494 | It should be possible to register custom formatter, though the API is till in | |
465 | flux. |
|
495 | flux. | |
466 |
|
496 | |||
467 | Arbitrary Mimetypes Handing in Terminal (Aka inline images in terminal) |
|
497 | Arbitrary Mimetypes Handing in Terminal (Aka inline images in terminal) | |
468 | ----------------------------------------------------------------------- |
|
498 | ----------------------------------------------------------------------- | |
469 |
|
499 | |||
470 | When using IPython terminal it is now possible to register function to handle |
|
500 | When using IPython terminal it is now possible to register function to handle | |
471 | arbitrary mimetypes. While rendering non-text based representation was possible in |
|
501 | arbitrary mimetypes. While rendering non-text based representation was possible in | |
472 | many jupyter frontend; it was not possible in terminal IPython, as usually |
|
502 | many jupyter frontend; it was not possible in terminal IPython, as usually | |
473 | terminal are limited to displaying text. As many terminal these days provide |
|
503 | terminal are limited to displaying text. As many terminal these days provide | |
474 | escape sequences to display non-text; bringing this loved feature to IPython CLI |
|
504 | escape sequences to display non-text; bringing this loved feature to IPython CLI | |
475 | made a lot of sens. This functionality will not only allow inline images; but |
|
505 | made a lot of sens. This functionality will not only allow inline images; but | |
476 | allow opening of external program; for example ``mplayer`` to "display" sound |
|
506 | allow opening of external program; for example ``mplayer`` to "display" sound | |
477 | files. |
|
507 | files. | |
478 |
|
508 | |||
479 | So far only the hooks necessary for this are in place, but no default mime |
|
509 | So far only the hooks necessary for this are in place, but no default mime | |
480 | renderers added; so inline images will only be available via extensions. We will |
|
510 | renderers added; so inline images will only be available via extensions. We will | |
481 | progressively enable these features by default in the next few releases, and |
|
511 | progressively enable these features by default in the next few releases, and | |
482 | contribution is welcomed. |
|
512 | contribution is welcomed. | |
483 |
|
513 | |||
484 | We welcome any feedback on the API. See :ref:`shell_mimerenderer` for more |
|
514 | We welcome any feedback on the API. See :ref:`shell_mimerenderer` for more | |
485 | informations. |
|
515 | informations. | |
486 |
|
516 | |||
487 | This is originally based on work form in :ghpull:`10610` from @stephanh42 |
|
517 | This is originally based on work form in :ghpull:`10610` from @stephanh42 | |
488 | started over two years ago, and still a lot need to be done. |
|
518 | started over two years ago, and still a lot need to be done. | |
489 |
|
519 | |||
490 | MISC |
|
520 | MISC | |
491 | ---- |
|
521 | ---- | |
492 |
|
522 | |||
493 | - Completions can define their own ordering :ghpull:`11855` |
|
523 | - Completions can define their own ordering :ghpull:`11855` | |
494 | - Enable Plotting in the same cell than the one that import matplotlib |
|
524 | - Enable Plotting in the same cell than the one that import matplotlib | |
495 | :ghpull:`11916` |
|
525 | :ghpull:`11916` | |
496 | - Allow to store and restore multiple variables at once :ghpull:`11930` |
|
526 | - Allow to store and restore multiple variables at once :ghpull:`11930` | |
497 |
|
527 | |||
498 | You can see `all pull-requests <https://github.com/ipython/ipython/pulls?q=is%3Apr+milestone%3A7.10+is%3Aclosed>`_ for this release. |
|
528 | You can see `all pull-requests <https://github.com/ipython/ipython/pulls?q=is%3Apr+milestone%3A7.10+is%3Aclosed>`_ for this release. | |
499 |
|
529 | |||
500 | API Changes |
|
530 | API Changes | |
501 | ----------- |
|
531 | ----------- | |
502 |
|
532 | |||
503 | Change of API and exposed objects automatically detected using `frappuccino <https://pypi.org/project/frappuccino/>`_ (still in beta): |
|
533 | Change of API and exposed objects automatically detected using `frappuccino <https://pypi.org/project/frappuccino/>`_ (still in beta): | |
504 |
|
534 | |||
505 | The following items are new in IPython 7.10:: |
|
535 | The following items are new in IPython 7.10:: | |
506 |
|
536 | |||
507 | + IPython.terminal.shortcuts.reformat_text_before_cursor(buffer, document, shell) |
|
537 | + IPython.terminal.shortcuts.reformat_text_before_cursor(buffer, document, shell) | |
508 | + IPython.terminal.interactiveshell.PTK3 |
|
538 | + IPython.terminal.interactiveshell.PTK3 | |
509 | + IPython.terminal.interactiveshell.black_reformat_handler(text_before_cursor) |
|
539 | + IPython.terminal.interactiveshell.black_reformat_handler(text_before_cursor) | |
510 | + IPython.terminal.prompts.RichPromptDisplayHook.write_format_data(self, format_dict, md_dict='None') |
|
540 | + IPython.terminal.prompts.RichPromptDisplayHook.write_format_data(self, format_dict, md_dict='None') | |
511 |
|
541 | |||
512 | The following items have been removed in 7.10:: |
|
542 | The following items have been removed in 7.10:: | |
513 |
|
543 | |||
514 | - IPython.lib.pretty.DICT_IS_ORDERED |
|
544 | - IPython.lib.pretty.DICT_IS_ORDERED | |
515 |
|
545 | |||
516 | The following signatures differ between versions:: |
|
546 | The following signatures differ between versions:: | |
517 |
|
547 | |||
518 | - IPython.extensions.storemagic.restore_aliases(ip) |
|
548 | - IPython.extensions.storemagic.restore_aliases(ip) | |
519 | + IPython.extensions.storemagic.restore_aliases(ip, alias='None') |
|
549 | + IPython.extensions.storemagic.restore_aliases(ip, alias='None') | |
520 |
|
550 | |||
521 | Special Thanks |
|
551 | Special Thanks | |
522 | -------------- |
|
552 | -------------- | |
523 |
|
553 | |||
524 | - @stephanh42 who started the work on inline images in terminal 2 years ago |
|
554 | - @stephanh42 who started the work on inline images in terminal 2 years ago | |
525 | - @augustogoulart who spent a lot of time triaging issues and responding to |
|
555 | - @augustogoulart who spent a lot of time triaging issues and responding to | |
526 | users. |
|
556 | users. | |
527 | - @con-f-use who is my (@Carreau) first sponsor on GitHub, as a reminder if you |
|
557 | - @con-f-use who is my (@Carreau) first sponsor on GitHub, as a reminder if you | |
528 | like IPython, Jupyter and many other library of the SciPy stack you can |
|
558 | like IPython, Jupyter and many other library of the SciPy stack you can | |
529 | donate to numfocus.org non profit |
|
559 | donate to numfocus.org non profit | |
530 |
|
560 | |||
531 | .. _version 790: |
|
561 | .. _version 790: | |
532 |
|
562 | |||
533 | IPython 7.9.0 |
|
563 | IPython 7.9.0 | |
534 | ============= |
|
564 | ============= | |
535 |
|
565 | |||
536 | IPython 7.9 is a small release with a couple of improvement and bug fixes. |
|
566 | IPython 7.9 is a small release with a couple of improvement and bug fixes. | |
537 |
|
567 | |||
538 | - Xterm terminal title should be restored on exit :ghpull:`11910` |
|
568 | - Xterm terminal title should be restored on exit :ghpull:`11910` | |
539 | - special variables ``_``,``__``, ``___`` are not set anymore when cache size |
|
569 | - special variables ``_``,``__``, ``___`` are not set anymore when cache size | |
540 | is 0 or less. :ghpull:`11877` |
|
570 | is 0 or less. :ghpull:`11877` | |
541 | - Autoreload should have regained some speed by using a new heuristic logic to |
|
571 | - Autoreload should have regained some speed by using a new heuristic logic to | |
542 | find all objects needing reload. This should avoid large objects traversal |
|
572 | find all objects needing reload. This should avoid large objects traversal | |
543 | like pandas dataframes. :ghpull:`11876` |
|
573 | like pandas dataframes. :ghpull:`11876` | |
544 | - Get ready for Python 4. :ghpull:`11874` |
|
574 | - Get ready for Python 4. :ghpull:`11874` | |
545 | - `%env` Magic now has heuristic to hide potentially sensitive values :ghpull:`11896` |
|
575 | - `%env` Magic now has heuristic to hide potentially sensitive values :ghpull:`11896` | |
546 |
|
576 | |||
547 | This is a small release despite a number of Pull Request Pending that need to |
|
577 | This is a small release despite a number of Pull Request Pending that need to | |
548 | be reviewed/worked on. Many of the core developers have been busy outside of |
|
578 | be reviewed/worked on. Many of the core developers have been busy outside of | |
549 | IPython/Jupyter and we thanks all contributor for their patience; we'll work on |
|
579 | IPython/Jupyter and we thanks all contributor for their patience; we'll work on | |
550 | these as soon as we have time. |
|
580 | these as soon as we have time. | |
551 |
|
581 | |||
552 |
|
582 | |||
553 | .. _version780: |
|
583 | .. _version780: | |
554 |
|
584 | |||
555 | IPython 7.8.0 |
|
585 | IPython 7.8.0 | |
556 | ============= |
|
586 | ============= | |
557 |
|
587 | |||
558 | IPython 7.8.0 contain a few bugfix and 2 new APIs: |
|
588 | IPython 7.8.0 contain a few bugfix and 2 new APIs: | |
559 |
|
589 | |||
560 | - Enable changing the font color for LaTeX rendering :ghpull:`11840` |
|
590 | - Enable changing the font color for LaTeX rendering :ghpull:`11840` | |
561 | - and Re-Expose some PDB API (see below) |
|
591 | - and Re-Expose some PDB API (see below) | |
562 |
|
592 | |||
563 | Expose Pdb API |
|
593 | Expose Pdb API | |
564 | -------------- |
|
594 | -------------- | |
565 |
|
595 | |||
566 | Expose the built-in ``pdb.Pdb`` API. ``Pdb`` constructor arguments are generically |
|
596 | Expose the built-in ``pdb.Pdb`` API. ``Pdb`` constructor arguments are generically | |
567 | exposed, regardless of python version. |
|
597 | exposed, regardless of python version. | |
568 | Newly exposed arguments: |
|
598 | Newly exposed arguments: | |
569 |
|
599 | |||
570 | - ``skip`` - Python 3.1+ |
|
600 | - ``skip`` - Python 3.1+ | |
571 | - ``nosiginnt`` - Python 3.2+ |
|
601 | - ``nosiginnt`` - Python 3.2+ | |
572 | - ``readrc`` - Python 3.6+ |
|
602 | - ``readrc`` - Python 3.6+ | |
573 |
|
603 | |||
574 | Try it out:: |
|
604 | Try it out:: | |
575 |
|
605 | |||
576 | from IPython.terminal.debugger import TerminalPdb |
|
606 | from IPython.terminal.debugger import TerminalPdb | |
577 | pdb = TerminalPdb(skip=["skipthismodule"]) |
|
607 | pdb = TerminalPdb(skip=["skipthismodule"]) | |
578 |
|
608 | |||
579 |
|
609 | |||
580 | See :ghpull:`11840` |
|
610 | See :ghpull:`11840` | |
581 |
|
611 | |||
582 | .. _version770: |
|
612 | .. _version770: | |
583 |
|
613 | |||
584 | IPython 7.7.0 |
|
614 | IPython 7.7.0 | |
585 | ============= |
|
615 | ============= | |
586 |
|
616 | |||
587 | IPython 7.7.0 contain multiple bug fixes and documentation updates; Here are a |
|
617 | IPython 7.7.0 contain multiple bug fixes and documentation updates; Here are a | |
588 | few of the outstanding issue fixed: |
|
618 | few of the outstanding issue fixed: | |
589 |
|
619 | |||
590 | - Fix a bug introduced in 7.6 where the ``%matplotlib`` magic would fail on |
|
620 | - Fix a bug introduced in 7.6 where the ``%matplotlib`` magic would fail on | |
591 | previously acceptable arguments :ghpull:`11814`. |
|
621 | previously acceptable arguments :ghpull:`11814`. | |
592 | - Fix the manage location on freebsd :ghpull:`11808`. |
|
622 | - Fix the manage location on freebsd :ghpull:`11808`. | |
593 | - Fix error message about aliases after ``%reset`` call in ipykernel |
|
623 | - Fix error message about aliases after ``%reset`` call in ipykernel | |
594 | :ghpull:`11806` |
|
624 | :ghpull:`11806` | |
595 | - Fix Duplication completions in emacs :ghpull:`11803` |
|
625 | - Fix Duplication completions in emacs :ghpull:`11803` | |
596 |
|
626 | |||
597 | We are planning to adopt `NEP29 <https://github.com/numpy/numpy/pull/14086>`_ |
|
627 | We are planning to adopt `NEP29 <https://github.com/numpy/numpy/pull/14086>`_ | |
598 | (still currently in draft) which may make this minor version of IPython the |
|
628 | (still currently in draft) which may make this minor version of IPython the | |
599 | last one to support Python 3.5 and will make the code base more aggressive |
|
629 | last one to support Python 3.5 and will make the code base more aggressive | |
600 | toward removing compatibility with older versions of Python. |
|
630 | toward removing compatibility with older versions of Python. | |
601 |
|
631 | |||
602 | GitHub now support to give only "Triage" permissions to users; if you'd like to |
|
632 | GitHub now support to give only "Triage" permissions to users; if you'd like to | |
603 | help close stale issues and labels issues please reach to us with your GitHub |
|
633 | help close stale issues and labels issues please reach to us with your GitHub | |
604 | Username and we'll add you to the triage team. It is a great way to start |
|
634 | Username and we'll add you to the triage team. It is a great way to start | |
605 | contributing and a path toward getting commit rights. |
|
635 | contributing and a path toward getting commit rights. | |
606 |
|
636 | |||
607 | .. _version761: |
|
637 | .. _version761: | |
608 |
|
638 | |||
609 | IPython 7.6.1 |
|
639 | IPython 7.6.1 | |
610 | ============= |
|
640 | ============= | |
611 |
|
641 | |||
612 | IPython 7.6.1 contain a critical bugfix in the ``%timeit`` magic, which would |
|
642 | IPython 7.6.1 contain a critical bugfix in the ``%timeit`` magic, which would | |
613 | crash on some inputs as a side effect of :ghpull:`11716`. See :ghpull:`11812` |
|
643 | crash on some inputs as a side effect of :ghpull:`11716`. See :ghpull:`11812` | |
614 |
|
644 | |||
615 |
|
645 | |||
616 | .. _whatsnew760: |
|
646 | .. _whatsnew760: | |
617 |
|
647 | |||
618 | IPython 7.6.0 |
|
648 | IPython 7.6.0 | |
619 | ============= |
|
649 | ============= | |
620 |
|
650 | |||
621 | IPython 7.6.0 contains a couple of bug fixes and number of small features |
|
651 | IPython 7.6.0 contains a couple of bug fixes and number of small features | |
622 | additions as well as some compatibility with the current development version of |
|
652 | additions as well as some compatibility with the current development version of | |
623 | Python 3.8. |
|
653 | Python 3.8. | |
624 |
|
654 | |||
625 | - Add a ``-l`` option to :magic:`psearch` to list the available search |
|
655 | - Add a ``-l`` option to :magic:`psearch` to list the available search | |
626 | types. :ghpull:`11672` |
|
656 | types. :ghpull:`11672` | |
627 | - Support ``PathLike`` for ``DisplayObject`` and ``Image``. :ghpull:`11764` |
|
657 | - Support ``PathLike`` for ``DisplayObject`` and ``Image``. :ghpull:`11764` | |
628 | - Configurability of timeout in the test suite for slow platforms. |
|
658 | - Configurability of timeout in the test suite for slow platforms. | |
629 | :ghpull:`11756` |
|
659 | :ghpull:`11756` | |
630 | - Accept any casing for matplotlib backend. :ghpull:`121748` |
|
660 | - Accept any casing for matplotlib backend. :ghpull:`121748` | |
631 | - Properly skip test that requires numpy to be installed :ghpull:`11723` |
|
661 | - Properly skip test that requires numpy to be installed :ghpull:`11723` | |
632 | - More support for Python 3.8 and positional only arguments (pep570) |
|
662 | - More support for Python 3.8 and positional only arguments (pep570) | |
633 | :ghpull:`11720` |
|
663 | :ghpull:`11720` | |
634 | - Unicode names for the completion are loaded lazily on first use which |
|
664 | - Unicode names for the completion are loaded lazily on first use which | |
635 | should decrease startup time. :ghpull:`11693` |
|
665 | should decrease startup time. :ghpull:`11693` | |
636 | - Autoreload now update the types of reloaded objects; this for example allow |
|
666 | - Autoreload now update the types of reloaded objects; this for example allow | |
637 | pickling of reloaded objects. :ghpull:`11644` |
|
667 | pickling of reloaded objects. :ghpull:`11644` | |
638 | - Fix a bug where ``%%time`` magic would suppress cell output. :ghpull:`11716` |
|
668 | - Fix a bug where ``%%time`` magic would suppress cell output. :ghpull:`11716` | |
639 |
|
669 | |||
640 |
|
670 | |||
641 | Prepare migration to pytest (instead of nose) for testing |
|
671 | Prepare migration to pytest (instead of nose) for testing | |
642 | --------------------------------------------------------- |
|
672 | --------------------------------------------------------- | |
643 |
|
673 | |||
644 | Most of the work between 7.5 and 7.6 was to prepare the migration from our |
|
674 | Most of the work between 7.5 and 7.6 was to prepare the migration from our | |
645 | testing framework to pytest. Most of the test suite should now work by simply |
|
675 | testing framework to pytest. Most of the test suite should now work by simply | |
646 | issuing ``pytest`` from the root of the repository. |
|
676 | issuing ``pytest`` from the root of the repository. | |
647 |
|
677 | |||
648 | The migration to pytest is just at its beginning. Many of our test still rely |
|
678 | The migration to pytest is just at its beginning. Many of our test still rely | |
649 | on IPython-specific plugins for nose using pytest (doctest using IPython syntax |
|
679 | on IPython-specific plugins for nose using pytest (doctest using IPython syntax | |
650 | is one example of this where test appear as "passing", while no code has been |
|
680 | is one example of this where test appear as "passing", while no code has been | |
651 | ran). Many test also need to be updated like ``yield-test`` to be properly |
|
681 | ran). Many test also need to be updated like ``yield-test`` to be properly | |
652 | parametrized tests. |
|
682 | parametrized tests. | |
653 |
|
683 | |||
654 | Migration to pytest allowed me to discover a number of issues in our test |
|
684 | Migration to pytest allowed me to discover a number of issues in our test | |
655 | suite; which was hiding a number of subtle issues βΒ or not actually running |
|
685 | suite; which was hiding a number of subtle issues βΒ or not actually running | |
656 | some of the tests in our test suite β I have thus corrected many of those; like |
|
686 | some of the tests in our test suite β I have thus corrected many of those; like | |
657 | improperly closed resources; or used of deprecated features. I also made use of |
|
687 | improperly closed resources; or used of deprecated features. I also made use of | |
658 | the ``pytest --durations=...`` to find some of our slowest test and speed them |
|
688 | the ``pytest --durations=...`` to find some of our slowest test and speed them | |
659 | up (our test suite can now be up to 10% faster). Pytest as also a variety of |
|
689 | up (our test suite can now be up to 10% faster). Pytest as also a variety of | |
660 | plugins and flags which will make the code quality of IPython and the testing |
|
690 | plugins and flags which will make the code quality of IPython and the testing | |
661 | experience better. |
|
691 | experience better. | |
662 |
|
692 | |||
663 | Misc |
|
693 | Misc | |
664 | ---- |
|
694 | ---- | |
665 |
|
695 | |||
666 | We skipped the release of 7.6 at the end of May, but will attempt to get back |
|
696 | We skipped the release of 7.6 at the end of May, but will attempt to get back | |
667 | on schedule. We are starting to think about making introducing backward |
|
697 | on schedule. We are starting to think about making introducing backward | |
668 | incompatible change and start the 8.0 series. |
|
698 | incompatible change and start the 8.0 series. | |
669 |
|
699 | |||
670 | Special Thanks to Gabriel (@gpotter2 on GitHub), who among other took care many |
|
700 | Special Thanks to Gabriel (@gpotter2 on GitHub), who among other took care many | |
671 | of the remaining task for 7.4 and 7.5, like updating the website. |
|
701 | of the remaining task for 7.4 and 7.5, like updating the website. | |
672 |
|
702 | |||
673 | .. _whatsnew750: |
|
703 | .. _whatsnew750: | |
674 |
|
704 | |||
675 | IPython 7.5.0 |
|
705 | IPython 7.5.0 | |
676 | ============= |
|
706 | ============= | |
677 |
|
707 | |||
678 | IPython 7.5.0 consist mostly of bug-fixes, and documentation updates, with one |
|
708 | IPython 7.5.0 consist mostly of bug-fixes, and documentation updates, with one | |
679 | minor new feature. The `Audio` display element can now be assigned an element |
|
709 | minor new feature. The `Audio` display element can now be assigned an element | |
680 | id when displayed in browser. See :ghpull:`11670` |
|
710 | id when displayed in browser. See :ghpull:`11670` | |
681 |
|
711 | |||
682 | The major outstanding bug fix correct a change of behavior that was introduce |
|
712 | The major outstanding bug fix correct a change of behavior that was introduce | |
683 | in 7.4.0 where some cell magics would not be able to access or modify global |
|
713 | in 7.4.0 where some cell magics would not be able to access or modify global | |
684 | scope when using the ``@needs_local_scope`` decorator. This was typically |
|
714 | scope when using the ``@needs_local_scope`` decorator. This was typically | |
685 | encountered with the ``%%time`` and ``%%timeit`` magics. See :ghissue:`11659` |
|
715 | encountered with the ``%%time`` and ``%%timeit`` magics. See :ghissue:`11659` | |
686 | and :ghpull:`11698`. |
|
716 | and :ghpull:`11698`. | |
687 |
|
717 | |||
688 | .. _whatsnew740: |
|
718 | .. _whatsnew740: | |
689 |
|
719 | |||
690 | IPython 7.4.0 |
|
720 | IPython 7.4.0 | |
691 | ============= |
|
721 | ============= | |
692 |
|
722 | |||
693 | Unicode name completions |
|
723 | Unicode name completions | |
694 | ------------------------ |
|
724 | ------------------------ | |
695 |
|
725 | |||
696 | Previously, we provided completion for a unicode name with its relative symbol. |
|
726 | Previously, we provided completion for a unicode name with its relative symbol. | |
697 | With this, now IPython provides complete suggestions to unicode name symbols. |
|
727 | With this, now IPython provides complete suggestions to unicode name symbols. | |
698 |
|
728 | |||
699 | As on the PR, if user types ``\LAT<tab>``, IPython provides a list of |
|
729 | As on the PR, if user types ``\LAT<tab>``, IPython provides a list of | |
700 | possible completions. In this case, it would be something like:: |
|
730 | possible completions. In this case, it would be something like:: | |
701 |
|
731 | |||
702 | 'LATIN CAPITAL LETTER A', |
|
732 | 'LATIN CAPITAL LETTER A', | |
703 | 'LATIN CAPITAL LETTER B', |
|
733 | 'LATIN CAPITAL LETTER B', | |
704 | 'LATIN CAPITAL LETTER C', |
|
734 | 'LATIN CAPITAL LETTER C', | |
705 | 'LATIN CAPITAL LETTER D', |
|
735 | 'LATIN CAPITAL LETTER D', | |
706 | .... |
|
736 | .... | |
707 |
|
737 | |||
708 | This help to type unicode character that do not have short latex aliases, and |
|
738 | This help to type unicode character that do not have short latex aliases, and | |
709 | have long unicode names. for example ``Ν°``, ``\GREEK CAPITAL LETTER HETA``. |
|
739 | have long unicode names. for example ``Ν°``, ``\GREEK CAPITAL LETTER HETA``. | |
710 |
|
740 | |||
711 | This feature was contributed by Luciana Marques :ghpull:`11583`. |
|
741 | This feature was contributed by Luciana Marques :ghpull:`11583`. | |
712 |
|
742 | |||
713 | Make audio normalization optional |
|
743 | Make audio normalization optional | |
714 | --------------------------------- |
|
744 | --------------------------------- | |
715 |
|
745 | |||
716 | Added 'normalize' argument to `IPython.display.Audio`. This argument applies |
|
746 | Added 'normalize' argument to `IPython.display.Audio`. This argument applies | |
717 | when audio data is given as an array of samples. The default of `normalize=True` |
|
747 | when audio data is given as an array of samples. The default of `normalize=True` | |
718 | preserves prior behavior of normalizing the audio to the maximum possible range. |
|
748 | preserves prior behavior of normalizing the audio to the maximum possible range. | |
719 | Setting to `False` disables normalization. |
|
749 | Setting to `False` disables normalization. | |
720 |
|
750 | |||
721 |
|
751 | |||
722 | Miscellaneous |
|
752 | Miscellaneous | |
723 | ------------- |
|
753 | ------------- | |
724 |
|
754 | |||
725 | - Fix improper acceptation of ``return`` outside of functions. :ghpull:`11641`. |
|
755 | - Fix improper acceptation of ``return`` outside of functions. :ghpull:`11641`. | |
726 | - Fixed PyQt 5.11 backwards incompatibility causing sip import failure. |
|
756 | - Fixed PyQt 5.11 backwards incompatibility causing sip import failure. | |
727 | :ghpull:`11613`. |
|
757 | :ghpull:`11613`. | |
728 | - Fix Bug where ``type?`` would crash IPython. :ghpull:`1608`. |
|
758 | - Fix Bug where ``type?`` would crash IPython. :ghpull:`1608`. | |
729 | - Allow to apply ``@needs_local_scope`` to cell magics for convenience. |
|
759 | - Allow to apply ``@needs_local_scope`` to cell magics for convenience. | |
730 | :ghpull:`11542`. |
|
760 | :ghpull:`11542`. | |
731 |
|
761 | |||
732 | .. _whatsnew730: |
|
762 | .. _whatsnew730: | |
733 |
|
763 | |||
734 | IPython 7.3.0 |
|
764 | IPython 7.3.0 | |
735 | ============= |
|
765 | ============= | |
736 |
|
766 | |||
737 | .. _whatsnew720: |
|
767 | .. _whatsnew720: | |
738 |
|
768 | |||
739 | IPython 7.3.0 bring several bug fixes and small improvements that you will |
|
769 | IPython 7.3.0 bring several bug fixes and small improvements that you will | |
740 | described bellow. |
|
770 | described bellow. | |
741 |
|
771 | |||
742 | The biggest change to this release is the implementation of the ``%conda`` and |
|
772 | The biggest change to this release is the implementation of the ``%conda`` and | |
743 | ``%pip`` magics, that will attempt to install packages in the **current |
|
773 | ``%pip`` magics, that will attempt to install packages in the **current | |
744 | environment**. You may still need to restart your interpreter or kernel for the |
|
774 | environment**. You may still need to restart your interpreter or kernel for the | |
745 | change to be taken into account, but it should simplify installation of packages |
|
775 | change to be taken into account, but it should simplify installation of packages | |
746 | into remote environment. Installing using pip/conda from the command line is |
|
776 | into remote environment. Installing using pip/conda from the command line is | |
747 | still the prefer method. |
|
777 | still the prefer method. | |
748 |
|
778 | |||
749 | The ``%pip`` magic was already present, but was only printing a warning; now it |
|
779 | The ``%pip`` magic was already present, but was only printing a warning; now it | |
750 | will actually forward commands to pip. |
|
780 | will actually forward commands to pip. | |
751 |
|
781 | |||
752 | Misc bug fixes and improvements: |
|
782 | Misc bug fixes and improvements: | |
753 |
|
783 | |||
754 | - Compatibility with Python 3.8. |
|
784 | - Compatibility with Python 3.8. | |
755 | - Do not expand shell variable in execution magics, and added the |
|
785 | - Do not expand shell variable in execution magics, and added the | |
756 | ``no_var_expand`` decorator for magic requiring a similar functionality |
|
786 | ``no_var_expand`` decorator for magic requiring a similar functionality | |
757 | :ghpull:`11516` |
|
787 | :ghpull:`11516` | |
758 | - Add ``%pip`` and ``%conda`` magic :ghpull:`11524` |
|
788 | - Add ``%pip`` and ``%conda`` magic :ghpull:`11524` | |
759 | - Re-initialize posix aliases after a ``%reset`` :ghpull:`11528` |
|
789 | - Re-initialize posix aliases after a ``%reset`` :ghpull:`11528` | |
760 | - Allow the IPython command line to run ``*.ipynb`` files :ghpull:`11529` |
|
790 | - Allow the IPython command line to run ``*.ipynb`` files :ghpull:`11529` | |
761 |
|
791 | |||
762 | IPython 7.2.0 |
|
792 | IPython 7.2.0 | |
763 | ============= |
|
793 | ============= | |
764 |
|
794 | |||
765 | IPython 7.2.0 brings minor bugfixes, improvements, and new configuration options: |
|
795 | IPython 7.2.0 brings minor bugfixes, improvements, and new configuration options: | |
766 |
|
796 | |||
767 | - Fix a bug preventing PySide2 GUI integration from working :ghpull:`11464` |
|
797 | - Fix a bug preventing PySide2 GUI integration from working :ghpull:`11464` | |
768 | - Run CI on Mac OS ! :ghpull:`11471` |
|
798 | - Run CI on Mac OS ! :ghpull:`11471` | |
769 | - Fix IPython "Demo" mode. :ghpull:`11498` |
|
799 | - Fix IPython "Demo" mode. :ghpull:`11498` | |
770 | - Fix ``%run`` magic with path in name :ghpull:`11499` |
|
800 | - Fix ``%run`` magic with path in name :ghpull:`11499` | |
771 | - Fix: add CWD to sys.path *after* stdlib :ghpull:`11502` |
|
801 | - Fix: add CWD to sys.path *after* stdlib :ghpull:`11502` | |
772 | - Better rendering of signatures, especially long ones. :ghpull:`11505` |
|
802 | - Better rendering of signatures, especially long ones. :ghpull:`11505` | |
773 | - Re-enable jedi by default if it's installed :ghpull:`11506` |
|
803 | - Re-enable jedi by default if it's installed :ghpull:`11506` | |
774 | - Add New ``minimal`` exception reporting mode (useful for educational purpose). See :ghpull:`11509` |
|
804 | - Add New ``minimal`` exception reporting mode (useful for educational purpose). See :ghpull:`11509` | |
775 |
|
805 | |||
776 |
|
806 | |||
777 | Added ability to show subclasses when using pinfo and other utilities |
|
807 | Added ability to show subclasses when using pinfo and other utilities | |
778 | --------------------------------------------------------------------- |
|
808 | --------------------------------------------------------------------- | |
779 |
|
809 | |||
780 | When using ``?``/``??`` on a class, IPython will now list the first 10 subclasses. |
|
810 | When using ``?``/``??`` on a class, IPython will now list the first 10 subclasses. | |
781 |
|
811 | |||
782 | Special Thanks to Chris Mentzel of the Moore Foundation for this feature. Chris |
|
812 | Special Thanks to Chris Mentzel of the Moore Foundation for this feature. Chris | |
783 | is one of the people who played a critical role in IPython/Jupyter getting |
|
813 | is one of the people who played a critical role in IPython/Jupyter getting | |
784 | funding. |
|
814 | funding. | |
785 |
|
815 | |||
786 | We are grateful for all the help Chris has given us over the years, |
|
816 | We are grateful for all the help Chris has given us over the years, | |
787 | and we're now proud to have code contributed by Chris in IPython. |
|
817 | and we're now proud to have code contributed by Chris in IPython. | |
788 |
|
818 | |||
789 | OSMagics.cd_force_quiet configuration option |
|
819 | OSMagics.cd_force_quiet configuration option | |
790 | -------------------------------------------- |
|
820 | -------------------------------------------- | |
791 |
|
821 | |||
792 | You can set this option to force the %cd magic to behave as if ``-q`` was passed: |
|
822 | You can set this option to force the %cd magic to behave as if ``-q`` was passed: | |
793 | :: |
|
823 | :: | |
794 |
|
824 | |||
795 | In [1]: cd / |
|
825 | In [1]: cd / | |
796 | / |
|
826 | / | |
797 |
|
827 | |||
798 | In [2]: %config OSMagics.cd_force_quiet = True |
|
828 | In [2]: %config OSMagics.cd_force_quiet = True | |
799 |
|
829 | |||
800 | In [3]: cd /tmp |
|
830 | In [3]: cd /tmp | |
801 |
|
831 | |||
802 | In [4]: |
|
832 | In [4]: | |
803 |
|
833 | |||
804 | See :ghpull:`11491` |
|
834 | See :ghpull:`11491` | |
805 |
|
835 | |||
806 | In vi editing mode, whether the prompt includes the current vi mode can now be configured |
|
836 | In vi editing mode, whether the prompt includes the current vi mode can now be configured | |
807 | ----------------------------------------------------------------------------------------- |
|
837 | ----------------------------------------------------------------------------------------- | |
808 |
|
838 | |||
809 | Set the ``TerminalInteractiveShell.prompt_includes_vi_mode`` to a boolean value |
|
839 | Set the ``TerminalInteractiveShell.prompt_includes_vi_mode`` to a boolean value | |
810 | (default: True) to control this feature. See :ghpull:`11492` |
|
840 | (default: True) to control this feature. See :ghpull:`11492` | |
811 |
|
841 | |||
812 | .. _whatsnew710: |
|
842 | .. _whatsnew710: | |
813 |
|
843 | |||
814 | IPython 7.1.0 |
|
844 | IPython 7.1.0 | |
815 | ============= |
|
845 | ============= | |
816 |
|
846 | |||
817 | IPython 7.1.0 is the first minor release after 7.0.0 and mostly brings fixes to |
|
847 | IPython 7.1.0 is the first minor release after 7.0.0 and mostly brings fixes to | |
818 | new features, internal refactoring, and fixes for regressions that happened during the 6.x->7.x |
|
848 | new features, internal refactoring, and fixes for regressions that happened during the 6.x->7.x | |
819 | transition. It also brings **Compatibility with Python 3.7.1**, as we're |
|
849 | transition. It also brings **Compatibility with Python 3.7.1**, as we're | |
820 | unwillingly relying on a bug in CPython. |
|
850 | unwillingly relying on a bug in CPython. | |
821 |
|
851 | |||
822 | New Core Dev: |
|
852 | New Core Dev: | |
823 |
|
853 | |||
824 | - We welcome Jonathan Slenders to the commiters. Jonathan has done a fantastic |
|
854 | - We welcome Jonathan Slenders to the commiters. Jonathan has done a fantastic | |
825 | work on prompt_toolkit, and we'd like to recognise his impact by giving him |
|
855 | work on prompt_toolkit, and we'd like to recognise his impact by giving him | |
826 | commit rights. :ghissue:`11397` |
|
856 | commit rights. :ghissue:`11397` | |
827 |
|
857 | |||
828 | Notable Changes |
|
858 | Notable Changes | |
829 |
|
859 | |||
830 | - Major update of "latex to unicode" tab completion map (see below) |
|
860 | - Major update of "latex to unicode" tab completion map (see below) | |
831 |
|
861 | |||
832 | Notable New Features: |
|
862 | Notable New Features: | |
833 |
|
863 | |||
834 | - Restore functionality and documentation of the **sphinx directive**, which |
|
864 | - Restore functionality and documentation of the **sphinx directive**, which | |
835 | is now stricter (fail on error by daefault), has new configuration options, |
|
865 | is now stricter (fail on error by daefault), has new configuration options, | |
836 | has a brand new documentation page :ref:`ipython_directive` (which needs |
|
866 | has a brand new documentation page :ref:`ipython_directive` (which needs | |
837 | some cleanup). It is also now *tested* so we hope to have less regressions. |
|
867 | some cleanup). It is also now *tested* so we hope to have less regressions. | |
838 | :ghpull:`11402` |
|
868 | :ghpull:`11402` | |
839 |
|
869 | |||
840 | - ``IPython.display.Video`` now supports ``width`` and ``height`` arguments, |
|
870 | - ``IPython.display.Video`` now supports ``width`` and ``height`` arguments, | |
841 | allowing a custom width and height to be set instead of using the video's |
|
871 | allowing a custom width and height to be set instead of using the video's | |
842 | width and height. :ghpull:`11353` |
|
872 | width and height. :ghpull:`11353` | |
843 |
|
873 | |||
844 | - Warn when using ``HTML('<iframe>')`` instead of ``IFrame`` :ghpull:`11350` |
|
874 | - Warn when using ``HTML('<iframe>')`` instead of ``IFrame`` :ghpull:`11350` | |
845 |
|
875 | |||
846 | - Allow Dynamic switching of editing mode between vi/emacs and show |
|
876 | - Allow Dynamic switching of editing mode between vi/emacs and show | |
847 | normal/input mode in prompt when using vi. :ghpull:`11390`. Use ``%config |
|
877 | normal/input mode in prompt when using vi. :ghpull:`11390`. Use ``%config | |
848 | TerminalInteractiveShell.editing_mode = 'vi'`` or ``%config |
|
878 | TerminalInteractiveShell.editing_mode = 'vi'`` or ``%config | |
849 | TerminalInteractiveShell.editing_mode = 'emacs'`` to dynamically switch |
|
879 | TerminalInteractiveShell.editing_mode = 'emacs'`` to dynamically switch | |
850 | between modes. |
|
880 | between modes. | |
851 |
|
881 | |||
852 |
|
882 | |||
853 | Notable Fixes: |
|
883 | Notable Fixes: | |
854 |
|
884 | |||
855 | - Fix entering of **multi-line blocks in terminal** IPython, and various |
|
885 | - Fix entering of **multi-line blocks in terminal** IPython, and various | |
856 | crashes in the new input transformation machinery :ghpull:`11354`, |
|
886 | crashes in the new input transformation machinery :ghpull:`11354`, | |
857 | :ghpull:`11356`, :ghpull:`11358`. These also fix a **Compatibility bug |
|
887 | :ghpull:`11356`, :ghpull:`11358`. These also fix a **Compatibility bug | |
858 | with Python 3.7.1**. |
|
888 | with Python 3.7.1**. | |
859 |
|
889 | |||
860 | - Fix moving through generator stack in ipdb :ghpull:`11266` |
|
890 | - Fix moving through generator stack in ipdb :ghpull:`11266` | |
861 |
|
891 | |||
862 | - %Magic command arguments now support quoting. :ghpull:`11330` |
|
892 | - %Magic command arguments now support quoting. :ghpull:`11330` | |
863 |
|
893 | |||
864 | - Re-add ``rprint`` and ``rprinte`` aliases. :ghpull:`11331` |
|
894 | - Re-add ``rprint`` and ``rprinte`` aliases. :ghpull:`11331` | |
865 |
|
895 | |||
866 | - Remove implicit dependency on ``ipython_genutils`` :ghpull:`11317` |
|
896 | - Remove implicit dependency on ``ipython_genutils`` :ghpull:`11317` | |
867 |
|
897 | |||
868 | - Make ``nonlocal`` raise ``SyntaxError`` instead of silently failing in async |
|
898 | - Make ``nonlocal`` raise ``SyntaxError`` instead of silently failing in async | |
869 | mode. :ghpull:`11382` |
|
899 | mode. :ghpull:`11382` | |
870 |
|
900 | |||
871 | - Fix mishandling of magics and ``= !`` assignment just after a dedent in |
|
901 | - Fix mishandling of magics and ``= !`` assignment just after a dedent in | |
872 | nested code blocks :ghpull:`11418` |
|
902 | nested code blocks :ghpull:`11418` | |
873 |
|
903 | |||
874 | - Fix instructions for custom shortcuts :ghpull:`11426` |
|
904 | - Fix instructions for custom shortcuts :ghpull:`11426` | |
875 |
|
905 | |||
876 |
|
906 | |||
877 | Notable Internals improvements: |
|
907 | Notable Internals improvements: | |
878 |
|
908 | |||
879 | - Use of ``os.scandir`` (Python 3 only) to speed up some file system operations. |
|
909 | - Use of ``os.scandir`` (Python 3 only) to speed up some file system operations. | |
880 | :ghpull:`11365` |
|
910 | :ghpull:`11365` | |
881 |
|
911 | |||
882 | - use ``perf_counter`` instead of ``clock`` for more precise |
|
912 | - use ``perf_counter`` instead of ``clock`` for more precise | |
883 | timing results with ``%time`` :ghpull:`11376` |
|
913 | timing results with ``%time`` :ghpull:`11376` | |
884 |
|
914 | |||
885 | Many thanks to all the contributors and in particular to ``bartskowron`` and |
|
915 | Many thanks to all the contributors and in particular to ``bartskowron`` and | |
886 | ``tonyfast`` who handled some pretty complicated bugs in the input machinery. We |
|
916 | ``tonyfast`` who handled some pretty complicated bugs in the input machinery. We | |
887 | had a number of first time contributors and maybe hacktoberfest participants that |
|
917 | had a number of first time contributors and maybe hacktoberfest participants that | |
888 | made significant contributions and helped us free some time to focus on more |
|
918 | made significant contributions and helped us free some time to focus on more | |
889 | complicated bugs. |
|
919 | complicated bugs. | |
890 |
|
920 | |||
891 | You |
|
921 | You | |
892 | can see all the closed issues and Merged PR, new features and fixes `here |
|
922 | can see all the closed issues and Merged PR, new features and fixes `here | |
893 | <https://github.com/ipython/ipython/issues?utf8=%E2%9C%93&q=+is%3Aclosed+milestone%3A7.1+>`_. |
|
923 | <https://github.com/ipython/ipython/issues?utf8=%E2%9C%93&q=+is%3Aclosed+milestone%3A7.1+>`_. | |
894 |
|
924 | |||
895 | Unicode Completion update |
|
925 | Unicode Completion update | |
896 | ------------------------- |
|
926 | ------------------------- | |
897 |
|
927 | |||
898 | In IPython 7.1 the Unicode completion map has been updated and synchronized with |
|
928 | In IPython 7.1 the Unicode completion map has been updated and synchronized with | |
899 | the Julia language. |
|
929 | the Julia language. | |
900 |
|
930 | |||
901 | Added and removed character characters: |
|
931 | Added and removed character characters: | |
902 |
|
932 | |||
903 | ``\jmath`` (``Θ·``), ``\\underleftrightarrow`` (U+034D, combining) have been |
|
933 | ``\jmath`` (``Θ·``), ``\\underleftrightarrow`` (U+034D, combining) have been | |
904 | added, while ``\\textasciicaron`` have been removed |
|
934 | added, while ``\\textasciicaron`` have been removed | |
905 |
|
935 | |||
906 | Some sequences have seen their prefix removed: |
|
936 | Some sequences have seen their prefix removed: | |
907 |
|
937 | |||
908 | - 6 characters ``\text...<tab>`` should now be inputed with ``\...<tab>`` directly, |
|
938 | - 6 characters ``\text...<tab>`` should now be inputed with ``\...<tab>`` directly, | |
909 | - 45 characters ``\Elz...<tab>`` should now be inputed with ``\...<tab>`` directly, |
|
939 | - 45 characters ``\Elz...<tab>`` should now be inputed with ``\...<tab>`` directly, | |
910 | - 65 characters ``\B...<tab>`` should now be inputed with ``\...<tab>`` directly, |
|
940 | - 65 characters ``\B...<tab>`` should now be inputed with ``\...<tab>`` directly, | |
911 | - 450 characters ``\m...<tab>`` should now be inputed with ``\...<tab>`` directly, |
|
941 | - 450 characters ``\m...<tab>`` should now be inputed with ``\...<tab>`` directly, | |
912 |
|
942 | |||
913 | Some sequences have seen their prefix shortened: |
|
943 | Some sequences have seen their prefix shortened: | |
914 |
|
944 | |||
915 | - 5 characters ``\mitBbb...<tab>`` should now be inputed with ``\bbi...<tab>`` directly, |
|
945 | - 5 characters ``\mitBbb...<tab>`` should now be inputed with ``\bbi...<tab>`` directly, | |
916 | - 52 characters ``\mit...<tab>`` should now be inputed with ``\i...<tab>`` directly, |
|
946 | - 52 characters ``\mit...<tab>`` should now be inputed with ``\i...<tab>`` directly, | |
917 | - 216 characters ``\mbfit...<tab>`` should now be inputed with ``\bi...<tab>`` directly, |
|
947 | - 216 characters ``\mbfit...<tab>`` should now be inputed with ``\bi...<tab>`` directly, | |
918 | - 222 characters ``\mbf...<tab>`` should now be inputed with ``\b...<tab>`` directly, |
|
948 | - 222 characters ``\mbf...<tab>`` should now be inputed with ``\b...<tab>`` directly, | |
919 |
|
949 | |||
920 | A couple of characters had their sequence simplified: |
|
950 | A couple of characters had their sequence simplified: | |
921 |
|
951 | |||
922 | - ``Γ°``, type ``\dh<tab>``, instead of ``\eth<tab>`` |
|
952 | - ``Γ°``, type ``\dh<tab>``, instead of ``\eth<tab>`` | |
923 | - ``Δ§``, type ``\hbar<tab>``, instead of ``\Elzxh<tab>`` |
|
953 | - ``Δ§``, type ``\hbar<tab>``, instead of ``\Elzxh<tab>`` | |
924 | - ``ΙΈ``, type ``\ltphi<tab>``, instead of ``\textphi<tab>`` |
|
954 | - ``ΙΈ``, type ``\ltphi<tab>``, instead of ``\textphi<tab>`` | |
925 | - ``Ο΄``, type ``\varTheta<tab>``, instead of ``\textTheta<tab>`` |
|
955 | - ``Ο΄``, type ``\varTheta<tab>``, instead of ``\textTheta<tab>`` | |
926 | - ``β``, type ``\eulermascheroni<tab>``, instead of ``\Eulerconst<tab>`` |
|
956 | - ``β``, type ``\eulermascheroni<tab>``, instead of ``\Eulerconst<tab>`` | |
927 | - ``β``, type ``\planck<tab>``, instead of ``\Planckconst<tab>`` |
|
957 | - ``β``, type ``\planck<tab>``, instead of ``\Planckconst<tab>`` | |
928 |
|
958 | |||
929 | - U+0336 (COMBINING LONG STROKE OVERLAY), type ``\strike<tab>``, instead of ``\Elzbar<tab>``. |
|
959 | - U+0336 (COMBINING LONG STROKE OVERLAY), type ``\strike<tab>``, instead of ``\Elzbar<tab>``. | |
930 |
|
960 | |||
931 | A couple of sequences have been updated: |
|
961 | A couple of sequences have been updated: | |
932 |
|
962 | |||
933 | - ``\varepsilon`` now gives ``Ι`` (GREEK SMALL LETTER EPSILON) instead of ``Ξ΅`` (GREEK LUNATE EPSILON SYMBOL), |
|
963 | - ``\varepsilon`` now gives ``Ι`` (GREEK SMALL LETTER EPSILON) instead of ``Ξ΅`` (GREEK LUNATE EPSILON SYMBOL), | |
934 | - ``\underbar`` now gives U+0331 (COMBINING MACRON BELOW) instead of U+0332 (COMBINING LOW LINE). |
|
964 | - ``\underbar`` now gives U+0331 (COMBINING MACRON BELOW) instead of U+0332 (COMBINING LOW LINE). | |
935 |
|
965 | |||
936 |
|
966 | |||
937 | .. _whatsnew700: |
|
967 | .. _whatsnew700: | |
938 |
|
968 | |||
939 | IPython 7.0.0 |
|
969 | IPython 7.0.0 | |
940 | ============= |
|
970 | ============= | |
941 |
|
971 | |||
942 | Released Thursday September 27th, 2018 |
|
972 | Released Thursday September 27th, 2018 | |
943 |
|
973 | |||
944 | IPython 7 includes major feature improvements. |
|
974 | IPython 7 includes major feature improvements. | |
945 | This is also the second major version of IPython to support only |
|
975 | This is also the second major version of IPython to support only | |
946 | Python 3 βΒ starting at Python 3.4. Python 2 is still community-supported |
|
976 | Python 3 βΒ starting at Python 3.4. Python 2 is still community-supported | |
947 | on the bugfix only 5.x branch, but we remind you that Python 2 "end of life" |
|
977 | on the bugfix only 5.x branch, but we remind you that Python 2 "end of life" | |
948 | is on Jan 1st 2020. |
|
978 | is on Jan 1st 2020. | |
949 |
|
979 | |||
950 | We were able to backport bug fixes to the 5.x branch thanks to our backport bot which |
|
980 | We were able to backport bug fixes to the 5.x branch thanks to our backport bot which | |
951 | backported more than `70 Pull-Requests |
|
981 | backported more than `70 Pull-Requests | |
952 | <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>`_ |
|
982 | <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>`_ | |
953 |
|
983 | |||
954 | The IPython 6.x branch will likely not see any further release unless critical |
|
984 | The IPython 6.x branch will likely not see any further release unless critical | |
955 | bugs are found. |
|
985 | bugs are found. | |
956 |
|
986 | |||
957 | Make sure you have pip > 9.0 before upgrading. You should be able to update by running: |
|
987 | Make sure you have pip > 9.0 before upgrading. You should be able to update by running: | |
958 |
|
988 | |||
959 | .. code:: |
|
989 | .. code:: | |
960 |
|
990 | |||
961 | pip install ipython --upgrade |
|
991 | pip install ipython --upgrade | |
962 |
|
992 | |||
963 | .. only:: ipydev |
|
993 | .. only:: ipydev | |
964 |
|
994 | |||
965 | If you are trying to install or update an ``alpha``, ``beta``, or ``rc`` |
|
995 | If you are trying to install or update an ``alpha``, ``beta``, or ``rc`` | |
966 | version, use pip ``--pre`` flag. |
|
996 | version, use pip ``--pre`` flag. | |
967 |
|
997 | |||
968 | .. code:: |
|
998 | .. code:: | |
969 |
|
999 | |||
970 | pip install ipython --upgrade --pre |
|
1000 | pip install ipython --upgrade --pre | |
971 |
|
1001 | |||
972 |
|
1002 | |||
973 | Or, if you have conda installed: |
|
1003 | Or, if you have conda installed: | |
974 |
|
1004 | |||
975 | .. code:: |
|
1005 | .. code:: | |
976 |
|
1006 | |||
977 | conda install ipython |
|
1007 | conda install ipython | |
978 |
|
1008 | |||
979 |
|
1009 | |||
980 |
|
1010 | |||
981 | Prompt Toolkit 2.0 |
|
1011 | Prompt Toolkit 2.0 | |
982 | ------------------ |
|
1012 | ------------------ | |
983 |
|
1013 | |||
984 | IPython 7.0+ now uses ``prompt_toolkit 2.0``. If you still need to use an earlier |
|
1014 | IPython 7.0+ now uses ``prompt_toolkit 2.0``. If you still need to use an earlier | |
985 | ``prompt_toolkit`` version, you may need to pin IPython to ``<7.0``. |
|
1015 | ``prompt_toolkit`` version, you may need to pin IPython to ``<7.0``. | |
986 |
|
1016 | |||
987 | Autowait: Asynchronous REPL |
|
1017 | Autowait: Asynchronous REPL | |
988 | --------------------------- |
|
1018 | --------------------------- | |
989 |
|
1019 | |||
990 | Staring with IPython 7.0 on Python 3.6+, IPython can automatically ``await`` |
|
1020 | Staring with IPython 7.0 on Python 3.6+, IPython can automatically ``await`` | |
991 | top level code. You should not need to access an event loop or runner |
|
1021 | top level code. You should not need to access an event loop or runner | |
992 | yourself. To learn more, read the :ref:`autoawait` section of our docs, see |
|
1022 | yourself. To learn more, read the :ref:`autoawait` section of our docs, see | |
993 | :ghpull:`11265`, or try the following code:: |
|
1023 | :ghpull:`11265`, or try the following code:: | |
994 |
|
1024 | |||
995 | Python 3.6.0 |
|
1025 | Python 3.6.0 | |
996 | Type 'copyright', 'credits' or 'license' for more information |
|
1026 | Type 'copyright', 'credits' or 'license' for more information | |
997 | IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help. |
|
1027 | IPython 7.0.0 -- An enhanced Interactive Python. Type '?' for help. | |
998 |
|
1028 | |||
999 | In [1]: import aiohttp |
|
1029 | In [1]: import aiohttp | |
1000 | ...: result = aiohttp.get('https://api.github.com') |
|
1030 | ...: result = aiohttp.get('https://api.github.com') | |
1001 |
|
1031 | |||
1002 | In [2]: response = await result |
|
1032 | In [2]: response = await result | |
1003 | <pause for a few 100s ms> |
|
1033 | <pause for a few 100s ms> | |
1004 |
|
1034 | |||
1005 | In [3]: await response.json() |
|
1035 | In [3]: await response.json() | |
1006 | Out[3]: |
|
1036 | Out[3]: | |
1007 | {'authorizations_url': 'https://api.github.com/authorizations', |
|
1037 | {'authorizations_url': 'https://api.github.com/authorizations', | |
1008 | 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}', |
|
1038 | 'code_search_url': 'https://api.github.com/search/code?q={query}{&page,per_page,sort,order}', | |
1009 | ... |
|
1039 | ... | |
1010 | } |
|
1040 | } | |
1011 |
|
1041 | |||
1012 | .. note:: |
|
1042 | .. note:: | |
1013 |
|
1043 | |||
1014 | Async integration is experimental code, behavior may change or be removed |
|
1044 | Async integration is experimental code, behavior may change or be removed | |
1015 | between Python and IPython versions without warnings. |
|
1045 | between Python and IPython versions without warnings. | |
1016 |
|
1046 | |||
1017 | Integration is by default with `asyncio`, but other libraries can be configured -- |
|
1047 | Integration is by default with `asyncio`, but other libraries can be configured -- | |
1018 | like ``curio`` or ``trio`` -- to improve concurrency in the REPL:: |
|
1048 | like ``curio`` or ``trio`` -- to improve concurrency in the REPL:: | |
1019 |
|
1049 | |||
1020 | In [1]: %autoawait trio |
|
1050 | In [1]: %autoawait trio | |
1021 |
|
1051 | |||
1022 | In [2]: import trio |
|
1052 | In [2]: import trio | |
1023 |
|
1053 | |||
1024 | In [3]: async def child(i): |
|
1054 | In [3]: async def child(i): | |
1025 | ...: print(" child %s goes to sleep"%i) |
|
1055 | ...: print(" child %s goes to sleep"%i) | |
1026 | ...: await trio.sleep(2) |
|
1056 | ...: await trio.sleep(2) | |
1027 | ...: print(" child %s wakes up"%i) |
|
1057 | ...: print(" child %s wakes up"%i) | |
1028 |
|
1058 | |||
1029 | In [4]: print('parent start') |
|
1059 | In [4]: print('parent start') | |
1030 | ...: async with trio.open_nursery() as n: |
|
1060 | ...: async with trio.open_nursery() as n: | |
1031 | ...: for i in range(3): |
|
1061 | ...: for i in range(3): | |
1032 | ...: n.spawn(child, i) |
|
1062 | ...: n.spawn(child, i) | |
1033 | ...: print('parent end') |
|
1063 | ...: print('parent end') | |
1034 | parent start |
|
1064 | parent start | |
1035 | child 2 goes to sleep |
|
1065 | child 2 goes to sleep | |
1036 | child 0 goes to sleep |
|
1066 | child 0 goes to sleep | |
1037 | child 1 goes to sleep |
|
1067 | child 1 goes to sleep | |
1038 | <about 2 seconds pause> |
|
1068 | <about 2 seconds pause> | |
1039 | child 2 wakes up |
|
1069 | child 2 wakes up | |
1040 | child 1 wakes up |
|
1070 | child 1 wakes up | |
1041 | child 0 wakes up |
|
1071 | child 0 wakes up | |
1042 | parent end |
|
1072 | parent end | |
1043 |
|
1073 | |||
1044 | See :ref:`autoawait` for more information. |
|
1074 | See :ref:`autoawait` for more information. | |
1045 |
|
1075 | |||
1046 |
|
1076 | |||
1047 | Asynchronous code in a Notebook interface or any other frontend using the |
|
1077 | Asynchronous code in a Notebook interface or any other frontend using the | |
1048 | Jupyter Protocol will require further updates to the IPykernel package. |
|
1078 | Jupyter Protocol will require further updates to the IPykernel package. | |
1049 |
|
1079 | |||
1050 | Non-Asynchronous code |
|
1080 | Non-Asynchronous code | |
1051 | ~~~~~~~~~~~~~~~~~~~~~ |
|
1081 | ~~~~~~~~~~~~~~~~~~~~~ | |
1052 |
|
1082 | |||
1053 | As the internal API of IPython is now asynchronous, IPython needs to run under |
|
1083 | As the internal API of IPython is now asynchronous, IPython needs to run under | |
1054 | an event loop. In order to allow many workflows, (like using the :magic:`%run` |
|
1084 | an event loop. In order to allow many workflows, (like using the :magic:`%run` | |
1055 | magic, or copy-pasting code that explicitly starts/stop event loop), when |
|
1085 | magic, or copy-pasting code that explicitly starts/stop event loop), when | |
1056 | top-level code is detected as not being asynchronous, IPython code is advanced |
|
1086 | top-level code is detected as not being asynchronous, IPython code is advanced | |
1057 | via a pseudo-synchronous runner, and may not advance pending tasks. |
|
1087 | via a pseudo-synchronous runner, and may not advance pending tasks. | |
1058 |
|
1088 | |||
1059 | Change to Nested Embed |
|
1089 | Change to Nested Embed | |
1060 | ~~~~~~~~~~~~~~~~~~~~~~ |
|
1090 | ~~~~~~~~~~~~~~~~~~~~~~ | |
1061 |
|
1091 | |||
1062 | The introduction of the ability to run async code had some effect on the |
|
1092 | The introduction of the ability to run async code had some effect on the | |
1063 | ``IPython.embed()`` API. By default, embed will not allow you to run asynchronous |
|
1093 | ``IPython.embed()`` API. By default, embed will not allow you to run asynchronous | |
1064 | code unless an event loop is specified. |
|
1094 | code unless an event loop is specified. | |
1065 |
|
1095 | |||
1066 | Effects on Magics |
|
1096 | Effects on Magics | |
1067 | ~~~~~~~~~~~~~~~~~ |
|
1097 | ~~~~~~~~~~~~~~~~~ | |
1068 |
|
1098 | |||
1069 | Some magics will not work with async until they're updated. |
|
1099 | Some magics will not work with async until they're updated. | |
1070 | Contributions welcome. |
|
1100 | Contributions welcome. | |
1071 |
|
1101 | |||
1072 | Expected Future changes |
|
1102 | Expected Future changes | |
1073 | ~~~~~~~~~~~~~~~~~~~~~~~ |
|
1103 | ~~~~~~~~~~~~~~~~~~~~~~~ | |
1074 |
|
1104 | |||
1075 | We expect more internal but public IPython functions to become ``async``, and |
|
1105 | We expect more internal but public IPython functions to become ``async``, and | |
1076 | will likely end up having a persistent event loop while IPython is running. |
|
1106 | will likely end up having a persistent event loop while IPython is running. | |
1077 |
|
1107 | |||
1078 | Thanks |
|
1108 | Thanks | |
1079 | ~~~~~~ |
|
1109 | ~~~~~~ | |
1080 |
|
1110 | |||
1081 | This release took more than a year in the making. |
|
1111 | This release took more than a year in the making. | |
1082 | The code was rebased a number of |
|
1112 | The code was rebased a number of | |
1083 | times; leading to commit authorship that may have been lost in the final |
|
1113 | times; leading to commit authorship that may have been lost in the final | |
1084 | Pull-Request. Huge thanks to many people for contribution, discussion, code, |
|
1114 | Pull-Request. Huge thanks to many people for contribution, discussion, code, | |
1085 | documentation, use-cases: dalejung, danielballan, ellisonbg, fperez, gnestor, |
|
1115 | documentation, use-cases: dalejung, danielballan, ellisonbg, fperez, gnestor, | |
1086 | minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many others. |
|
1116 | minrk, njsmith, pganssle, tacaswell, takluyver , vidartf ... And many others. | |
1087 |
|
1117 | |||
1088 |
|
1118 | |||
1089 | Autoreload Improvement |
|
1119 | Autoreload Improvement | |
1090 | ---------------------- |
|
1120 | ---------------------- | |
1091 |
|
1121 | |||
1092 | The magic :magic:`%autoreload 2 <autoreload>` now captures new methods added to |
|
1122 | The magic :magic:`%autoreload 2 <autoreload>` now captures new methods added to | |
1093 | classes. Earlier, only methods existing as of the initial import were being |
|
1123 | classes. Earlier, only methods existing as of the initial import were being | |
1094 | tracked and updated. |
|
1124 | tracked and updated. | |
1095 |
|
1125 | |||
1096 | This new feature helps dual environment development - Jupyter+IDE - where the |
|
1126 | This new feature helps dual environment development - Jupyter+IDE - where the | |
1097 | code gradually moves from notebook cells to package files as it gets |
|
1127 | code gradually moves from notebook cells to package files as it gets | |
1098 | structured. |
|
1128 | structured. | |
1099 |
|
1129 | |||
1100 | **Example**: An instance of the class ``MyClass`` will be able to access the |
|
1130 | **Example**: An instance of the class ``MyClass`` will be able to access the | |
1101 | method ``cube()`` after it is uncommented and the file ``file1.py`` is saved on |
|
1131 | method ``cube()`` after it is uncommented and the file ``file1.py`` is saved on | |
1102 | disk. |
|
1132 | disk. | |
1103 |
|
1133 | |||
1104 |
|
1134 | |||
1105 | .. code:: |
|
1135 | .. code:: | |
1106 |
|
1136 | |||
1107 | # notebook |
|
1137 | # notebook | |
1108 |
|
1138 | |||
1109 | from mymodule import MyClass |
|
1139 | from mymodule import MyClass | |
1110 | first = MyClass(5) |
|
1140 | first = MyClass(5) | |
1111 |
|
1141 | |||
1112 | .. code:: |
|
1142 | .. code:: | |
1113 |
|
1143 | |||
1114 | # mymodule/file1.py |
|
1144 | # mymodule/file1.py | |
1115 |
|
1145 | |||
1116 | class MyClass: |
|
1146 | class MyClass: | |
1117 |
|
1147 | |||
1118 | def __init__(self, a=10): |
|
1148 | def __init__(self, a=10): | |
1119 | self.a = a |
|
1149 | self.a = a | |
1120 |
|
1150 | |||
1121 | def square(self): |
|
1151 | def square(self): | |
1122 | print('compute square') |
|
1152 | print('compute square') | |
1123 | return self.a*self.a |
|
1153 | return self.a*self.a | |
1124 |
|
1154 | |||
1125 | # def cube(self): |
|
1155 | # def cube(self): | |
1126 | # print('compute cube') |
|
1156 | # print('compute cube') | |
1127 | # return self.a*self.a*self.a |
|
1157 | # return self.a*self.a*self.a | |
1128 |
|
1158 | |||
1129 |
|
1159 | |||
1130 |
|
1160 | |||
1131 |
|
1161 | |||
1132 | Misc |
|
1162 | Misc | |
1133 | ---- |
|
1163 | ---- | |
1134 |
|
1164 | |||
1135 | The autoindent feature that was deprecated in 5.x was re-enabled and |
|
1165 | The autoindent feature that was deprecated in 5.x was re-enabled and | |
1136 | un-deprecated in :ghpull:`11257` |
|
1166 | un-deprecated in :ghpull:`11257` | |
1137 |
|
1167 | |||
1138 | Make :magic:`%run -n -i ... <run>` work correctly. Earlier, if :magic:`%run` was |
|
1168 | Make :magic:`%run -n -i ... <run>` work correctly. Earlier, if :magic:`%run` was | |
1139 | passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308` |
|
1169 | passed both arguments, ``-n`` would be silently ignored. See :ghpull:`10308` | |
1140 |
|
1170 | |||
1141 |
|
1171 | |||
1142 | The :cellmagic:`%%script` (as well as :cellmagic:`%%bash`, |
|
1172 | The :cellmagic:`%%script` (as well as :cellmagic:`%%bash`, | |
1143 | :cellmagic:`%%ruby`... ) cell magics now raise by default if the return code of |
|
1173 | :cellmagic:`%%ruby`... ) cell magics now raise by default if the return code of | |
1144 | the given code is non-zero (thus halting execution of further cells in a |
|
1174 | the given code is non-zero (thus halting execution of further cells in a | |
1145 | notebook). The behavior can be disable by passing the ``--no-raise-error`` flag. |
|
1175 | notebook). The behavior can be disable by passing the ``--no-raise-error`` flag. | |
1146 |
|
1176 | |||
1147 |
|
1177 | |||
1148 | Deprecations |
|
1178 | Deprecations | |
1149 | ------------ |
|
1179 | ------------ | |
1150 |
|
1180 | |||
1151 | A couple of unused functions and methods have been deprecated and will be removed |
|
1181 | A couple of unused functions and methods have been deprecated and will be removed | |
1152 | in future versions: |
|
1182 | in future versions: | |
1153 |
|
1183 | |||
1154 | - ``IPython.utils.io.raw_print_err`` |
|
1184 | - ``IPython.utils.io.raw_print_err`` | |
1155 | - ``IPython.utils.io.raw_print`` |
|
1185 | - ``IPython.utils.io.raw_print`` | |
1156 |
|
1186 | |||
1157 |
|
1187 | |||
1158 | Backwards incompatible changes |
|
1188 | Backwards incompatible changes | |
1159 | ------------------------------ |
|
1189 | ------------------------------ | |
1160 |
|
1190 | |||
1161 | * The API for transforming input before it is parsed as Python code has been |
|
1191 | * The API for transforming input before it is parsed as Python code has been | |
1162 | completely redesigned: any custom input transformations will need to be |
|
1192 | completely redesigned: any custom input transformations will need to be | |
1163 | rewritten. See :doc:`/config/inputtransforms` for details of the new API. |
|
1193 | 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