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