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