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