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