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