##// END OF EJS Templates
Merge pull request #10589 from Carreau/54whatsnew...
Thomas Kluyver -
r23682:b1becba9 merge
parent child Browse files
Show More
@@ -1,288 +1,344
1 1 ============
2 2 5.x Series
3 3 ============
4 4
5 5 IPython 5.4
6 6 ===========
7 7
8 * added ``Completer.backslash_combining_completions`` boolean option to
9 deactivate backslash-tab completion that may conflict with windows path.
8 IPython 5.4-LTS is the first release of IPython after the release of the 6.x
9 series which is Python 3 only. It backports most of the new exposed API
10 additions made in IPython 6.0 and 6.1 and avoid having to write conditional
11 logics depending of the version of IPython.
12
13 Please upgrade to pip 9 or greater before upgrading IPython.
14 Failing to do so on Python 2 may lead to a broken IPython install.
15
16 Configurable TerminalInteractiveShell
17 -------------------------------------
18
19 Backported from the 6.x branch as an exceptional new feature. See
20 :ghpull:`10373` and :ghissue:`10364`
21
22 IPython gained a new ``c.TerminalIPythonApp.interactive_shell_class`` option
23 that allow to customize the class used to start the terminal frontend. This
24 should allow user to use custom interfaces, like reviving the former readline
25 interface which is now a separate package not maintained by the core team.
26
27
28 Define ``_repr_mimebundle_``
29 ----------------------------
30
31 Object can now define `_repr_mimebundle_` in place of multiple `_repr_*_`
32 methods and return a full mimebundle. This greatly simplify many implementation
33 and allow to publish custom mimetypes (like geojson, plotly, dataframes....).
34 See the ``Cutom Display Logic`` example notebook for more informations.
10 35
36 Execution Heuristics
37 --------------------
38
39 The heuristic for execution in the command line interface is now more biased
40 toward executing for single statement. While in IPython 4.x and before a single
41 line would be executed when enter is pressed, IPython 5.x would insert a new
42 line. For single line statement this is not true anymore and if a single line is
43 valid Python, IPython will execute it regardless of the cursor position. Use
44 :kbd:`Ctrl-O` to insert a new line. :ghpull:`10489`
45
46
47 Implement Display IDs
48 ---------------------
49
50 Implement display id and ability to update a given display. This should greatly
51 simplify a lot of code by removing the need for widgets and allow other frontend
52 to implement things like progress-bars. See :ghpull:`10048`
53
54 Miscs
55 -----
56
57 * ``_mp_main_`` is not reloaded which fixes issues with multiprocessing.
58 :ghpull:`10523`
59 * Use user colorscheme in Pdb as well :ghpull:`10479`
60 * Faster shutdown. :ghpull:`10408`
61 * Fix a crash in reverse search. :ghpull:`10371`
62 * added ``Completer.backslash_combining_completions`` boolean option to
63 deactivate backslash-tab completion that may conflict with windows path.
11 64
12 65 IPython 5.3
13 66 ===========
14 67
15 68 Released on February 24th, 2017. Remarkable changes and fixes:
16 69
17 70 * Fix a bug in ``set_next_input`` leading to a crash of terminal IPython.
18 71 :ghpull:`10231`, :ghissue:`10296`, :ghissue:`10229`
19 72 * Always wait for editor inputhook for terminal IPython :ghpull:`10239`,
20 73 :ghpull:`10240`
21 74 * Disable ``_ipython_display_`` in terminal :ghpull:`10249`, :ghpull:`10274`
22 75 * Update terminal colors to be more visible by default on windows
23 76 :ghpull:`10260`, :ghpull:`10238`, :ghissue:`10281`
24 77 * Add Ctrl-Z shortcut (suspend) in terminal debugger :ghpull:`10254`,
25 78 :ghissue:`10273`
26 79 * Indent on new line by looking at the text before the cursor :ghpull:`10264`,
27 80 :ghpull:`10275`, :ghissue:`9283`
28 81 * Update QtEventloop integration to fix some matplotlib integration issues
29 82 :ghpull:`10201`, :ghpull:`10311`, :ghissue:`10201`
30 83 * Respect completions display style in terminal debugger :ghpull:`10305`,
31 84 :ghpull:`10313`
32 85 * Add a config option ``TerminalInteractiveShell.extra_open_editor_shortcuts``
33 86 to enable extra shortcuts to open the input in an editor. These are :kbd:`v`
34 87 in vi mode, and :kbd:`C-X C-E` in emacs mode (:ghpull:`10330`).
35 88 The :kbd:`F2` shortcut is always enabled.
36 89
37 90 IPython 5.2.2
38 91 =============
39 92
40 93 * Fix error when starting with ``IPCompleter.limit_to__all__`` configured.
41 94
42 95 IPython 5.2.1
43 96 =============
44 97
45 98 * Fix tab completion in the debugger. :ghpull:`10223`
46 99
47 100 IPython 5.2
48 101 ===========
49 102
50 103 Released on January 29th, 2017. Remarkable changes and fixes:
51 104
52 105 * restore IPython's debugger to raise on quit. :ghpull:`10009`
53 106 * The configuration value ``c.TerminalInteractiveShell.highlighting_style`` can
54 107 now directly take a class argument for custom color style. :ghpull:`9848`
55 108 * Correctly handle matplotlib figures dpi :ghpull:`9868`
56 109 * Deprecate ``-e`` flag for the ``%notebook`` magic that had no effects.
57 110 :ghpull:`9872`
58 111 * You can now press F2 while typing at a terminal prompt to edit the contents
59 112 in your favourite terminal editor. Set the :envvar:`EDITOR` environment
60 113 variable to pick which editor is used. :ghpull:`9929`
61 114 * sdists will now only be ``.tar.gz`` as per upstream PyPI requirements.
62 115 :ghpull:`9925`
63 116 * :any:`IPython.core.debugger` have gained a ``set_trace()`` method for
64 117 convenience. :ghpull:`9947`
65 118 * The 'smart command mode' added to the debugger in 5.0 was removed, as more
66 119 people preferred the previous behaviour. Therefore, debugger commands such as
67 120 ``c`` will act as debugger commands even when ``c`` is defined as a variable.
68 121 :ghpull:`10050`
69 122 * Fixes OS X event loop issues at startup, :ghpull:`10150`
70 123 * Deprecate the ``%autoindent`` magic. :ghpull:`10176`
71 124 * Emit a :any:`DeprecationWarning` when setting the deprecated
72 125 ``limit_to_all`` option of the completer. :ghpull:`10198`
126 * The :cellmagic:`capture` magic can now capture the result of a cell (from an
127 expression on the last line), as well as printed and displayed output.
128 :ghpull:`9851`.
73 129
74 130
75 131 Changes of behavior to :any:`InteractiveShellEmbed`.
76 132
77 133 :any:`InteractiveShellEmbed` interactive behavior have changed a bit in between
78 134 5.1 and 5.2. By default ``%kill_embedded`` magic will prevent further invocation
79 135 of the current ``call location`` instead of preventing further invocation of
80 136 the current instance creation location. For most use case this will not change
81 137 much for you, though previous behavior was confusing and less consistent with
82 138 previous IPython versions.
83 139
84 140 You can now deactivate instances by using ``%kill_embedded --instance`` flag,
85 141 (or ``-i`` in short). The ``%kill_embedded`` magic also gained a
86 142 ``--yes``/``-y`` option which skip confirmation step, and ``-x``/``--exit``
87 143 which also exit the current embedded call without asking for confirmation.
88 144
89 145 See :ghpull:`10207`.
90 146
91 147
92 148
93 149 IPython 5.1
94 150 ===========
95 151
96 152 * Broken ``%timeit`` on Python2 due to the use of ``__qualname__``. :ghpull:`9804`
97 153 * Restore ``%gui qt`` to create and return a ``QApplication`` if necessary. :ghpull:`9789`
98 154 * Don't set terminal title by default. :ghpull:`9801`
99 155 * Preserve indentation when inserting newlines with ``Ctrl-O``. :ghpull:`9770`
100 156 * Restore completion in debugger. :ghpull:`9785`
101 157 * Deprecate ``IPython.core.debugger.Tracer()`` in favor of simpler, newer, APIs. :ghpull:`9731`
102 158 * Restore ``NoOpContext`` context manager removed by mistake, and add `DeprecationWarning`. :ghpull:`9765`
103 159 * Add option allowing ``Prompt_toolkit`` to use 24bits colors. :ghpull:`9736`
104 160 * Fix for closing interactive matplotlib windows on OS X. :ghpull:`9854`
105 161 * An embedded interactive shell instance can be used more than once. :ghpull:`9843`
106 162 * More robust check for whether IPython is in a terminal. :ghpull:`9833`
107 163 * Better pretty-printing of dicts on PyPy. :ghpull:`9827`
108 164 * Some coloured output now looks better on dark background command prompts in Windows.
109 165 :ghpull:`9838`
110 166 * Improved tab completion of paths on Windows . :ghpull:`9826`
111 167 * Fix tkinter event loop integration on Python 2 with ``future`` installed. :ghpull:`9824`
112 168 * Restore ``Ctrl-\`` as a shortcut to quit IPython.
113 169 * Make ``get_ipython()`` accessible when modules are imported by startup files. :ghpull:`9818`
114 170 * Add support for running directories containing a ``__main__.py`` file with the
115 171 ``ipython`` command. :ghpull:`9813`
116 172
117 173
118 174 True Color feature
119 175 ------------------
120 176
121 177 ``prompt_toolkit`` uses pygments styles for syntax highlighting. By default, the
122 178 colors specified in the style are approximated using a standard 256-color
123 179 palette. ``prompt_toolkit`` also supports 24bit, a.k.a. "true", a.k.a. 16-million
124 180 color escape sequences which enable compatible terminals to display the exact
125 181 colors specified instead of an approximation. This true_color option exposes
126 182 that capability in prompt_toolkit to the IPython shell.
127 183
128 184 Here is a good source for the current state of true color support in various
129 185 terminal emulators and software projects: https://gist.github.com/XVilka/8346728
130 186
131 187
132 188
133 189 IPython 5.0
134 190 ===========
135 191
136 192 Released July 7, 2016
137 193
138 194 New terminal interface
139 195 ----------------------
140 196
141 197 IPython 5 features a major upgrade to the terminal interface, bringing live
142 198 syntax highlighting as you type, proper multiline editing and multiline paste,
143 199 and tab completions that don't clutter up your history.
144 200
145 201 .. image:: ../_images/ptshell_features.png
146 202 :alt: New terminal interface features
147 203 :align: center
148 204 :target: ../_images/ptshell_features.png
149 205
150 206 These features are provided by the Python library `prompt_toolkit
151 207 <http://python-prompt-toolkit.readthedocs.io/en/stable/>`__, which replaces
152 208 ``readline`` throughout our terminal interface.
153 209
154 210 Relying on this pure-Python, cross platform module also makes it simpler to
155 211 install IPython. We have removed dependencies on ``pyreadline`` for Windows and
156 212 ``gnureadline`` for Mac.
157 213
158 214 Backwards incompatible changes
159 215 ------------------------------
160 216
161 217 - The ``%install_ext`` magic function, deprecated since 4.0, has now been deleted.
162 218 You can distribute and install extensions as packages on PyPI.
163 219 - Callbacks registered while an event is being handled will now only be called
164 220 for subsequent events; previously they could be called for the current event.
165 221 Similarly, callbacks removed while handling an event *will* always get that
166 222 event. See :ghissue:`9447` and :ghpull:`9453`.
167 223 - Integration with pydb has been removed since pydb development has been stopped
168 224 since 2012, and pydb is not installable from PyPI.
169 225 - The ``autoedit_syntax`` option has apparently been broken for many years.
170 226 It has been removed.
171 227
172 228 New terminal interface
173 229 ~~~~~~~~~~~~~~~~~~~~~~
174 230
175 231 The overhaul of the terminal interface will probably cause a range of minor
176 232 issues for existing users.
177 233 This is inevitable for such a significant change, and we've done our best to
178 234 minimise these issues.
179 235 Some changes that we're aware of, with suggestions on how to handle them:
180 236
181 237 IPython no longer uses readline configuration (``~/.inputrc``). We hope that
182 238 the functionality you want (e.g. vi input mode) will be available by configuring
183 239 IPython directly (see :doc:`/config/options/terminal`).
184 240 If something's missing, please file an issue.
185 241
186 242 The ``PromptManager`` class has been removed, and the prompt machinery simplified.
187 243 See :ref:`custom_prompts` to customise prompts with the new machinery.
188 244
189 245 :mod:`IPython.core.debugger` now provides a plainer interface.
190 246 :mod:`IPython.terminal.debugger` contains the terminal debugger using
191 247 prompt_toolkit.
192 248
193 249 There are new options to configure the colours used in syntax highlighting.
194 250 We have tried to integrate them with our classic ``--colors`` option and
195 251 ``%colors`` magic, but there's a mismatch in possibilities, so some configurations
196 252 may produce unexpected results. See :ref:`termcolour` for more information.
197 253
198 254 The new interface is not compatible with Emacs 'inferior-shell' feature. To
199 255 continue using this, add the ``--simple-prompt`` flag to the command Emacs
200 256 runs. This flag disables most IPython features, relying on Emacs to provide
201 257 things like tab completion.
202 258
203 259 Provisional Changes
204 260 -------------------
205 261
206 262 Provisional changes are experimental functionality that may, or may not, make
207 263 it into a future version of IPython, and which API may change without warnings.
208 264 Activating these features and using these API are at your own risk, and may have
209 265 security implication for your system, especially if used with the Jupyter notebook,
210 266
211 267 When running via the Jupyter notebook interfaces, or other compatible client,
212 268 you can enable rich documentation experimental functionality:
213 269
214 270 When the ``docrepr`` package is installed setting the boolean flag
215 271 ``InteractiveShell.sphinxify_docstring`` to ``True``, will process the various
216 272 object through sphinx before displaying them (see the ``docrepr`` package
217 273 documentation for more information.
218 274
219 275 You need to also enable the IPython pager display rich HTML representation
220 276 using the ``InteractiveShell.enable_html_pager`` boolean configuration option.
221 277 As usual you can set these configuration options globally in your configuration
222 278 files, alternatively you can turn them on dynamically using the following
223 279 snippet:
224 280
225 281 .. code-block:: python
226 282
227 283 ip = get_ipython()
228 284 ip.sphinxify_docstring = True
229 285 ip.enable_html_pager = True
230 286
231 287
232 288 You can test the effect of various combinations of the above configuration in
233 289 the Jupyter notebook, with things example like :
234 290
235 291 .. code-block:: ipython
236 292
237 293 import numpy as np
238 294 np.histogram?
239 295
240 296
241 297 This is part of an effort to make Documentation in Python richer and provide in
242 298 the long term if possible dynamic examples that can contain math, images,
243 299 widgets... As stated above this is nightly experimental feature with a lot of
244 300 (fun) problem to solve. We would be happy to get your feedback and expertise on
245 301 it.
246 302
247 303
248 304
249 305 Deprecated Features
250 306 -------------------
251 307
252 308 Some deprecated features are listed in this section. Don't forget to enable
253 309 ``DeprecationWarning`` as an error if you are using IPython in a Continuous
254 310 Integration setup or in your testing in general:
255 311
256 312 .. code-block:: python
257 313
258 314 import warnings
259 315 warnings.filterwarnings('error', '.*', DeprecationWarning, module='yourmodule.*')
260 316
261 317
262 318 - ``hooks.fix_error_editor`` seems unused and is pending deprecation.
263 319 - `IPython/core/excolors.py:ExceptionColors` is deprecated.
264 320 - `IPython.core.InteractiveShell:write()` is deprecated; use `sys.stdout` instead.
265 321 - `IPython.core.InteractiveShell:write_err()` is deprecated; use `sys.stderr` instead.
266 322 - The `formatter` keyword argument to `Inspector.info` in `IPython.core.oinspec` has no effect.
267 323 - The `global_ns` keyword argument of IPython Embed was deprecated, and has no effect. Use `module` keyword argument instead.
268 324
269 325
270 326 Known Issues:
271 327 -------------
272 328
273 329 - ``<Esc>`` Key does not dismiss the completer and does not clear the current
274 330 buffer. This is an on purpose modification due to current technical
275 331 limitation. Cf :ghpull:`9572`. Escape the control character which is used
276 332 for other shortcut, and there is no practical way to distinguish. Use Ctr-G
277 333 or Ctrl-C as an alternative.
278 334
279 335 - Cannot use ``Shift-Enter`` and ``Ctrl-Enter`` to submit code in terminal. cf
280 336 :ghissue:`9587` and :ghissue:`9401`. In terminal there is no practical way to
281 337 distinguish these key sequences from a normal new line return.
282 338
283 339 - ``PageUp`` and ``pageDown`` do not move through completion menu.
284 340
285 341 - Color styles might not adapt to terminal emulator themes. This will need new
286 342 version of Pygments to be released, and can be mitigated with custom themes.
287 343
288 344
General Comments 0
You need to be logged in to leave comments. Login now