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