##// END OF EJS Templates
Backport PR #10314 on branch 5.x...
Thomas Kluyver -
Show More
@@ -1,256 +1,277 b''
1 ============
1 ============
2 5.x Series
2 5.x Series
3 ============
3 ============
4
4
5 IPython 5.3
6 ===========
7
8 Released on January 29th, 2017. Remarkable changes and fixes:
9
10 * fix a bug in ``set_next_input`` leading to crash of the terminal IPython.
11 :ghpull:`10231`, :ghissue:`10296`, :ghissue:`10229`
12 * Always wait for editor inputhook for terminal IPython :ghpull:`10239`,
13 :ghpull:`10240`
14 * Disable ``_ipython_display_`` in terminal :ghpull:`10249`, :ghpull:`10274`
15 * Update terminal colors to be more visible by default on windows
16 :ghpull:`10260`, :ghpull:`10238`, :ghissue:`10281`
17 * Add Ctrl-Z shortcut (suspend) in terminal debugger :ghpull:`10254`,
18 :ghissue:`10273`
19 * Indent on new line by looking at the text before the cursor :ghpull:`10264`,
20 :ghpull:`10275`, :ghissue:`9283`
21 * Update QtEventloop integration to fix some matplotlib integration issues
22 :ghpull:`10201`, :ghpull:`10311`, :ghissue:`10201`
23 * Respect completions display style in terminal debugger :ghpull:`10305`,
24 :ghpull:`10313`
25
5 IPython 5.2.2
26 IPython 5.2.2
6 =============
27 =============
7
28
8 * Fix error when starting with ``IPCompleter.limit_to__all__`` configured.
29 * Fix error when starting with ``IPCompleter.limit_to__all__`` configured.
9
30
10 IPython 5.2.1
31 IPython 5.2.1
11 =============
32 =============
12
33
13 * Fix tab completion in the debugger. :ghpull:`10223`
34 * Fix tab completion in the debugger. :ghpull:`10223`
14
35
15 IPython 5.2
36 IPython 5.2
16 ===========
37 ===========
17
38
18 Remarkable changes and fixes:
39 Released on January 29th, 2017. Remarkable changes and fixes:
19
40
20 * restore IPython's debugger to raise on quit. :ghpull:`10009`
41 * restore IPython's debugger to raise on quit. :ghpull:`10009`
21 * The configuration value ``c.TerminalInteractiveShell.highlighting_style`` can
42 * The configuration value ``c.TerminalInteractiveShell.highlighting_style`` can
22 now directly take a class argument for custom color style. :ghpull:`9848`
43 now directly take a class argument for custom color style. :ghpull:`9848`
23 * Correctly handle matplotlib figures dpi :ghpull:`9868`
44 * Correctly handle matplotlib figures dpi :ghpull:`9868`
24 * Deprecate ``-e`` flag for the ``%notebook`` magic that had no effects.
45 * Deprecate ``-e`` flag for the ``%notebook`` magic that had no effects.
25 :ghpull:`9872`
46 :ghpull:`9872`
26 * You can now press F2 while typing at a terminal prompt to edit the contents
47 * You can now press F2 while typing at a terminal prompt to edit the contents
27 in your favourite terminal editor. Set the :envvar:`EDITOR` environment
48 in your favourite terminal editor. Set the :envvar:`EDITOR` environment
28 variable to pick which editor is used. :ghpull:`9929`
49 variable to pick which editor is used. :ghpull:`9929`
29 * sdists will now only be ``.tar.gz`` as per upstream PyPI requirements.
50 * sdists will now only be ``.tar.gz`` as per upstream PyPI requirements.
30 :ghpull:`9925`
51 :ghpull:`9925`
31 * :any:`IPython.core.debugger` have gained a ``set_trace()`` method for
52 * :any:`IPython.core.debugger` have gained a ``set_trace()`` method for
32 convenience. :ghpull:`9947`
53 convenience. :ghpull:`9947`
33 * The 'smart command mode' added to the debugger in 5.0 was removed, as more
54 * The 'smart command mode' added to the debugger in 5.0 was removed, as more
34 people preferred the previous behaviour. Therefore, debugger commands such as
55 people preferred the previous behaviour. Therefore, debugger commands such as
35 ``c`` will act as debugger commands even when ``c`` is defined as a variable.
56 ``c`` will act as debugger commands even when ``c`` is defined as a variable.
36 :ghpull:`10050`
57 :ghpull:`10050`
37 * Fixes OS X event loop issues at startup, :ghpull:`10150`
58 * Fixes OS X event loop issues at startup, :ghpull:`10150`
38 * Deprecate the ``%autoindent`` magic. :ghpull:`10176`
59 * Deprecate the ``%autoindent`` magic. :ghpull:`10176`
39 * Emit a :any:`DeprecationWarning` when setting the deprecated
60 * Emit a :any:`DeprecationWarning` when setting the deprecated
40 ``limit_to_all`` option of the completer. :ghpull:`10198`
61 ``limit_to_all`` option of the completer. :ghpull:`10198`
41
62
42
63
43 Changes of behavior to :any:`InteractiveShellEmbed`.
64 Changes of behavior to :any:`InteractiveShellEmbed`.
44
65
45 :any:`InteractiveShellEmbed` interactive behavior have changed a bit in between
66 :any:`InteractiveShellEmbed` interactive behavior have changed a bit in between
46 5.1 and 5.2. By default ``%kill_embedded`` magic will prevent further invocation
67 5.1 and 5.2. By default ``%kill_embedded`` magic will prevent further invocation
47 of the current ``call location`` instead of preventing further invocation of
68 of the current ``call location`` instead of preventing further invocation of
48 the current instance creation location. For most use case this will not change
69 the current instance creation location. For most use case this will not change
49 much for you, though previous behavior was confusing and less consistent with
70 much for you, though previous behavior was confusing and less consistent with
50 previous IPython versions.
71 previous IPython versions.
51
72
52 You can now deactivate instances by using ``%kill_embedded --instance`` flag,
73 You can now deactivate instances by using ``%kill_embedded --instance`` flag,
53 (or ``-i`` in short). The ``%kill_embedded`` magic also gained a
74 (or ``-i`` in short). The ``%kill_embedded`` magic also gained a
54 ``--yes``/``-y`` option which skip confirmation step, and ``-x``/``--exit``
75 ``--yes``/``-y`` option which skip confirmation step, and ``-x``/``--exit``
55 which also exit the current embedded call without asking for confirmation.
76 which also exit the current embedded call without asking for confirmation.
56
77
57 See :ghpull:`10207`.
78 See :ghpull:`10207`.
58
79
59
80
60
81
61 IPython 5.1
82 IPython 5.1
62 ===========
83 ===========
63
84
64 * Broken ``%timeit`` on Python2 due to the use of ``__qualname__``. :ghpull:`9804`
85 * Broken ``%timeit`` on Python2 due to the use of ``__qualname__``. :ghpull:`9804`
65 * Restore ``%gui qt`` to create and return a ``QApplication`` if necessary. :ghpull:`9789`
86 * Restore ``%gui qt`` to create and return a ``QApplication`` if necessary. :ghpull:`9789`
66 * Don't set terminal title by default. :ghpull:`9801`
87 * Don't set terminal title by default. :ghpull:`9801`
67 * Preserve indentation when inserting newlines with ``Ctrl-O``. :ghpull:`9770`
88 * Preserve indentation when inserting newlines with ``Ctrl-O``. :ghpull:`9770`
68 * Restore completion in debugger. :ghpull:`9785`
89 * Restore completion in debugger. :ghpull:`9785`
69 * Deprecate ``IPython.core.debugger.Tracer()`` in favor of simpler, newer, APIs. :ghpull:`9731`
90 * Deprecate ``IPython.core.debugger.Tracer()`` in favor of simpler, newer, APIs. :ghpull:`9731`
70 * Restore ``NoOpContext`` context manager removed by mistake, and add `DeprecationWarning`. :ghpull:`9765`
91 * Restore ``NoOpContext`` context manager removed by mistake, and add `DeprecationWarning`. :ghpull:`9765`
71 * Add option allowing ``Prompt_toolkit`` to use 24bits colors. :ghpull:`9736`
92 * Add option allowing ``Prompt_toolkit`` to use 24bits colors. :ghpull:`9736`
72 * Fix for closing interactive matplotlib windows on OS X. :ghpull:`9854`
93 * Fix for closing interactive matplotlib windows on OS X. :ghpull:`9854`
73 * An embedded interactive shell instance can be used more than once. :ghpull:`9843`
94 * An embedded interactive shell instance can be used more than once. :ghpull:`9843`
74 * More robust check for whether IPython is in a terminal. :ghpull:`9833`
95 * More robust check for whether IPython is in a terminal. :ghpull:`9833`
75 * Better pretty-printing of dicts on PyPy. :ghpull:`9827`
96 * Better pretty-printing of dicts on PyPy. :ghpull:`9827`
76 * Some coloured output now looks better on dark background command prompts in Windows.
97 * Some coloured output now looks better on dark background command prompts in Windows.
77 :ghpull:`9838`
98 :ghpull:`9838`
78 * Improved tab completion of paths on Windows . :ghpull:`9826`
99 * Improved tab completion of paths on Windows . :ghpull:`9826`
79 * Fix tkinter event loop integration on Python 2 with ``future`` installed. :ghpull:`9824`
100 * Fix tkinter event loop integration on Python 2 with ``future`` installed. :ghpull:`9824`
80 * Restore ``Ctrl-\`` as a shortcut to quit IPython.
101 * Restore ``Ctrl-\`` as a shortcut to quit IPython.
81 * Make ``get_ipython()`` accessible when modules are imported by startup files. :ghpull:`9818`
102 * Make ``get_ipython()`` accessible when modules are imported by startup files. :ghpull:`9818`
82 * Add support for running directories containing a ``__main__.py`` file with the
103 * Add support for running directories containing a ``__main__.py`` file with the
83 ``ipython`` command. :ghpull:`9813`
104 ``ipython`` command. :ghpull:`9813`
84
105
85
106
86 True Color feature
107 True Color feature
87 ------------------
108 ------------------
88
109
89 ``prompt_toolkit`` uses pygments styles for syntax highlighting. By default, the
110 ``prompt_toolkit`` uses pygments styles for syntax highlighting. By default, the
90 colors specified in the style are approximated using a standard 256-color
111 colors specified in the style are approximated using a standard 256-color
91 palette. ``prompt_toolkit`` also supports 24bit, a.k.a. "true", a.k.a. 16-million
112 palette. ``prompt_toolkit`` also supports 24bit, a.k.a. "true", a.k.a. 16-million
92 color escape sequences which enable compatible terminals to display the exact
113 color escape sequences which enable compatible terminals to display the exact
93 colors specified instead of an approximation. This true_color option exposes
114 colors specified instead of an approximation. This true_color option exposes
94 that capability in prompt_toolkit to the IPython shell.
115 that capability in prompt_toolkit to the IPython shell.
95
116
96 Here is a good source for the current state of true color support in various
117 Here is a good source for the current state of true color support in various
97 terminal emulators and software projects: https://gist.github.com/XVilka/8346728
118 terminal emulators and software projects: https://gist.github.com/XVilka/8346728
98
119
99
120
100
121
101 IPython 5.0
122 IPython 5.0
102 ===========
123 ===========
103
124
104 Released July 7, 2016
125 Released July 7, 2016
105
126
106 New terminal interface
127 New terminal interface
107 ----------------------
128 ----------------------
108
129
109 IPython 5 features a major upgrade to the terminal interface, bringing live
130 IPython 5 features a major upgrade to the terminal interface, bringing live
110 syntax highlighting as you type, proper multiline editing and multiline paste,
131 syntax highlighting as you type, proper multiline editing and multiline paste,
111 and tab completions that don't clutter up your history.
132 and tab completions that don't clutter up your history.
112
133
113 .. image:: ../_images/ptshell_features.png
134 .. image:: ../_images/ptshell_features.png
114 :alt: New terminal interface features
135 :alt: New terminal interface features
115 :align: center
136 :align: center
116 :target: ../_images/ptshell_features.png
137 :target: ../_images/ptshell_features.png
117
138
118 These features are provided by the Python library `prompt_toolkit
139 These features are provided by the Python library `prompt_toolkit
119 <http://python-prompt-toolkit.readthedocs.io/en/stable/>`__, which replaces
140 <http://python-prompt-toolkit.readthedocs.io/en/stable/>`__, which replaces
120 ``readline`` throughout our terminal interface.
141 ``readline`` throughout our terminal interface.
121
142
122 Relying on this pure-Python, cross platform module also makes it simpler to
143 Relying on this pure-Python, cross platform module also makes it simpler to
123 install IPython. We have removed dependencies on ``pyreadline`` for Windows and
144 install IPython. We have removed dependencies on ``pyreadline`` for Windows and
124 ``gnureadline`` for Mac.
145 ``gnureadline`` for Mac.
125
146
126 Backwards incompatible changes
147 Backwards incompatible changes
127 ------------------------------
148 ------------------------------
128
149
129 - The ``%install_ext`` magic function, deprecated since 4.0, has now been deleted.
150 - The ``%install_ext`` magic function, deprecated since 4.0, has now been deleted.
130 You can distribute and install extensions as packages on PyPI.
151 You can distribute and install extensions as packages on PyPI.
131 - Callbacks registered while an event is being handled will now only be called
152 - Callbacks registered while an event is being handled will now only be called
132 for subsequent events; previously they could be called for the current event.
153 for subsequent events; previously they could be called for the current event.
133 Similarly, callbacks removed while handling an event *will* always get that
154 Similarly, callbacks removed while handling an event *will* always get that
134 event. See :ghissue:`9447` and :ghpull:`9453`.
155 event. See :ghissue:`9447` and :ghpull:`9453`.
135 - Integration with pydb has been removed since pydb development has been stopped
156 - Integration with pydb has been removed since pydb development has been stopped
136 since 2012, and pydb is not installable from PyPI.
157 since 2012, and pydb is not installable from PyPI.
137 - The ``autoedit_syntax`` option has apparently been broken for many years.
158 - The ``autoedit_syntax`` option has apparently been broken for many years.
138 It has been removed.
159 It has been removed.
139
160
140 New terminal interface
161 New terminal interface
141 ~~~~~~~~~~~~~~~~~~~~~~
162 ~~~~~~~~~~~~~~~~~~~~~~
142
163
143 The overhaul of the terminal interface will probably cause a range of minor
164 The overhaul of the terminal interface will probably cause a range of minor
144 issues for existing users.
165 issues for existing users.
145 This is inevitable for such a significant change, and we've done our best to
166 This is inevitable for such a significant change, and we've done our best to
146 minimise these issues.
167 minimise these issues.
147 Some changes that we're aware of, with suggestions on how to handle them:
168 Some changes that we're aware of, with suggestions on how to handle them:
148
169
149 IPython no longer uses readline configuration (``~/.inputrc``). We hope that
170 IPython no longer uses readline configuration (``~/.inputrc``). We hope that
150 the functionality you want (e.g. vi input mode) will be available by configuring
171 the functionality you want (e.g. vi input mode) will be available by configuring
151 IPython directly (see :doc:`/config/options/terminal`).
172 IPython directly (see :doc:`/config/options/terminal`).
152 If something's missing, please file an issue.
173 If something's missing, please file an issue.
153
174
154 The ``PromptManager`` class has been removed, and the prompt machinery simplified.
175 The ``PromptManager`` class has been removed, and the prompt machinery simplified.
155 See :ref:`custom_prompts` to customise prompts with the new machinery.
176 See :ref:`custom_prompts` to customise prompts with the new machinery.
156
177
157 :mod:`IPython.core.debugger` now provides a plainer interface.
178 :mod:`IPython.core.debugger` now provides a plainer interface.
158 :mod:`IPython.terminal.debugger` contains the terminal debugger using
179 :mod:`IPython.terminal.debugger` contains the terminal debugger using
159 prompt_toolkit.
180 prompt_toolkit.
160
181
161 There are new options to configure the colours used in syntax highlighting.
182 There are new options to configure the colours used in syntax highlighting.
162 We have tried to integrate them with our classic ``--colors`` option and
183 We have tried to integrate them with our classic ``--colors`` option and
163 ``%colors`` magic, but there's a mismatch in possibilities, so some configurations
184 ``%colors`` magic, but there's a mismatch in possibilities, so some configurations
164 may produce unexpected results. See :ref:`termcolour` for more information.
185 may produce unexpected results. See :ref:`termcolour` for more information.
165
186
166 The new interface is not compatible with Emacs 'inferior-shell' feature. To
187 The new interface is not compatible with Emacs 'inferior-shell' feature. To
167 continue using this, add the ``--simple-prompt`` flag to the command Emacs
188 continue using this, add the ``--simple-prompt`` flag to the command Emacs
168 runs. This flag disables most IPython features, relying on Emacs to provide
189 runs. This flag disables most IPython features, relying on Emacs to provide
169 things like tab completion.
190 things like tab completion.
170
191
171 Provisional Changes
192 Provisional Changes
172 -------------------
193 -------------------
173
194
174 Provisional changes are experimental functionality that may, or may not, make
195 Provisional changes are experimental functionality that may, or may not, make
175 it into a future version of IPython, and which API may change without warnings.
196 it into a future version of IPython, and which API may change without warnings.
176 Activating these features and using these API are at your own risk, and may have
197 Activating these features and using these API are at your own risk, and may have
177 security implication for your system, especially if used with the Jupyter notebook,
198 security implication for your system, especially if used with the Jupyter notebook,
178
199
179 When running via the Jupyter notebook interfaces, or other compatible client,
200 When running via the Jupyter notebook interfaces, or other compatible client,
180 you can enable rich documentation experimental functionality:
201 you can enable rich documentation experimental functionality:
181
202
182 When the ``docrepr`` package is installed setting the boolean flag
203 When the ``docrepr`` package is installed setting the boolean flag
183 ``InteractiveShell.sphinxify_docstring`` to ``True``, will process the various
204 ``InteractiveShell.sphinxify_docstring`` to ``True``, will process the various
184 object through sphinx before displaying them (see the ``docrepr`` package
205 object through sphinx before displaying them (see the ``docrepr`` package
185 documentation for more information.
206 documentation for more information.
186
207
187 You need to also enable the IPython pager display rich HTML representation
208 You need to also enable the IPython pager display rich HTML representation
188 using the ``InteractiveShell.enable_html_pager`` boolean configuration option.
209 using the ``InteractiveShell.enable_html_pager`` boolean configuration option.
189 As usual you can set these configuration options globally in your configuration
210 As usual you can set these configuration options globally in your configuration
190 files, alternatively you can turn them on dynamically using the following
211 files, alternatively you can turn them on dynamically using the following
191 snippet:
212 snippet:
192
213
193 .. code-block:: python
214 .. code-block:: python
194
215
195 ip = get_ipython()
216 ip = get_ipython()
196 ip.sphinxify_docstring = True
217 ip.sphinxify_docstring = True
197 ip.enable_html_pager = True
218 ip.enable_html_pager = True
198
219
199
220
200 You can test the effect of various combinations of the above configuration in
221 You can test the effect of various combinations of the above configuration in
201 the Jupyter notebook, with things example like :
222 the Jupyter notebook, with things example like :
202
223
203 .. code-block:: ipython
224 .. code-block:: ipython
204
225
205 import numpy as np
226 import numpy as np
206 np.histogram?
227 np.histogram?
207
228
208
229
209 This is part of an effort to make Documentation in Python richer and provide in
230 This is part of an effort to make Documentation in Python richer and provide in
210 the long term if possible dynamic examples that can contain math, images,
231 the long term if possible dynamic examples that can contain math, images,
211 widgets... As stated above this is nightly experimental feature with a lot of
232 widgets... As stated above this is nightly experimental feature with a lot of
212 (fun) problem to solve. We would be happy to get your feedback and expertise on
233 (fun) problem to solve. We would be happy to get your feedback and expertise on
213 it.
234 it.
214
235
215
236
216
237
217 Deprecated Features
238 Deprecated Features
218 -------------------
239 -------------------
219
240
220 Some deprecated features are listed in this section. Don't forget to enable
241 Some deprecated features are listed in this section. Don't forget to enable
221 ``DeprecationWarning`` as an error if you are using IPython in a Continuous
242 ``DeprecationWarning`` as an error if you are using IPython in a Continuous
222 Integration setup or in your testing in general:
243 Integration setup or in your testing in general:
223
244
224 .. code-block:: python
245 .. code-block:: python
225
246
226 import warnings
247 import warnings
227 warnings.filterwarnings('error', '.*', DeprecationWarning, module='yourmodule.*')
248 warnings.filterwarnings('error', '.*', DeprecationWarning, module='yourmodule.*')
228
249
229
250
230 - ``hooks.fix_error_editor`` seems unused and is pending deprecation.
251 - ``hooks.fix_error_editor`` seems unused and is pending deprecation.
231 - `IPython/core/excolors.py:ExceptionColors` is deprecated.
252 - `IPython/core/excolors.py:ExceptionColors` is deprecated.
232 - `IPython.core.InteractiveShell:write()` is deprecated; use `sys.stdout` instead.
253 - `IPython.core.InteractiveShell:write()` is deprecated; use `sys.stdout` instead.
233 - `IPython.core.InteractiveShell:write_err()` is deprecated; use `sys.stderr` instead.
254 - `IPython.core.InteractiveShell:write_err()` is deprecated; use `sys.stderr` instead.
234 - The `formatter` keyword argument to `Inspector.info` in `IPython.core.oinspec` has no effect.
255 - The `formatter` keyword argument to `Inspector.info` in `IPython.core.oinspec` has no effect.
235 - The `global_ns` keyword argument of IPython Embed was deprecated, and has no effect. Use `module` keyword argument instead.
256 - The `global_ns` keyword argument of IPython Embed was deprecated, and has no effect. Use `module` keyword argument instead.
236
257
237
258
238 Known Issues:
259 Known Issues:
239 -------------
260 -------------
240
261
241 - ``<Esc>`` Key does not dismiss the completer and does not clear the current
262 - ``<Esc>`` Key does not dismiss the completer and does not clear the current
242 buffer. This is an on purpose modification due to current technical
263 buffer. This is an on purpose modification due to current technical
243 limitation. Cf :ghpull:`9572`. Escape the control character which is used
264 limitation. Cf :ghpull:`9572`. Escape the control character which is used
244 for other shortcut, and there is no practical way to distinguish. Use Ctr-G
265 for other shortcut, and there is no practical way to distinguish. Use Ctr-G
245 or Ctrl-C as an alternative.
266 or Ctrl-C as an alternative.
246
267
247 - Cannot use ``Shift-Enter`` and ``Ctrl-Enter`` to submit code in terminal. cf
268 - Cannot use ``Shift-Enter`` and ``Ctrl-Enter`` to submit code in terminal. cf
248 :ghissue:`9587` and :ghissue:`9401`. In terminal there is no practical way to
269 :ghissue:`9587` and :ghissue:`9401`. In terminal there is no practical way to
249 distinguish these key sequences from a normal new line return.
270 distinguish these key sequences from a normal new line return.
250
271
251 - ``PageUp`` and ``pageDown`` do not move through completion menu.
272 - ``PageUp`` and ``pageDown`` do not move through completion menu.
252
273
253 - Color styles might not adapt to terminal emulator themes. This will need new
274 - Color styles might not adapt to terminal emulator themes. This will need new
254 version of Pygments to be released, and can be mitigated with custom themes.
275 version of Pygments to be released, and can be mitigated with custom themes.
255
276
256
277
General Comments 0
You need to be logged in to leave comments. Login now