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