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