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