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