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