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