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