Show More
@@ -1,20 +1,21 b'' | |||
|
1 | 1 | ===================== |
|
2 | 2 | Development version |
|
3 | 3 | ===================== |
|
4 | 4 | |
|
5 | 5 | This document describes in-flight development work. |
|
6 | 6 | |
|
7 | 7 | .. warning:: |
|
8 | 8 | |
|
9 | 9 | Please do not edit this file by hand (doing so will likely cause merge |
|
10 | 10 | conflicts for other Pull Requests). Instead, create a new file in the |
|
11 | 11 | `docs/source/whatsnew/pr` folder |
|
12 | 12 | |
|
13 | 13 | |
|
14 | ||
|
14 | 15 | .. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT. |
|
15 | 16 | |
|
16 | 17 | |
|
17 | 18 | Backwards incompatible changes |
|
18 | 19 | ------------------------------ |
|
19 | 20 | |
|
20 | 21 | .. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT. |
@@ -1,344 +1,346 b'' | |||
|
1 | 1 | ============ |
|
2 | 2 | 5.x Series |
|
3 | 3 | ============ |
|
4 | 4 | |
|
5 | .. _whatsnew540: | |
|
6 | ||
|
5 | 7 | IPython 5.4 |
|
6 | 8 | =========== |
|
7 | 9 | |
|
8 | 10 | IPython 5.4-LTS is the first release of IPython after the release of the 6.x |
|
9 | 11 | series which is Python 3 only. It backports most of the new exposed API |
|
10 | 12 | additions made in IPython 6.0 and 6.1 and avoid having to write conditional |
|
11 | 13 | logics depending of the version of IPython. |
|
12 | 14 | |
|
13 | 15 | Please upgrade to pip 9 or greater before upgrading IPython. |
|
14 | 16 | Failing to do so on Python 2 may lead to a broken IPython install. |
|
15 | 17 | |
|
16 | 18 | Configurable TerminalInteractiveShell |
|
17 | 19 | ------------------------------------- |
|
18 | 20 | |
|
19 | 21 | Backported from the 6.x branch as an exceptional new feature. See |
|
20 | 22 | :ghpull:`10373` and :ghissue:`10364` |
|
21 | 23 | |
|
22 | 24 | IPython gained a new ``c.TerminalIPythonApp.interactive_shell_class`` option |
|
23 | 25 | that allow to customize the class used to start the terminal frontend. This |
|
24 | 26 | should allow user to use custom interfaces, like reviving the former readline |
|
25 | 27 | interface which is now a separate package not maintained by the core team. |
|
26 | 28 | |
|
27 | 29 | |
|
28 | 30 | Define ``_repr_mimebundle_`` |
|
29 | 31 | ---------------------------- |
|
30 | 32 | |
|
31 | 33 | Object can now define `_repr_mimebundle_` in place of multiple `_repr_*_` |
|
32 | 34 | methods and return a full mimebundle. This greatly simplify many implementation |
|
33 | 35 | and allow to publish custom mimetypes (like geojson, plotly, dataframes....). |
|
34 | 36 | See the ``Cutom Display Logic`` example notebook for more informations. |
|
35 | 37 | |
|
36 | 38 | Execution Heuristics |
|
37 | 39 | -------------------- |
|
38 | 40 | |
|
39 | 41 | The heuristic for execution in the command line interface is now more biased |
|
40 | 42 | toward executing for single statement. While in IPython 4.x and before a single |
|
41 | 43 | line would be executed when enter is pressed, IPython 5.x would insert a new |
|
42 | 44 | line. For single line statement this is not true anymore and if a single line is |
|
43 | 45 | valid Python, IPython will execute it regardless of the cursor position. Use |
|
44 | 46 | :kbd:`Ctrl-O` to insert a new line. :ghpull:`10489` |
|
45 | 47 | |
|
46 | 48 | |
|
47 | 49 | Implement Display IDs |
|
48 | 50 | --------------------- |
|
49 | 51 | |
|
50 | 52 | Implement display id and ability to update a given display. This should greatly |
|
51 | 53 | simplify a lot of code by removing the need for widgets and allow other frontend |
|
52 | 54 | to implement things like progress-bars. See :ghpull:`10048` |
|
53 | 55 | |
|
54 | 56 | Miscs |
|
55 | 57 | ----- |
|
56 | 58 | |
|
57 | 59 | * ``_mp_main_`` is not reloaded which fixes issues with multiprocessing. |
|
58 | 60 | :ghpull:`10523` |
|
59 | 61 | * Use user colorscheme in Pdb as well :ghpull:`10479` |
|
60 | 62 | * Faster shutdown. :ghpull:`10408` |
|
61 | 63 | * Fix a crash in reverse search. :ghpull:`10371` |
|
62 | 64 | * added ``Completer.backslash_combining_completions`` boolean option to |
|
63 | 65 | deactivate backslash-tab completion that may conflict with windows path. |
|
64 | 66 | |
|
65 | 67 | IPython 5.3 |
|
66 | 68 | =========== |
|
67 | 69 | |
|
68 | 70 | Released on February 24th, 2017. Remarkable changes and fixes: |
|
69 | 71 | |
|
70 | 72 | * Fix a bug in ``set_next_input`` leading to a crash of terminal IPython. |
|
71 | 73 | :ghpull:`10231`, :ghissue:`10296`, :ghissue:`10229` |
|
72 | 74 | * Always wait for editor inputhook for terminal IPython :ghpull:`10239`, |
|
73 | 75 | :ghpull:`10240` |
|
74 | 76 | * Disable ``_ipython_display_`` in terminal :ghpull:`10249`, :ghpull:`10274` |
|
75 | 77 | * Update terminal colors to be more visible by default on windows |
|
76 | 78 | :ghpull:`10260`, :ghpull:`10238`, :ghissue:`10281` |
|
77 | 79 | * Add Ctrl-Z shortcut (suspend) in terminal debugger :ghpull:`10254`, |
|
78 | 80 | :ghissue:`10273` |
|
79 | 81 | * Indent on new line by looking at the text before the cursor :ghpull:`10264`, |
|
80 | 82 | :ghpull:`10275`, :ghissue:`9283` |
|
81 | 83 | * Update QtEventloop integration to fix some matplotlib integration issues |
|
82 | 84 | :ghpull:`10201`, :ghpull:`10311`, :ghissue:`10201` |
|
83 | 85 | * Respect completions display style in terminal debugger :ghpull:`10305`, |
|
84 | 86 | :ghpull:`10313` |
|
85 | 87 | * Add a config option ``TerminalInteractiveShell.extra_open_editor_shortcuts`` |
|
86 | 88 | to enable extra shortcuts to open the input in an editor. These are :kbd:`v` |
|
87 | 89 | in vi mode, and :kbd:`C-X C-E` in emacs mode (:ghpull:`10330`). |
|
88 | 90 | The :kbd:`F2` shortcut is always enabled. |
|
89 | 91 | |
|
90 | 92 | IPython 5.2.2 |
|
91 | 93 | ============= |
|
92 | 94 | |
|
93 | 95 | * Fix error when starting with ``IPCompleter.limit_to__all__`` configured. |
|
94 | 96 | |
|
95 | 97 | IPython 5.2.1 |
|
96 | 98 | ============= |
|
97 | 99 | |
|
98 | 100 | * Fix tab completion in the debugger. :ghpull:`10223` |
|
99 | 101 | |
|
100 | 102 | IPython 5.2 |
|
101 | 103 | =========== |
|
102 | 104 | |
|
103 | 105 | Released on January 29th, 2017. Remarkable changes and fixes: |
|
104 | 106 | |
|
105 | 107 | * restore IPython's debugger to raise on quit. :ghpull:`10009` |
|
106 | 108 | * The configuration value ``c.TerminalInteractiveShell.highlighting_style`` can |
|
107 | 109 | now directly take a class argument for custom color style. :ghpull:`9848` |
|
108 | 110 | * Correctly handle matplotlib figures dpi :ghpull:`9868` |
|
109 | 111 | * Deprecate ``-e`` flag for the ``%notebook`` magic that had no effects. |
|
110 | 112 | :ghpull:`9872` |
|
111 | 113 | * You can now press F2 while typing at a terminal prompt to edit the contents |
|
112 | 114 | in your favourite terminal editor. Set the :envvar:`EDITOR` environment |
|
113 | 115 | variable to pick which editor is used. :ghpull:`9929` |
|
114 | 116 | * sdists will now only be ``.tar.gz`` as per upstream PyPI requirements. |
|
115 | 117 | :ghpull:`9925` |
|
116 | 118 | * :any:`IPython.core.debugger` have gained a ``set_trace()`` method for |
|
117 | 119 | convenience. :ghpull:`9947` |
|
118 | 120 | * The 'smart command mode' added to the debugger in 5.0 was removed, as more |
|
119 | 121 | people preferred the previous behaviour. Therefore, debugger commands such as |
|
120 | 122 | ``c`` will act as debugger commands even when ``c`` is defined as a variable. |
|
121 | 123 | :ghpull:`10050` |
|
122 | 124 | * Fixes OS X event loop issues at startup, :ghpull:`10150` |
|
123 | 125 | * Deprecate the ``%autoindent`` magic. :ghpull:`10176` |
|
124 | 126 | * Emit a :any:`DeprecationWarning` when setting the deprecated |
|
125 | 127 | ``limit_to_all`` option of the completer. :ghpull:`10198` |
|
126 | 128 | * The :cellmagic:`capture` magic can now capture the result of a cell (from an |
|
127 | 129 | expression on the last line), as well as printed and displayed output. |
|
128 | 130 | :ghpull:`9851`. |
|
129 | 131 | |
|
130 | 132 | |
|
131 | 133 | Changes of behavior to :any:`InteractiveShellEmbed`. |
|
132 | 134 | |
|
133 | 135 | :any:`InteractiveShellEmbed` interactive behavior have changed a bit in between |
|
134 | 136 | 5.1 and 5.2. By default ``%kill_embedded`` magic will prevent further invocation |
|
135 | 137 | of the current ``call location`` instead of preventing further invocation of |
|
136 | 138 | the current instance creation location. For most use case this will not change |
|
137 | 139 | much for you, though previous behavior was confusing and less consistent with |
|
138 | 140 | previous IPython versions. |
|
139 | 141 | |
|
140 | 142 | You can now deactivate instances by using ``%kill_embedded --instance`` flag, |
|
141 | 143 | (or ``-i`` in short). The ``%kill_embedded`` magic also gained a |
|
142 | 144 | ``--yes``/``-y`` option which skip confirmation step, and ``-x``/``--exit`` |
|
143 | 145 | which also exit the current embedded call without asking for confirmation. |
|
144 | 146 | |
|
145 | 147 | See :ghpull:`10207`. |
|
146 | 148 | |
|
147 | 149 | |
|
148 | 150 | |
|
149 | 151 | IPython 5.1 |
|
150 | 152 | =========== |
|
151 | 153 | |
|
152 | 154 | * Broken ``%timeit`` on Python2 due to the use of ``__qualname__``. :ghpull:`9804` |
|
153 | 155 | * Restore ``%gui qt`` to create and return a ``QApplication`` if necessary. :ghpull:`9789` |
|
154 | 156 | * Don't set terminal title by default. :ghpull:`9801` |
|
155 | 157 | * Preserve indentation when inserting newlines with ``Ctrl-O``. :ghpull:`9770` |
|
156 | 158 | * Restore completion in debugger. :ghpull:`9785` |
|
157 | 159 | * Deprecate ``IPython.core.debugger.Tracer()`` in favor of simpler, newer, APIs. :ghpull:`9731` |
|
158 | 160 | * Restore ``NoOpContext`` context manager removed by mistake, and add `DeprecationWarning`. :ghpull:`9765` |
|
159 | 161 | * Add option allowing ``Prompt_toolkit`` to use 24bits colors. :ghpull:`9736` |
|
160 | 162 | * Fix for closing interactive matplotlib windows on OS X. :ghpull:`9854` |
|
161 | 163 | * An embedded interactive shell instance can be used more than once. :ghpull:`9843` |
|
162 | 164 | * More robust check for whether IPython is in a terminal. :ghpull:`9833` |
|
163 | 165 | * Better pretty-printing of dicts on PyPy. :ghpull:`9827` |
|
164 | 166 | * Some coloured output now looks better on dark background command prompts in Windows. |
|
165 | 167 | :ghpull:`9838` |
|
166 | 168 | * Improved tab completion of paths on Windows . :ghpull:`9826` |
|
167 | 169 | * Fix tkinter event loop integration on Python 2 with ``future`` installed. :ghpull:`9824` |
|
168 | 170 | * Restore ``Ctrl-\`` as a shortcut to quit IPython. |
|
169 | 171 | * Make ``get_ipython()`` accessible when modules are imported by startup files. :ghpull:`9818` |
|
170 | 172 | * Add support for running directories containing a ``__main__.py`` file with the |
|
171 | 173 | ``ipython`` command. :ghpull:`9813` |
|
172 | 174 | |
|
173 | 175 | |
|
174 | 176 | True Color feature |
|
175 | 177 | ------------------ |
|
176 | 178 | |
|
177 | 179 | ``prompt_toolkit`` uses pygments styles for syntax highlighting. By default, the |
|
178 | 180 | colors specified in the style are approximated using a standard 256-color |
|
179 | 181 | palette. ``prompt_toolkit`` also supports 24bit, a.k.a. "true", a.k.a. 16-million |
|
180 | 182 | color escape sequences which enable compatible terminals to display the exact |
|
181 | 183 | colors specified instead of an approximation. This true_color option exposes |
|
182 | 184 | that capability in prompt_toolkit to the IPython shell. |
|
183 | 185 | |
|
184 | 186 | Here is a good source for the current state of true color support in various |
|
185 | 187 | terminal emulators and software projects: https://gist.github.com/XVilka/8346728 |
|
186 | 188 | |
|
187 | 189 | |
|
188 | 190 | |
|
189 | 191 | IPython 5.0 |
|
190 | 192 | =========== |
|
191 | 193 | |
|
192 | 194 | Released July 7, 2016 |
|
193 | 195 | |
|
194 | 196 | New terminal interface |
|
195 | 197 | ---------------------- |
|
196 | 198 | |
|
197 | 199 | IPython 5 features a major upgrade to the terminal interface, bringing live |
|
198 | 200 | syntax highlighting as you type, proper multiline editing and multiline paste, |
|
199 | 201 | and tab completions that don't clutter up your history. |
|
200 | 202 | |
|
201 | 203 | .. image:: ../_images/ptshell_features.png |
|
202 | 204 | :alt: New terminal interface features |
|
203 | 205 | :align: center |
|
204 | 206 | :target: ../_images/ptshell_features.png |
|
205 | 207 | |
|
206 | 208 | These features are provided by the Python library `prompt_toolkit |
|
207 | 209 | <http://python-prompt-toolkit.readthedocs.io/en/stable/>`__, which replaces |
|
208 | 210 | ``readline`` throughout our terminal interface. |
|
209 | 211 | |
|
210 | 212 | Relying on this pure-Python, cross platform module also makes it simpler to |
|
211 | 213 | install IPython. We have removed dependencies on ``pyreadline`` for Windows and |
|
212 | 214 | ``gnureadline`` for Mac. |
|
213 | 215 | |
|
214 | 216 | Backwards incompatible changes |
|
215 | 217 | ------------------------------ |
|
216 | 218 | |
|
217 | 219 | - The ``%install_ext`` magic function, deprecated since 4.0, has now been deleted. |
|
218 | 220 | You can distribute and install extensions as packages on PyPI. |
|
219 | 221 | - Callbacks registered while an event is being handled will now only be called |
|
220 | 222 | for subsequent events; previously they could be called for the current event. |
|
221 | 223 | Similarly, callbacks removed while handling an event *will* always get that |
|
222 | 224 | event. See :ghissue:`9447` and :ghpull:`9453`. |
|
223 | 225 | - Integration with pydb has been removed since pydb development has been stopped |
|
224 | 226 | since 2012, and pydb is not installable from PyPI. |
|
225 | 227 | - The ``autoedit_syntax`` option has apparently been broken for many years. |
|
226 | 228 | It has been removed. |
|
227 | 229 | |
|
228 | 230 | New terminal interface |
|
229 | 231 | ~~~~~~~~~~~~~~~~~~~~~~ |
|
230 | 232 | |
|
231 | 233 | The overhaul of the terminal interface will probably cause a range of minor |
|
232 | 234 | issues for existing users. |
|
233 | 235 | This is inevitable for such a significant change, and we've done our best to |
|
234 | 236 | minimise these issues. |
|
235 | 237 | Some changes that we're aware of, with suggestions on how to handle them: |
|
236 | 238 | |
|
237 | 239 | IPython no longer uses readline configuration (``~/.inputrc``). We hope that |
|
238 | 240 | the functionality you want (e.g. vi input mode) will be available by configuring |
|
239 | 241 | IPython directly (see :doc:`/config/options/terminal`). |
|
240 | 242 | If something's missing, please file an issue. |
|
241 | 243 | |
|
242 | 244 | The ``PromptManager`` class has been removed, and the prompt machinery simplified. |
|
243 | 245 | See :ref:`custom_prompts` to customise prompts with the new machinery. |
|
244 | 246 | |
|
245 | 247 | :mod:`IPython.core.debugger` now provides a plainer interface. |
|
246 | 248 | :mod:`IPython.terminal.debugger` contains the terminal debugger using |
|
247 | 249 | prompt_toolkit. |
|
248 | 250 | |
|
249 | 251 | There are new options to configure the colours used in syntax highlighting. |
|
250 | 252 | We have tried to integrate them with our classic ``--colors`` option and |
|
251 | 253 | ``%colors`` magic, but there's a mismatch in possibilities, so some configurations |
|
252 | 254 | may produce unexpected results. See :ref:`termcolour` for more information. |
|
253 | 255 | |
|
254 | 256 | The new interface is not compatible with Emacs 'inferior-shell' feature. To |
|
255 | 257 | continue using this, add the ``--simple-prompt`` flag to the command Emacs |
|
256 | 258 | runs. This flag disables most IPython features, relying on Emacs to provide |
|
257 | 259 | things like tab completion. |
|
258 | 260 | |
|
259 | 261 | Provisional Changes |
|
260 | 262 | ------------------- |
|
261 | 263 | |
|
262 | 264 | Provisional changes are experimental functionality that may, or may not, make |
|
263 | 265 | it into a future version of IPython, and which API may change without warnings. |
|
264 | 266 | Activating these features and using these API are at your own risk, and may have |
|
265 | 267 | security implication for your system, especially if used with the Jupyter notebook, |
|
266 | 268 | |
|
267 | 269 | When running via the Jupyter notebook interfaces, or other compatible client, |
|
268 | 270 | you can enable rich documentation experimental functionality: |
|
269 | 271 | |
|
270 | 272 | When the ``docrepr`` package is installed setting the boolean flag |
|
271 | 273 | ``InteractiveShell.sphinxify_docstring`` to ``True``, will process the various |
|
272 | 274 | object through sphinx before displaying them (see the ``docrepr`` package |
|
273 | 275 | documentation for more information. |
|
274 | 276 | |
|
275 | 277 | You need to also enable the IPython pager display rich HTML representation |
|
276 | 278 | using the ``InteractiveShell.enable_html_pager`` boolean configuration option. |
|
277 | 279 | As usual you can set these configuration options globally in your configuration |
|
278 | 280 | files, alternatively you can turn them on dynamically using the following |
|
279 | 281 | snippet: |
|
280 | 282 | |
|
281 | 283 | .. code-block:: python |
|
282 | 284 | |
|
283 | 285 | ip = get_ipython() |
|
284 | 286 | ip.sphinxify_docstring = True |
|
285 | 287 | ip.enable_html_pager = True |
|
286 | 288 | |
|
287 | 289 | |
|
288 | 290 | You can test the effect of various combinations of the above configuration in |
|
289 | 291 | the Jupyter notebook, with things example like : |
|
290 | 292 | |
|
291 | 293 | .. code-block:: ipython |
|
292 | 294 | |
|
293 | 295 | import numpy as np |
|
294 | 296 | np.histogram? |
|
295 | 297 | |
|
296 | 298 | |
|
297 | 299 | This is part of an effort to make Documentation in Python richer and provide in |
|
298 | 300 | the long term if possible dynamic examples that can contain math, images, |
|
299 | 301 | widgets... As stated above this is nightly experimental feature with a lot of |
|
300 | 302 | (fun) problem to solve. We would be happy to get your feedback and expertise on |
|
301 | 303 | it. |
|
302 | 304 | |
|
303 | 305 | |
|
304 | 306 | |
|
305 | 307 | Deprecated Features |
|
306 | 308 | ------------------- |
|
307 | 309 | |
|
308 | 310 | Some deprecated features are listed in this section. Don't forget to enable |
|
309 | 311 | ``DeprecationWarning`` as an error if you are using IPython in a Continuous |
|
310 | 312 | Integration setup or in your testing in general: |
|
311 | 313 | |
|
312 | 314 | .. code-block:: python |
|
313 | 315 | |
|
314 | 316 | import warnings |
|
315 | 317 | warnings.filterwarnings('error', '.*', DeprecationWarning, module='yourmodule.*') |
|
316 | 318 | |
|
317 | 319 | |
|
318 | 320 | - ``hooks.fix_error_editor`` seems unused and is pending deprecation. |
|
319 | 321 | - `IPython/core/excolors.py:ExceptionColors` is deprecated. |
|
320 | 322 | - `IPython.core.InteractiveShell:write()` is deprecated; use `sys.stdout` instead. |
|
321 | 323 | - `IPython.core.InteractiveShell:write_err()` is deprecated; use `sys.stderr` instead. |
|
322 | 324 | - The `formatter` keyword argument to `Inspector.info` in `IPython.core.oinspec` has no effect. |
|
323 | 325 | - The `global_ns` keyword argument of IPython Embed was deprecated, and has no effect. Use `module` keyword argument instead. |
|
324 | 326 | |
|
325 | 327 | |
|
326 | 328 | Known Issues: |
|
327 | 329 | ------------- |
|
328 | 330 | |
|
329 | 331 | - ``<Esc>`` Key does not dismiss the completer and does not clear the current |
|
330 | 332 | buffer. This is an on purpose modification due to current technical |
|
331 | 333 | limitation. Cf :ghpull:`9572`. Escape the control character which is used |
|
332 | 334 | for other shortcut, and there is no practical way to distinguish. Use Ctr-G |
|
333 | 335 | or Ctrl-C as an alternative. |
|
334 | 336 | |
|
335 | 337 | - Cannot use ``Shift-Enter`` and ``Ctrl-Enter`` to submit code in terminal. cf |
|
336 | 338 | :ghissue:`9587` and :ghissue:`9401`. In terminal there is no practical way to |
|
337 | 339 | distinguish these key sequences from a normal new line return. |
|
338 | 340 | |
|
339 | 341 | - ``PageUp`` and ``pageDown`` do not move through completion menu. |
|
340 | 342 | |
|
341 | 343 | - Color styles might not adapt to terminal emulator themes. This will need new |
|
342 | 344 | version of Pygments to be released, and can be mitigated with custom themes. |
|
343 | 345 | |
|
344 | 346 |
@@ -1,188 +1,241 b'' | |||
|
1 | 1 | ============ |
|
2 | 2 | 6.x Series |
|
3 | 3 | ============ |
|
4 | 4 | |
|
5 | .. _whatsnew610: | |
|
6 | ||
|
7 | IPython 6.1 | |
|
8 | =========== | |
|
9 | ||
|
10 | - Quotes in a filename are always escaped during tab-completion on non-Windows. | |
|
11 | :ghpull:`10069` | |
|
12 | ||
|
13 | - Variables now shadow magics in autocompletion. See :ghissue:`4877` and :ghpull:`10542`. | |
|
14 | ||
|
15 | - Added the ability to add parameters to alias_magic. For example :: | |
|
16 | ||
|
17 | In [2]: %alias_magic hist history --params "-l 2" --line | |
|
18 | Created `%hist` as an alias for `%history -l 2`. | |
|
19 | ||
|
20 | In [3]: hist | |
|
21 | %alias_magic hist history --params "-l 30" --line | |
|
22 | %alias_magic hist history --params "-l 2" --line | |
|
23 | ||
|
24 | Previously it was only possible to have an alias attached to a single function, | |
|
25 | and you would have to pass in the given parameters every time:: | |
|
26 | ||
|
27 | In [4]: %alias_magic hist history --line | |
|
28 | Created `%hist` as an alias for `%history`. | |
|
29 | ||
|
30 | In [5]: hist -l 2 | |
|
31 | hist | |
|
32 | %alias_magic hist history --line | |
|
33 | ||
|
34 | - To suppress log state messages, you can now either use ``%logstart -q``, pass | |
|
35 | ``--LoggingMagics.quiet=True`` on the command line, or set | |
|
36 | ``c.LoggingMagics.quiet=True`` in your configuration file. | |
|
37 | ||
|
38 | - An additional flag ``--TerminalInteractiveShell.term_title_format`` is | |
|
39 | introduced to allow the user to control the format of the terminal title. It | |
|
40 | is specified as a python format string, and currently the only variable it | |
|
41 | will format is ``{cwd}``. | |
|
42 | ||
|
43 | ||
|
44 | The following changes were also added to IPython 5.4, see :ref:`what's new in IPython 5.4 <whatsnew540>` | |
|
45 | for more detail description: | |
|
46 | ||
|
47 | - ``TerminalInteractiveShell`` is configurable and can be configured to | |
|
48 | (re)-use the readline interface. | |
|
49 | ||
|
50 | - objects can now define a ``_repr_mimebundle_`` | |
|
51 | ||
|
52 | - Execution heuristics improve for single line statements | |
|
53 | - ``display()`` can now return a display id to update display areas. | |
|
54 | ||
|
55 | ||
|
56 | .. _whatsnew600: | |
|
57 | ||
|
5 | 58 | IPython 6.0 |
|
6 | 59 | =========== |
|
7 | 60 | |
|
8 | 61 | Released April 19th, 2017 |
|
9 | 62 | |
|
10 | 63 | IPython 6 features a major improvement in the completion machinery which is now |
|
11 | 64 | capable of completing non-executed code. It is also the first version of IPython |
|
12 | 65 | to stop compatibility with Python 2, which is still supported on the bugfix only |
|
13 | 66 | 5.x branch. Read below for a non-exhaustive list of new features. |
|
14 | 67 | |
|
15 | 68 | Make sure you have pip > 9.0 before upgrading. |
|
16 | 69 | You should be able to update by using: |
|
17 | 70 | |
|
18 | 71 | .. code:: |
|
19 | 72 | |
|
20 | 73 | pip install ipython --upgrade |
|
21 | 74 | |
|
22 | 75 | |
|
23 | 76 | .. note:: |
|
24 | 77 | |
|
25 | 78 | If your pip version is greater than or equal to pip 9.0.1 you will automatically get |
|
26 | 79 | the most recent version of IPython compatible with your system: on Python 2 you |
|
27 | 80 | will get the latest IPython 5.x bugfix, while in Python 3 |
|
28 | 81 | you will get the latest 6.x stable version. |
|
29 | 82 | |
|
30 | 83 | New completion API and Interface |
|
31 | 84 | -------------------------------- |
|
32 | 85 | |
|
33 | 86 | The completer Completion API has seen an overhaul, and the new completer has |
|
34 | 87 | plenty of improvements both from the end users of terminal IPython and for |
|
35 | 88 | consumers of the API. |
|
36 | 89 | |
|
37 | 90 | This new API is capable of pulling completions from :any:`jedi`, thus allowing |
|
38 | 91 | type inference on non-executed code. If :any:`jedi` is installed, completions like |
|
39 | 92 | the following are now possible without code evaluation: |
|
40 | 93 | |
|
41 | 94 | >>> data = ['Number of users', 123_456] |
|
42 | 95 | ... data[0].<tab> |
|
43 | 96 | |
|
44 | 97 | That is to say, IPython is now capable of inferring that `data[0]` is a string, |
|
45 | 98 | and will suggest completions like `.capitalize`. The completion power of IPython |
|
46 | 99 | will increase with new Jedi releases, and a number of bug-fixes and more completions |
|
47 | 100 | are already available on the development version of :any:`jedi` if you are curious. |
|
48 | 101 | |
|
49 | 102 | With the help of prompt toolkit, types of completions can be shown in the |
|
50 | 103 | completer interface: |
|
51 | 104 | |
|
52 | 105 | .. image:: ../_images/jedi_type_inference_60.png |
|
53 | 106 | :alt: Jedi showing ability to do type inference |
|
54 | 107 | :align: center |
|
55 | 108 | :width: 400px |
|
56 | 109 | :target: ../_images/jedi_type_inference_60.png |
|
57 | 110 | |
|
58 | 111 | The appearance of the completer is controlled by the |
|
59 | 112 | ``c.TerminalInteractiveShell.display_completions`` option that will show the |
|
60 | 113 | type differently depending on the value among ``'column'``, ``'multicolumn'`` |
|
61 | 114 | and ``'readlinelike'`` |
|
62 | 115 | |
|
63 | 116 | The use of Jedi also fulfills a number of requests and fixes a number of bugs |
|
64 | 117 | like case-insensitive completion and completion after division operator: See |
|
65 | 118 | :ghpull:`10182`. |
|
66 | 119 | |
|
67 | 120 | Extra patches and updates will be needed to the :mod:`ipykernel` package for |
|
68 | 121 | this feature to be available to other clients like Jupyter Notebook, Lab, |
|
69 | 122 | Nteract, Hydrogen... |
|
70 | 123 | |
|
71 | 124 | The use of Jedi should be barely noticeable on recent machines, but |
|
72 | 125 | can be slower on older ones. To tweak the performance, the amount |
|
73 | 126 | of time given to Jedi to compute type inference can be adjusted with |
|
74 | 127 | ``c.IPCompleter.jedi_compute_type_timeout``. The objects whose type were not |
|
75 | 128 | inferred will be shown as ``<unknown>``. Jedi can also be completely deactivated |
|
76 | 129 | by using the ``c.Completer.use_jedi=False`` option. |
|
77 | 130 | |
|
78 | 131 | |
|
79 | 132 | The old ``Completer.complete()`` API is waiting deprecation and should be |
|
80 | 133 | replaced replaced by ``Completer.completions()`` in the near future. Feedback on |
|
81 | 134 | the current state of the API and suggestions are welcome. |
|
82 | 135 | |
|
83 | 136 | Python 3 only codebase |
|
84 | 137 | ---------------------- |
|
85 | 138 | |
|
86 | 139 | One of the large challenges in IPython 6.0 has been the adoption of a pure |
|
87 | 140 | Python 3 codebase, which has led to upstream patches in pip, |
|
88 | 141 | pypi and warehouse to make sure Python 2 systems still upgrade to the latest |
|
89 | 142 | compatible Python version. |
|
90 | 143 | |
|
91 | 144 | We remind our Python 2 users that IPython 5 is still compatible with Python 2.7, |
|
92 | 145 | still maintained and will get regular releases. Using pip 9+, upgrading IPython will |
|
93 | 146 | automatically upgrade to the latest version compatible with your system. |
|
94 | 147 | |
|
95 | 148 | .. warning:: |
|
96 | 149 | |
|
97 | 150 | If you are on a system using an older version of pip on Python 2, pip may |
|
98 | 151 | still install IPython 6.0 on your system, and IPython will refuse to start. |
|
99 | 152 | You can fix this by upgrading pip, and reinstalling ipython, or forcing pip to |
|
100 | 153 | install an earlier version: ``pip install 'ipython<6'`` |
|
101 | 154 | |
|
102 | 155 | The ability to use only Python 3 on the code base of IPython brings a number |
|
103 | 156 | of advantages. Most of the newly written code make use of `optional function type |
|
104 | 157 | annotation <https://www.python.org/dev/peps/pep-0484/>`_ leading to clearer code |
|
105 | 158 | and better documentation. |
|
106 | 159 | |
|
107 | 160 | The total size of the repository has also decreased by about 1500 lines (for the |
|
108 | 161 | first time excluding the big split for 4.0). The decrease is potentially |
|
109 | 162 | a bit more for the sour as some documents like this one are append only and |
|
110 | 163 | are about 300 lines long. |
|
111 | 164 | |
|
112 | 165 | The removal of the Python2/Python3 shim layer has made the code quite a lot clearer and |
|
113 | 166 | more idiomatic in a number of locations, and much friendlier to work with and |
|
114 | 167 | understand. We hope to further embrace Python 3 capabilities in the next release |
|
115 | 168 | cycle and introduce more of the Python 3 only idioms (yield from, kwarg only, |
|
116 | 169 | general unpacking) in the IPython code base, and see if we can take advantage |
|
117 | 170 | of these to improve user experience with better error messages and |
|
118 | 171 | hints. |
|
119 | 172 | |
|
120 | 173 | |
|
121 | 174 | Configurable TerminalInteractiveShell, readline interface |
|
122 | 175 | --------------------------------------------------------- |
|
123 | 176 | |
|
124 | 177 | IPython gained a new ``c.TerminalIPythonApp.interactive_shell_class`` option |
|
125 | 178 | that allows customizing the class used to start the terminal frontend. This |
|
126 | 179 | should allow a user to use custom interfaces, like reviving the former readline |
|
127 | 180 | interface which is now a separate package not actively maintained by the core |
|
128 | 181 | team. See the project to bring back the readline interface: `rlipython |
|
129 | 182 | <https://github.com/ipython/rlipython>`_. |
|
130 | 183 | |
|
131 | 184 | This change will be backported to the IPython 5.x series. |
|
132 | 185 | |
|
133 | 186 | Misc improvements |
|
134 | 187 | ----------------- |
|
135 | 188 | |
|
136 | 189 | |
|
137 | 190 | - The :cellmagic:`capture` magic can now capture the result of a cell (from |
|
138 | 191 | an expression on the last line), as well as printed and displayed output. |
|
139 | 192 | :ghpull:`9851`. |
|
140 | 193 | |
|
141 | 194 | - Pressing Ctrl-Z in the terminal debugger now suspends IPython, as it already |
|
142 | 195 | does in the main terminal prompt. |
|
143 | 196 | |
|
144 | 197 | - Autoreload can now reload ``Enum``. See :ghissue:`10232` and :ghpull:`10316` |
|
145 | 198 | |
|
146 | 199 | - IPython.display has gained a :any:`GeoJSON <IPython.display.GeoJSON>` object. |
|
147 | 200 | :ghpull:`10288` and :ghpull:`10253` |
|
148 | 201 | |
|
149 | 202 | Functions Deprecated in 6.x Development cycle |
|
150 | 203 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
151 | 204 | |
|
152 | 205 | - Loading extensions from ``ipython_extension_dir`` prints a warning that this |
|
153 | 206 | location is pending deprecation. This should only affect users still having |
|
154 | 207 | extensions installed with ``%install_ext`` which has been deprecated since |
|
155 | 208 | IPython 4.0, and removed in 5.0. Extensions still present in |
|
156 | 209 | ``ipython_extension_dir`` may shadow more recently installed versions using |
|
157 | 210 | pip. It is thus recommended to clean ``ipython_extension_dir`` of any |
|
158 | 211 | extension now available as a package. |
|
159 | 212 | |
|
160 | 213 | |
|
161 | 214 | - ``IPython.utils.warn`` was deprecated in IPython 4.0, and has now been removed. |
|
162 | 215 | instead of ``IPython.utils.warn`` inbuilt :any:`warnings` module is used. |
|
163 | 216 | |
|
164 | 217 | |
|
165 | 218 | - The function `IPython.core.oinspect.py:call_tip` is unused, was marked as |
|
166 | 219 | deprecated (raising a `DeprecationWarning`) and marked for later removal. |
|
167 | 220 | :ghpull:`10104` |
|
168 | 221 | |
|
169 | 222 | Backward incompatible changes |
|
170 | 223 | ------------------------------ |
|
171 | 224 | |
|
172 | 225 | Functions Removed in 6.x Development cycle |
|
173 | 226 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
174 | 227 | |
|
175 | 228 | The following functions have been removed in the |
|
176 | 229 | development cycle marked for Milestone 6.0. |
|
177 | 230 | |
|
178 | 231 | - ``IPython/utils/process.py`` - ``is_cmd_found`` |
|
179 | 232 | - ``IPython/utils/process.py`` - ``pycmd2argv`` |
|
180 | 233 | |
|
181 | 234 | - The `--deep-reload` flag and the corresponding options to inject `dreload` or |
|
182 | 235 | `reload` into the interactive namespace have been removed. You have to |
|
183 | 236 | explicitly import `reload` from `IPython.lib.deepreload` to use it. |
|
184 | 237 | |
|
185 | 238 | - The :magic:`profile` used to print the current IPython profile, and which |
|
186 | 239 | was deprecated in IPython 2.0 does now raise a `DeprecationWarning` error when |
|
187 | 240 | used. It is often confused with the :magic:`prun` and the deprecation removal |
|
188 | 241 | should free up the ``profile`` name in future versions. |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now