##// END OF EJS Templates
Prepare what's new for 6.2 release.
Matthias Bussonnier -
Show More
@@ -1,64 +1,21 b''
1 =====================
1 =====================
2 Development version
2 Development version
3 =====================
3 =====================
4
4
5 This document describes in-flight development work.
5 This document describes in-flight development work.
6
6
7 .. warning::
7 .. warning::
8
8
9 Please do not edit this file by hand (doing so will likely cause merge
9 Please do not edit this file by hand (doing so will likely cause merge
10 conflicts for other Pull Requests). Instead, create a new file in the
10 conflicts for other Pull Requests). Instead, create a new file in the
11 `docs/source/whatsnew/pr` folder
11 `docs/source/whatsnew/pr` folder
12
12
13 IPython 6.2 contains all the bugs fixes and features available in IPython 5.5:
14
15 - Built in progress bar support
16 - System Wide config
17
18 As well as the following:
19
20
21 Function signature
22 ------------------
23
24 Terminal IPython will now show the signature of the function while completing.
25 Only the currently highlighted function will show its signature on the line
26 below the completer by default. The functionality is recent so might be
27 limited, we welcome bug report and enhancement request on it. :gh:`10507`
28
29 Assignments return values
30 -------------------------
31
32 IPython can now trigger the display hook on last assignment of cells.
33 Up until 6.0 the following code wouldn't show the value of the assigned
34 variable::
35
36 In[1]: xyz = "something"
37 # nothing shown
38
39 You would have to actually make it the last statement::
40
41 In [2]: xyz = "something else"
42 ... : xyz
43 Out[2]: "something else"
44
45 With the option ``InteractiveShell.ast_node_interactivity='last_expr_or_assign'``
46 you can now do::
47
48 In [2]: xyz = "something else"
49 Out[2]: "something else"
50
51 This option can be toggled at runtime with the ``%config`` magic, and will
52 trigger on assignment ``a = 1``, augmented assignment ``+=``, ``-=``, ``|=`` ...
53 as well as type annotated assignments: ``a:int = 2``.
54
55 See :gh:`10598`
56
13
57
14
58 .. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT.
15 .. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT.
59
16
60
17
61 Backwards incompatible changes
18 Backwards incompatible changes
62 ------------------------------
19 ------------------------------
63
20
64 .. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT.
21 .. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT.
@@ -1,411 +1,413 b''
1 ============
1 ============
2 5.x Series
2 5.x Series
3 ============
3 ============
4
4
5 .. _whatsnew540:
5
6 .. _whatsnew550:
6
7
7 IPython 5.5
8 IPython 5.5
8 ===========
9 ===========
9
10
10 System Wide config
11 System Wide config
11 ------------------
12 ------------------
12
13
13 - IPython now looks for config files in ``{sys.prefix}/etc/ipython``
14 - IPython now looks for config files in ``{sys.prefix}/etc/ipython``
14 for environment-specific configuration.
15 for environment-specific configuration.
15 - Startup files can be found in ``/etc/ipython/startup`` or ``{sys.prefix}/etc/ipython/startup``
16 - Startup files can be found in ``/etc/ipython/startup`` or ``{sys.prefix}/etc/ipython/startup``
16 in addition to the profile directory, for system-wide or env-specific startup files.
17 in addition to the profile directory, for system-wide or env-specific startup files.
17
18
18 See :ghpull:`10644`
19 See :ghpull:`10644`
19
20
20 ProgressBar
21 ProgressBar
21 -----------
22 -----------
22
23
23
24
24 IPython now has built-in support for progressbars::
25 IPython now has built-in support for progressbars::
25
26
26 In[1]: from IPython.display import ProgressBar
27 In[1]: from IPython.display import ProgressBar
27 ... : pb = ProgressBar(100)
28 ... : pb = ProgressBar(100)
28 ... : pb
29 ... : pb
29
30
30 In[2]: pb.progress = 50
31 In[2]: pb.progress = 50
31
32
32 # progress bar in cell 1 updates.
33 # progress bar in cell 1 updates.
33
34
34 See :ghpull:`10755`
35 See :ghpull:`10755`
35
36
36
37
37 Misc
38 Misc
38 ----
39 ----
39
40
40 - Fix ``IPython.core.display:Pretty._repr_pretty_`` had the wrong signature.
41 - Fix ``IPython.core.display:Pretty._repr_pretty_`` had the wrong signature.
41 (:ghpull:`10625`)
42 (:ghpull:`10625`)
42 - :magic:`timeit` now give a correct ``SyntaxError`` if naked ``return`` used.
43 - :magic:`timeit` now give a correct ``SyntaxError`` if naked ``return`` used.
43 (:ghpull:`10637`)
44 (:ghpull:`10637`)
44 - Prepare the ``:ipython:`` directive to be compatible with Sphinx 1.7.
45 - Prepare the ``:ipython:`` directive to be compatible with Sphinx 1.7.
45 (:ghpull:`10668`)
46 (:ghpull:`10668`)
46 - Make IPython work with OpenSSL in FIPS mode; change hash algorithm of input
47 - Make IPython work with OpenSSL in FIPS mode; change hash algorithm of input
47 from md5 to sha1. (:ghpull:`10696`)
48 from md5 to sha1. (:ghpull:`10696`)
48 - Clear breakpoints before running any script with debugger. (:ghpull:`10699`)
49 - Clear breakpoints before running any script with debugger. (:ghpull:`10699`)
49 - Document that :magic:`profile` is deprecated, not to be confused with :magic:`prun`. (:ghpull:`10707`)
50 - Document that :magic:`profile` is deprecated, not to be confused with :magic:`prun`. (:ghpull:`10707`)
50 - Limit default number of returned completions to 500. (:ghpull:`10743`)
51 - Limit default number of returned completions to 500. (:ghpull:`10743`)
51
52
52 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>`_,
53 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>`_,
53 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>`_.
54 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>`_.
54
55
55
56
56
57
57
58
59 .. _whatsnew540:
58
60
59 IPython 5.4
61 IPython 5.4
60 ===========
62 ===========
61
63
62 IPython 5.4-LTS is the first release of IPython after the release of the 6.x
64 IPython 5.4-LTS is the first release of IPython after the release of the 6.x
63 series which is Python 3 only. It backports most of the new exposed API
65 series which is Python 3 only. It backports most of the new exposed API
64 additions made in IPython 6.0 and 6.1 and avoid having to write conditional
66 additions made in IPython 6.0 and 6.1 and avoid having to write conditional
65 logics depending of the version of IPython.
67 logics depending of the version of IPython.
66
68
67 Please upgrade to pip 9 or greater before upgrading IPython.
69 Please upgrade to pip 9 or greater before upgrading IPython.
68 Failing to do so on Python 2 may lead to a broken IPython install.
70 Failing to do so on Python 2 may lead to a broken IPython install.
69
71
70 Configurable TerminalInteractiveShell
72 Configurable TerminalInteractiveShell
71 -------------------------------------
73 -------------------------------------
72
74
73 Backported from the 6.x branch as an exceptional new feature. See
75 Backported from the 6.x branch as an exceptional new feature. See
74 :ghpull:`10373` and :ghissue:`10364`
76 :ghpull:`10373` and :ghissue:`10364`
75
77
76 IPython gained a new ``c.TerminalIPythonApp.interactive_shell_class`` option
78 IPython gained a new ``c.TerminalIPythonApp.interactive_shell_class`` option
77 that allow to customize the class used to start the terminal frontend. This
79 that allow to customize the class used to start the terminal frontend. This
78 should allow user to use custom interfaces, like reviving the former readline
80 should allow user to use custom interfaces, like reviving the former readline
79 interface which is now a separate package not maintained by the core team.
81 interface which is now a separate package not maintained by the core team.
80
82
81
83
82 Define ``_repr_mimebundle_``
84 Define ``_repr_mimebundle_``
83 ----------------------------
85 ----------------------------
84
86
85 Object can now define `_repr_mimebundle_` in place of multiple `_repr_*_`
87 Object can now define `_repr_mimebundle_` in place of multiple `_repr_*_`
86 methods and return a full mimebundle. This greatly simplify many implementation
88 methods and return a full mimebundle. This greatly simplify many implementation
87 and allow to publish custom mimetypes (like geojson, plotly, dataframes....).
89 and allow to publish custom mimetypes (like geojson, plotly, dataframes....).
88 See the ``Cutom Display Logic`` example notebook for more informations.
90 See the ``Cutom Display Logic`` example notebook for more informations.
89
91
90 Execution Heuristics
92 Execution Heuristics
91 --------------------
93 --------------------
92
94
93 The heuristic for execution in the command line interface is now more biased
95 The heuristic for execution in the command line interface is now more biased
94 toward executing for single statement. While in IPython 4.x and before a single
96 toward executing for single statement. While in IPython 4.x and before a single
95 line would be executed when enter is pressed, IPython 5.x would insert a new
97 line would be executed when enter is pressed, IPython 5.x would insert a new
96 line. For single line statement this is not true anymore and if a single line is
98 line. For single line statement this is not true anymore and if a single line is
97 valid Python, IPython will execute it regardless of the cursor position. Use
99 valid Python, IPython will execute it regardless of the cursor position. Use
98 :kbd:`Ctrl-O` to insert a new line. :ghpull:`10489`
100 :kbd:`Ctrl-O` to insert a new line. :ghpull:`10489`
99
101
100
102
101 Implement Display IDs
103 Implement Display IDs
102 ---------------------
104 ---------------------
103
105
104 Implement display id and ability to update a given display. This should greatly
106 Implement display id and ability to update a given display. This should greatly
105 simplify a lot of code by removing the need for widgets and allow other frontend
107 simplify a lot of code by removing the need for widgets and allow other frontend
106 to implement things like progress-bars. See :ghpull:`10048`
108 to implement things like progress-bars. See :ghpull:`10048`
107
109
108 Display function
110 Display function
109 ----------------
111 ----------------
110
112
111 The :func:`display() <IPython.display.display>` function is now available by
113 The :func:`display() <IPython.display.display>` function is now available by
112 default in an IPython session, meaning users can call it on any object to see
114 default in an IPython session, meaning users can call it on any object to see
113 their rich representation. This should allow for better interactivity both at
115 their rich representation. This should allow for better interactivity both at
114 the REPL and in notebook environment.
116 the REPL and in notebook environment.
115
117
116 Scripts and library that rely on display and may be run outside of IPython still
118 Scripts and library that rely on display and may be run outside of IPython still
117 need to import the display function using ``from IPython.display import
119 need to import the display function using ``from IPython.display import
118 display``. See :ghpull:`10596`
120 display``. See :ghpull:`10596`
119
121
120
122
121 Miscs
123 Miscs
122 -----
124 -----
123
125
124 * ``_mp_main_`` is not reloaded which fixes issues with multiprocessing.
126 * ``_mp_main_`` is not reloaded which fixes issues with multiprocessing.
125 :ghpull:`10523`
127 :ghpull:`10523`
126 * Use user colorscheme in Pdb as well :ghpull:`10479`
128 * Use user colorscheme in Pdb as well :ghpull:`10479`
127 * Faster shutdown. :ghpull:`10408`
129 * Faster shutdown. :ghpull:`10408`
128 * Fix a crash in reverse search. :ghpull:`10371`
130 * Fix a crash in reverse search. :ghpull:`10371`
129 * added ``Completer.backslash_combining_completions`` boolean option to
131 * added ``Completer.backslash_combining_completions`` boolean option to
130 deactivate backslash-tab completion that may conflict with windows path.
132 deactivate backslash-tab completion that may conflict with windows path.
131
133
132 IPython 5.3
134 IPython 5.3
133 ===========
135 ===========
134
136
135 Released on February 24th, 2017. Remarkable changes and fixes:
137 Released on February 24th, 2017. Remarkable changes and fixes:
136
138
137 * Fix a bug in ``set_next_input`` leading to a crash of terminal IPython.
139 * Fix a bug in ``set_next_input`` leading to a crash of terminal IPython.
138 :ghpull:`10231`, :ghissue:`10296`, :ghissue:`10229`
140 :ghpull:`10231`, :ghissue:`10296`, :ghissue:`10229`
139 * Always wait for editor inputhook for terminal IPython :ghpull:`10239`,
141 * Always wait for editor inputhook for terminal IPython :ghpull:`10239`,
140 :ghpull:`10240`
142 :ghpull:`10240`
141 * Disable ``_ipython_display_`` in terminal :ghpull:`10249`, :ghpull:`10274`
143 * Disable ``_ipython_display_`` in terminal :ghpull:`10249`, :ghpull:`10274`
142 * Update terminal colors to be more visible by default on windows
144 * Update terminal colors to be more visible by default on windows
143 :ghpull:`10260`, :ghpull:`10238`, :ghissue:`10281`
145 :ghpull:`10260`, :ghpull:`10238`, :ghissue:`10281`
144 * Add Ctrl-Z shortcut (suspend) in terminal debugger :ghpull:`10254`,
146 * Add Ctrl-Z shortcut (suspend) in terminal debugger :ghpull:`10254`,
145 :ghissue:`10273`
147 :ghissue:`10273`
146 * Indent on new line by looking at the text before the cursor :ghpull:`10264`,
148 * Indent on new line by looking at the text before the cursor :ghpull:`10264`,
147 :ghpull:`10275`, :ghissue:`9283`
149 :ghpull:`10275`, :ghissue:`9283`
148 * Update QtEventloop integration to fix some matplotlib integration issues
150 * Update QtEventloop integration to fix some matplotlib integration issues
149 :ghpull:`10201`, :ghpull:`10311`, :ghissue:`10201`
151 :ghpull:`10201`, :ghpull:`10311`, :ghissue:`10201`
150 * Respect completions display style in terminal debugger :ghpull:`10305`,
152 * Respect completions display style in terminal debugger :ghpull:`10305`,
151 :ghpull:`10313`
153 :ghpull:`10313`
152 * Add a config option ``TerminalInteractiveShell.extra_open_editor_shortcuts``
154 * Add a config option ``TerminalInteractiveShell.extra_open_editor_shortcuts``
153 to enable extra shortcuts to open the input in an editor. These are :kbd:`v`
155 to enable extra shortcuts to open the input in an editor. These are :kbd:`v`
154 in vi mode, and :kbd:`C-X C-E` in emacs mode (:ghpull:`10330`).
156 in vi mode, and :kbd:`C-X C-E` in emacs mode (:ghpull:`10330`).
155 The :kbd:`F2` shortcut is always enabled.
157 The :kbd:`F2` shortcut is always enabled.
156
158
157 IPython 5.2.2
159 IPython 5.2.2
158 =============
160 =============
159
161
160 * Fix error when starting with ``IPCompleter.limit_to__all__`` configured.
162 * Fix error when starting with ``IPCompleter.limit_to__all__`` configured.
161
163
162 IPython 5.2.1
164 IPython 5.2.1
163 =============
165 =============
164
166
165 * Fix tab completion in the debugger. :ghpull:`10223`
167 * Fix tab completion in the debugger. :ghpull:`10223`
166
168
167 IPython 5.2
169 IPython 5.2
168 ===========
170 ===========
169
171
170 Released on January 29th, 2017. Remarkable changes and fixes:
172 Released on January 29th, 2017. Remarkable changes and fixes:
171
173
172 * restore IPython's debugger to raise on quit. :ghpull:`10009`
174 * restore IPython's debugger to raise on quit. :ghpull:`10009`
173 * The configuration value ``c.TerminalInteractiveShell.highlighting_style`` can
175 * The configuration value ``c.TerminalInteractiveShell.highlighting_style`` can
174 now directly take a class argument for custom color style. :ghpull:`9848`
176 now directly take a class argument for custom color style. :ghpull:`9848`
175 * Correctly handle matplotlib figures dpi :ghpull:`9868`
177 * Correctly handle matplotlib figures dpi :ghpull:`9868`
176 * Deprecate ``-e`` flag for the ``%notebook`` magic that had no effects.
178 * Deprecate ``-e`` flag for the ``%notebook`` magic that had no effects.
177 :ghpull:`9872`
179 :ghpull:`9872`
178 * You can now press F2 while typing at a terminal prompt to edit the contents
180 * You can now press F2 while typing at a terminal prompt to edit the contents
179 in your favourite terminal editor. Set the :envvar:`EDITOR` environment
181 in your favourite terminal editor. Set the :envvar:`EDITOR` environment
180 variable to pick which editor is used. :ghpull:`9929`
182 variable to pick which editor is used. :ghpull:`9929`
181 * sdists will now only be ``.tar.gz`` as per upstream PyPI requirements.
183 * sdists will now only be ``.tar.gz`` as per upstream PyPI requirements.
182 :ghpull:`9925`
184 :ghpull:`9925`
183 * :any:`IPython.core.debugger` have gained a ``set_trace()`` method for
185 * :any:`IPython.core.debugger` have gained a ``set_trace()`` method for
184 convenience. :ghpull:`9947`
186 convenience. :ghpull:`9947`
185 * The 'smart command mode' added to the debugger in 5.0 was removed, as more
187 * The 'smart command mode' added to the debugger in 5.0 was removed, as more
186 people preferred the previous behaviour. Therefore, debugger commands such as
188 people preferred the previous behaviour. Therefore, debugger commands such as
187 ``c`` will act as debugger commands even when ``c`` is defined as a variable.
189 ``c`` will act as debugger commands even when ``c`` is defined as a variable.
188 :ghpull:`10050`
190 :ghpull:`10050`
189 * Fixes OS X event loop issues at startup, :ghpull:`10150`
191 * Fixes OS X event loop issues at startup, :ghpull:`10150`
190 * Deprecate the ``%autoindent`` magic. :ghpull:`10176`
192 * Deprecate the ``%autoindent`` magic. :ghpull:`10176`
191 * Emit a :any:`DeprecationWarning` when setting the deprecated
193 * Emit a :any:`DeprecationWarning` when setting the deprecated
192 ``limit_to_all`` option of the completer. :ghpull:`10198`
194 ``limit_to_all`` option of the completer. :ghpull:`10198`
193 * The :cellmagic:`capture` magic can now capture the result of a cell (from an
195 * The :cellmagic:`capture` magic can now capture the result of a cell (from an
194 expression on the last line), as well as printed and displayed output.
196 expression on the last line), as well as printed and displayed output.
195 :ghpull:`9851`.
197 :ghpull:`9851`.
196
198
197
199
198 Changes of behavior to :any:`InteractiveShellEmbed`.
200 Changes of behavior to :any:`InteractiveShellEmbed`.
199
201
200 :any:`InteractiveShellEmbed` interactive behavior have changed a bit in between
202 :any:`InteractiveShellEmbed` interactive behavior have changed a bit in between
201 5.1 and 5.2. By default ``%kill_embedded`` magic will prevent further invocation
203 5.1 and 5.2. By default ``%kill_embedded`` magic will prevent further invocation
202 of the current ``call location`` instead of preventing further invocation of
204 of the current ``call location`` instead of preventing further invocation of
203 the current instance creation location. For most use case this will not change
205 the current instance creation location. For most use case this will not change
204 much for you, though previous behavior was confusing and less consistent with
206 much for you, though previous behavior was confusing and less consistent with
205 previous IPython versions.
207 previous IPython versions.
206
208
207 You can now deactivate instances by using ``%kill_embedded --instance`` flag,
209 You can now deactivate instances by using ``%kill_embedded --instance`` flag,
208 (or ``-i`` in short). The ``%kill_embedded`` magic also gained a
210 (or ``-i`` in short). The ``%kill_embedded`` magic also gained a
209 ``--yes``/``-y`` option which skip confirmation step, and ``-x``/``--exit``
211 ``--yes``/``-y`` option which skip confirmation step, and ``-x``/``--exit``
210 which also exit the current embedded call without asking for confirmation.
212 which also exit the current embedded call without asking for confirmation.
211
213
212 See :ghpull:`10207`.
214 See :ghpull:`10207`.
213
215
214
216
215
217
216 IPython 5.1
218 IPython 5.1
217 ===========
219 ===========
218
220
219 * Broken ``%timeit`` on Python2 due to the use of ``__qualname__``. :ghpull:`9804`
221 * Broken ``%timeit`` on Python2 due to the use of ``__qualname__``. :ghpull:`9804`
220 * Restore ``%gui qt`` to create and return a ``QApplication`` if necessary. :ghpull:`9789`
222 * Restore ``%gui qt`` to create and return a ``QApplication`` if necessary. :ghpull:`9789`
221 * Don't set terminal title by default. :ghpull:`9801`
223 * Don't set terminal title by default. :ghpull:`9801`
222 * Preserve indentation when inserting newlines with ``Ctrl-O``. :ghpull:`9770`
224 * Preserve indentation when inserting newlines with ``Ctrl-O``. :ghpull:`9770`
223 * Restore completion in debugger. :ghpull:`9785`
225 * Restore completion in debugger. :ghpull:`9785`
224 * Deprecate ``IPython.core.debugger.Tracer()`` in favor of simpler, newer, APIs. :ghpull:`9731`
226 * Deprecate ``IPython.core.debugger.Tracer()`` in favor of simpler, newer, APIs. :ghpull:`9731`
225 * Restore ``NoOpContext`` context manager removed by mistake, and add `DeprecationWarning`. :ghpull:`9765`
227 * Restore ``NoOpContext`` context manager removed by mistake, and add `DeprecationWarning`. :ghpull:`9765`
226 * Add option allowing ``Prompt_toolkit`` to use 24bits colors. :ghpull:`9736`
228 * Add option allowing ``Prompt_toolkit`` to use 24bits colors. :ghpull:`9736`
227 * Fix for closing interactive matplotlib windows on OS X. :ghpull:`9854`
229 * Fix for closing interactive matplotlib windows on OS X. :ghpull:`9854`
228 * An embedded interactive shell instance can be used more than once. :ghpull:`9843`
230 * An embedded interactive shell instance can be used more than once. :ghpull:`9843`
229 * More robust check for whether IPython is in a terminal. :ghpull:`9833`
231 * More robust check for whether IPython is in a terminal. :ghpull:`9833`
230 * Better pretty-printing of dicts on PyPy. :ghpull:`9827`
232 * Better pretty-printing of dicts on PyPy. :ghpull:`9827`
231 * Some coloured output now looks better on dark background command prompts in Windows.
233 * Some coloured output now looks better on dark background command prompts in Windows.
232 :ghpull:`9838`
234 :ghpull:`9838`
233 * Improved tab completion of paths on Windows . :ghpull:`9826`
235 * Improved tab completion of paths on Windows . :ghpull:`9826`
234 * Fix tkinter event loop integration on Python 2 with ``future`` installed. :ghpull:`9824`
236 * Fix tkinter event loop integration on Python 2 with ``future`` installed. :ghpull:`9824`
235 * Restore ``Ctrl-\`` as a shortcut to quit IPython.
237 * Restore ``Ctrl-\`` as a shortcut to quit IPython.
236 * Make ``get_ipython()`` accessible when modules are imported by startup files. :ghpull:`9818`
238 * Make ``get_ipython()`` accessible when modules are imported by startup files. :ghpull:`9818`
237 * Add support for running directories containing a ``__main__.py`` file with the
239 * Add support for running directories containing a ``__main__.py`` file with the
238 ``ipython`` command. :ghpull:`9813`
240 ``ipython`` command. :ghpull:`9813`
239
241
240
242
241 True Color feature
243 True Color feature
242 ------------------
244 ------------------
243
245
244 ``prompt_toolkit`` uses pygments styles for syntax highlighting. By default, the
246 ``prompt_toolkit`` uses pygments styles for syntax highlighting. By default, the
245 colors specified in the style are approximated using a standard 256-color
247 colors specified in the style are approximated using a standard 256-color
246 palette. ``prompt_toolkit`` also supports 24bit, a.k.a. "true", a.k.a. 16-million
248 palette. ``prompt_toolkit`` also supports 24bit, a.k.a. "true", a.k.a. 16-million
247 color escape sequences which enable compatible terminals to display the exact
249 color escape sequences which enable compatible terminals to display the exact
248 colors specified instead of an approximation. This true_color option exposes
250 colors specified instead of an approximation. This true_color option exposes
249 that capability in prompt_toolkit to the IPython shell.
251 that capability in prompt_toolkit to the IPython shell.
250
252
251 Here is a good source for the current state of true color support in various
253 Here is a good source for the current state of true color support in various
252 terminal emulators and software projects: https://gist.github.com/XVilka/8346728
254 terminal emulators and software projects: https://gist.github.com/XVilka/8346728
253
255
254
256
255
257
256 IPython 5.0
258 IPython 5.0
257 ===========
259 ===========
258
260
259 Released July 7, 2016
261 Released July 7, 2016
260
262
261 New terminal interface
263 New terminal interface
262 ----------------------
264 ----------------------
263
265
264 IPython 5 features a major upgrade to the terminal interface, bringing live
266 IPython 5 features a major upgrade to the terminal interface, bringing live
265 syntax highlighting as you type, proper multiline editing and multiline paste,
267 syntax highlighting as you type, proper multiline editing and multiline paste,
266 and tab completions that don't clutter up your history.
268 and tab completions that don't clutter up your history.
267
269
268 .. image:: ../_images/ptshell_features.png
270 .. image:: ../_images/ptshell_features.png
269 :alt: New terminal interface features
271 :alt: New terminal interface features
270 :align: center
272 :align: center
271 :target: ../_images/ptshell_features.png
273 :target: ../_images/ptshell_features.png
272
274
273 These features are provided by the Python library `prompt_toolkit
275 These features are provided by the Python library `prompt_toolkit
274 <http://python-prompt-toolkit.readthedocs.io/en/stable/>`__, which replaces
276 <http://python-prompt-toolkit.readthedocs.io/en/stable/>`__, which replaces
275 ``readline`` throughout our terminal interface.
277 ``readline`` throughout our terminal interface.
276
278
277 Relying on this pure-Python, cross platform module also makes it simpler to
279 Relying on this pure-Python, cross platform module also makes it simpler to
278 install IPython. We have removed dependencies on ``pyreadline`` for Windows and
280 install IPython. We have removed dependencies on ``pyreadline`` for Windows and
279 ``gnureadline`` for Mac.
281 ``gnureadline`` for Mac.
280
282
281 Backwards incompatible changes
283 Backwards incompatible changes
282 ------------------------------
284 ------------------------------
283
285
284 - The ``%install_ext`` magic function, deprecated since 4.0, has now been deleted.
286 - The ``%install_ext`` magic function, deprecated since 4.0, has now been deleted.
285 You can distribute and install extensions as packages on PyPI.
287 You can distribute and install extensions as packages on PyPI.
286 - Callbacks registered while an event is being handled will now only be called
288 - Callbacks registered while an event is being handled will now only be called
287 for subsequent events; previously they could be called for the current event.
289 for subsequent events; previously they could be called for the current event.
288 Similarly, callbacks removed while handling an event *will* always get that
290 Similarly, callbacks removed while handling an event *will* always get that
289 event. See :ghissue:`9447` and :ghpull:`9453`.
291 event. See :ghissue:`9447` and :ghpull:`9453`.
290 - Integration with pydb has been removed since pydb development has been stopped
292 - Integration with pydb has been removed since pydb development has been stopped
291 since 2012, and pydb is not installable from PyPI.
293 since 2012, and pydb is not installable from PyPI.
292 - The ``autoedit_syntax`` option has apparently been broken for many years.
294 - The ``autoedit_syntax`` option has apparently been broken for many years.
293 It has been removed.
295 It has been removed.
294
296
295 New terminal interface
297 New terminal interface
296 ~~~~~~~~~~~~~~~~~~~~~~
298 ~~~~~~~~~~~~~~~~~~~~~~
297
299
298 The overhaul of the terminal interface will probably cause a range of minor
300 The overhaul of the terminal interface will probably cause a range of minor
299 issues for existing users.
301 issues for existing users.
300 This is inevitable for such a significant change, and we've done our best to
302 This is inevitable for such a significant change, and we've done our best to
301 minimise these issues.
303 minimise these issues.
302 Some changes that we're aware of, with suggestions on how to handle them:
304 Some changes that we're aware of, with suggestions on how to handle them:
303
305
304 IPython no longer uses readline configuration (``~/.inputrc``). We hope that
306 IPython no longer uses readline configuration (``~/.inputrc``). We hope that
305 the functionality you want (e.g. vi input mode) will be available by configuring
307 the functionality you want (e.g. vi input mode) will be available by configuring
306 IPython directly (see :doc:`/config/options/terminal`).
308 IPython directly (see :doc:`/config/options/terminal`).
307 If something's missing, please file an issue.
309 If something's missing, please file an issue.
308
310
309 The ``PromptManager`` class has been removed, and the prompt machinery simplified.
311 The ``PromptManager`` class has been removed, and the prompt machinery simplified.
310 See :ref:`custom_prompts` to customise prompts with the new machinery.
312 See :ref:`custom_prompts` to customise prompts with the new machinery.
311
313
312 :mod:`IPython.core.debugger` now provides a plainer interface.
314 :mod:`IPython.core.debugger` now provides a plainer interface.
313 :mod:`IPython.terminal.debugger` contains the terminal debugger using
315 :mod:`IPython.terminal.debugger` contains the terminal debugger using
314 prompt_toolkit.
316 prompt_toolkit.
315
317
316 There are new options to configure the colours used in syntax highlighting.
318 There are new options to configure the colours used in syntax highlighting.
317 We have tried to integrate them with our classic ``--colors`` option and
319 We have tried to integrate them with our classic ``--colors`` option and
318 ``%colors`` magic, but there's a mismatch in possibilities, so some configurations
320 ``%colors`` magic, but there's a mismatch in possibilities, so some configurations
319 may produce unexpected results. See :ref:`termcolour` for more information.
321 may produce unexpected results. See :ref:`termcolour` for more information.
320
322
321 The new interface is not compatible with Emacs 'inferior-shell' feature. To
323 The new interface is not compatible with Emacs 'inferior-shell' feature. To
322 continue using this, add the ``--simple-prompt`` flag to the command Emacs
324 continue using this, add the ``--simple-prompt`` flag to the command Emacs
323 runs. This flag disables most IPython features, relying on Emacs to provide
325 runs. This flag disables most IPython features, relying on Emacs to provide
324 things like tab completion.
326 things like tab completion.
325
327
326 Provisional Changes
328 Provisional Changes
327 -------------------
329 -------------------
328
330
329 Provisional changes are experimental functionality that may, or may not, make
331 Provisional changes are experimental functionality that may, or may not, make
330 it into a future version of IPython, and which API may change without warnings.
332 it into a future version of IPython, and which API may change without warnings.
331 Activating these features and using these API are at your own risk, and may have
333 Activating these features and using these API are at your own risk, and may have
332 security implication for your system, especially if used with the Jupyter notebook,
334 security implication for your system, especially if used with the Jupyter notebook,
333
335
334 When running via the Jupyter notebook interfaces, or other compatible client,
336 When running via the Jupyter notebook interfaces, or other compatible client,
335 you can enable rich documentation experimental functionality:
337 you can enable rich documentation experimental functionality:
336
338
337 When the ``docrepr`` package is installed setting the boolean flag
339 When the ``docrepr`` package is installed setting the boolean flag
338 ``InteractiveShell.sphinxify_docstring`` to ``True``, will process the various
340 ``InteractiveShell.sphinxify_docstring`` to ``True``, will process the various
339 object through sphinx before displaying them (see the ``docrepr`` package
341 object through sphinx before displaying them (see the ``docrepr`` package
340 documentation for more information.
342 documentation for more information.
341
343
342 You need to also enable the IPython pager display rich HTML representation
344 You need to also enable the IPython pager display rich HTML representation
343 using the ``InteractiveShell.enable_html_pager`` boolean configuration option.
345 using the ``InteractiveShell.enable_html_pager`` boolean configuration option.
344 As usual you can set these configuration options globally in your configuration
346 As usual you can set these configuration options globally in your configuration
345 files, alternatively you can turn them on dynamically using the following
347 files, alternatively you can turn them on dynamically using the following
346 snippet:
348 snippet:
347
349
348 .. code-block:: python
350 .. code-block:: python
349
351
350 ip = get_ipython()
352 ip = get_ipython()
351 ip.sphinxify_docstring = True
353 ip.sphinxify_docstring = True
352 ip.enable_html_pager = True
354 ip.enable_html_pager = True
353
355
354
356
355 You can test the effect of various combinations of the above configuration in
357 You can test the effect of various combinations of the above configuration in
356 the Jupyter notebook, with things example like :
358 the Jupyter notebook, with things example like :
357
359
358 .. code-block:: ipython
360 .. code-block:: ipython
359
361
360 import numpy as np
362 import numpy as np
361 np.histogram?
363 np.histogram?
362
364
363
365
364 This is part of an effort to make Documentation in Python richer and provide in
366 This is part of an effort to make Documentation in Python richer and provide in
365 the long term if possible dynamic examples that can contain math, images,
367 the long term if possible dynamic examples that can contain math, images,
366 widgets... As stated above this is nightly experimental feature with a lot of
368 widgets... As stated above this is nightly experimental feature with a lot of
367 (fun) problem to solve. We would be happy to get your feedback and expertise on
369 (fun) problem to solve. We would be happy to get your feedback and expertise on
368 it.
370 it.
369
371
370
372
371
373
372 Deprecated Features
374 Deprecated Features
373 -------------------
375 -------------------
374
376
375 Some deprecated features are listed in this section. Don't forget to enable
377 Some deprecated features are listed in this section. Don't forget to enable
376 ``DeprecationWarning`` as an error if you are using IPython in a Continuous
378 ``DeprecationWarning`` as an error if you are using IPython in a Continuous
377 Integration setup or in your testing in general:
379 Integration setup or in your testing in general:
378
380
379 .. code-block:: python
381 .. code-block:: python
380
382
381 import warnings
383 import warnings
382 warnings.filterwarnings('error', '.*', DeprecationWarning, module='yourmodule.*')
384 warnings.filterwarnings('error', '.*', DeprecationWarning, module='yourmodule.*')
383
385
384
386
385 - ``hooks.fix_error_editor`` seems unused and is pending deprecation.
387 - ``hooks.fix_error_editor`` seems unused and is pending deprecation.
386 - `IPython/core/excolors.py:ExceptionColors` is deprecated.
388 - `IPython/core/excolors.py:ExceptionColors` is deprecated.
387 - `IPython.core.InteractiveShell:write()` is deprecated; use `sys.stdout` instead.
389 - `IPython.core.InteractiveShell:write()` is deprecated; use `sys.stdout` instead.
388 - `IPython.core.InteractiveShell:write_err()` is deprecated; use `sys.stderr` instead.
390 - `IPython.core.InteractiveShell:write_err()` is deprecated; use `sys.stderr` instead.
389 - The `formatter` keyword argument to `Inspector.info` in `IPython.core.oinspec` has no effect.
391 - The `formatter` keyword argument to `Inspector.info` in `IPython.core.oinspec` has no effect.
390 - The `global_ns` keyword argument of IPython Embed was deprecated, and has no effect. Use `module` keyword argument instead.
392 - The `global_ns` keyword argument of IPython Embed was deprecated, and has no effect. Use `module` keyword argument instead.
391
393
392
394
393 Known Issues:
395 Known Issues:
394 -------------
396 -------------
395
397
396 - ``<Esc>`` Key does not dismiss the completer and does not clear the current
398 - ``<Esc>`` Key does not dismiss the completer and does not clear the current
397 buffer. This is an on purpose modification due to current technical
399 buffer. This is an on purpose modification due to current technical
398 limitation. Cf :ghpull:`9572`. Escape the control character which is used
400 limitation. Cf :ghpull:`9572`. Escape the control character which is used
399 for other shortcut, and there is no practical way to distinguish. Use Ctr-G
401 for other shortcut, and there is no practical way to distinguish. Use Ctr-G
400 or Ctrl-C as an alternative.
402 or Ctrl-C as an alternative.
401
403
402 - Cannot use ``Shift-Enter`` and ``Ctrl-Enter`` to submit code in terminal. cf
404 - Cannot use ``Shift-Enter`` and ``Ctrl-Enter`` to submit code in terminal. cf
403 :ghissue:`9587` and :ghissue:`9401`. In terminal there is no practical way to
405 :ghissue:`9587` and :ghissue:`9401`. In terminal there is no practical way to
404 distinguish these key sequences from a normal new line return.
406 distinguish these key sequences from a normal new line return.
405
407
406 - ``PageUp`` and ``pageDown`` do not move through completion menu.
408 - ``PageUp`` and ``pageDown`` do not move through completion menu.
407
409
408 - Color styles might not adapt to terminal emulator themes. This will need new
410 - Color styles might not adapt to terminal emulator themes. This will need new
409 version of Pygments to be released, and can be mitigated with custom themes.
411 version of Pygments to be released, and can be mitigated with custom themes.
410
412
411
413
@@ -1,250 +1,299 b''
1 ============
1 ============
2 6.x Series
2 6.x Series
3 ============
3 ============
4
4
5
6 .. _whatsnew620:
7
8 IPython 6.2
9 ===========
10
11
12 IPython 6.2 contains all the bugs fixes and features :ref:`available in IPython 5.5 <whatsnew550>`,
13 like built in progress bar support, and system-wide configuration
14
15 The following features are specific to IPython 6.2:
16
17 Function signature in completions
18 ---------------------------------
19
20 Terminal IPython will now show the signature of the function while completing.
21 Only the currently highlighted function will show its signature on the line
22 below the completer by default. This functionality is recent, so it might be
23 limited; we welcome bug reports and requests for enhancements. :ghpull:`10507`
24
25 Assignments return values
26 -------------------------
27
28 IPython can now trigger the display hook on the last assignment of cells.
29 Up until 6.2 the following code wouldn't show the value of the assigned
30 variable::
31
32 In[1]: xyz = "something"
33 # nothing shown
34
35 You would have to actually make it the last statement::
36
37 In [2]: xyz = "something else"
38 ... : xyz
39 Out[2]: "something else"
40
41 With the option ``InteractiveShell.ast_node_interactivity='last_expr_or_assign'``
42 you can now do::
43
44 In [2]: xyz = "something else"
45 Out[2]: "something else"
46
47 This option can be toggled at runtime with the ``%config`` magic, and will
48 trigger on assignment ``a = 1``, augmented assignment ``+=``, ``-=``, ``|=`` ...
49 as well as type annotated assignments: ``a:int = 2``.
50
51 See :ghpull:`10598`
52
53
5 .. _whatsnew610:
54 .. _whatsnew610:
6
55
7 IPython 6.1
56 IPython 6.1
8 ===========
57 ===========
9
58
10 - Quotes in a filename are always escaped during tab-completion on non-Windows.
59 - Quotes in a filename are always escaped during tab-completion on non-Windows.
11 :ghpull:`10069`
60 :ghpull:`10069`
12
61
13 - Variables now shadow magics in autocompletion. See :ghissue:`4877` and :ghpull:`10542`.
62 - Variables now shadow magics in autocompletion. See :ghissue:`4877` and :ghpull:`10542`.
14
63
15 - Added the ability to add parameters to alias_magic. For example::
64 - Added the ability to add parameters to alias_magic. For example::
16
65
17 In [2]: %alias_magic hist history --params "-l 2" --line
66 In [2]: %alias_magic hist history --params "-l 2" --line
18 Created `%hist` as an alias for `%history -l 2`.
67 Created `%hist` as an alias for `%history -l 2`.
19
68
20 In [3]: hist
69 In [3]: hist
21 %alias_magic hist history --params "-l 30" --line
70 %alias_magic hist history --params "-l 30" --line
22 %alias_magic hist history --params "-l 2" --line
71 %alias_magic hist history --params "-l 2" --line
23
72
24 Previously it was only possible to have an alias attached to a single function,
73 Previously it was only possible to have an alias attached to a single function,
25 and you would have to pass in the given parameters every time::
74 and you would have to pass in the given parameters every time::
26
75
27 In [4]: %alias_magic hist history --line
76 In [4]: %alias_magic hist history --line
28 Created `%hist` as an alias for `%history`.
77 Created `%hist` as an alias for `%history`.
29
78
30 In [5]: hist -l 2
79 In [5]: hist -l 2
31 hist
80 hist
32 %alias_magic hist history --line
81 %alias_magic hist history --line
33
82
34 - To suppress log state messages, you can now either use ``%logstart -q``, pass
83 - To suppress log state messages, you can now either use ``%logstart -q``, pass
35 ``--LoggingMagics.quiet=True`` on the command line, or set
84 ``--LoggingMagics.quiet=True`` on the command line, or set
36 ``c.LoggingMagics.quiet=True`` in your configuration file.
85 ``c.LoggingMagics.quiet=True`` in your configuration file.
37
86
38 - An additional flag ``--TerminalInteractiveShell.term_title_format`` is
87 - An additional flag ``--TerminalInteractiveShell.term_title_format`` is
39 introduced to allow the user to control the format of the terminal title. It
88 introduced to allow the user to control the format of the terminal title. It
40 is specified as a python format string, and currently the only variable it
89 is specified as a python format string, and currently the only variable it
41 will format is ``{cwd}``.
90 will format is ``{cwd}``.
42
91
43 - ``??``/``%pinfo2`` will now show object docstrings if the source can't be retrieved. :ghpull:`10532`
92 - ``??``/``%pinfo2`` will now show object docstrings if the source can't be retrieved. :ghpull:`10532`
44 - ``IPython.display`` has gained a ``%markdown`` cell magic. :ghpull:`10563`
93 - ``IPython.display`` has gained a ``%markdown`` cell magic. :ghpull:`10563`
45 - ``%config`` options can now be tab completed. :ghpull:`10555`
94 - ``%config`` options can now be tab completed. :ghpull:`10555`
46 - ``%config`` with no arguments are now unique and sorted. :ghpull:`10548`
95 - ``%config`` with no arguments are now unique and sorted. :ghpull:`10548`
47 - Completion on keyword arguments does not duplicate ``=`` sign if already present. :ghpull:`10547`
96 - Completion on keyword arguments does not duplicate ``=`` sign if already present. :ghpull:`10547`
48 - ``%run -m <module>`` now ``<module>`` passes extra arguments to ``<module>``. :ghpull:`10546`
97 - ``%run -m <module>`` now ``<module>`` passes extra arguments to ``<module>``. :ghpull:`10546`
49 - completer now understand "snake case auto complete": if ``foo_bar_kittens`` is
98 - completer now understand "snake case auto complete": if ``foo_bar_kittens`` is
50 a valid completion, I can type ``f_b<tab>`` will complete to it. :ghpull:`10537`
99 a valid completion, I can type ``f_b<tab>`` will complete to it. :ghpull:`10537`
51 - tracebacks are better standardized and will compress `/path/to/home` to `~`. :ghpull:`10515`
100 - tracebacks are better standardized and will compress `/path/to/home` to `~`. :ghpull:`10515`
52
101
53 The following changes were also added to IPython 5.4, see :ref:`what's new in IPython 5.4 <whatsnew540>`
102 The following changes were also added to IPython 5.4, see :ref:`what's new in IPython 5.4 <whatsnew540>`
54 for more detail description:
103 for more detail description:
55
104
56 - ``TerminalInteractiveShell`` is configurable and can be configured to
105 - ``TerminalInteractiveShell`` is configurable and can be configured to
57 (re)-use the readline interface.
106 (re)-use the readline interface.
58
107
59 - objects can now define a ``_repr_mimebundle_``
108 - objects can now define a ``_repr_mimebundle_``
60
109
61 - Execution heuristics improve for single line statements
110 - Execution heuristics improve for single line statements
62 - ``display()`` can now return a display id to update display areas.
111 - ``display()`` can now return a display id to update display areas.
63
112
64
113
65 .. _whatsnew600:
114 .. _whatsnew600:
66
115
67 IPython 6.0
116 IPython 6.0
68 ===========
117 ===========
69
118
70 Released April 19th, 2017
119 Released April 19th, 2017
71
120
72 IPython 6 features a major improvement in the completion machinery which is now
121 IPython 6 features a major improvement in the completion machinery which is now
73 capable of completing non-executed code. It is also the first version of IPython
122 capable of completing non-executed code. It is also the first version of IPython
74 to stop compatibility with Python 2, which is still supported on the bugfix only
123 to stop compatibility with Python 2, which is still supported on the bugfix only
75 5.x branch. Read below for a non-exhaustive list of new features.
124 5.x branch. Read below for a non-exhaustive list of new features.
76
125
77 Make sure you have pip > 9.0 before upgrading.
126 Make sure you have pip > 9.0 before upgrading.
78 You should be able to update by using:
127 You should be able to update by using:
79
128
80 .. code::
129 .. code::
81
130
82 pip install ipython --upgrade
131 pip install ipython --upgrade
83
132
84
133
85 .. note::
134 .. note::
86
135
87 If your pip version is greater than or equal to pip 9.0.1 you will automatically get
136 If your pip version is greater than or equal to pip 9.0.1 you will automatically get
88 the most recent version of IPython compatible with your system: on Python 2 you
137 the most recent version of IPython compatible with your system: on Python 2 you
89 will get the latest IPython 5.x bugfix, while in Python 3
138 will get the latest IPython 5.x bugfix, while in Python 3
90 you will get the latest 6.x stable version.
139 you will get the latest 6.x stable version.
91
140
92 New completion API and Interface
141 New completion API and Interface
93 --------------------------------
142 --------------------------------
94
143
95 The completer Completion API has seen an overhaul, and the new completer has
144 The completer Completion API has seen an overhaul, and the new completer has
96 plenty of improvements both from the end users of terminal IPython and for
145 plenty of improvements both from the end users of terminal IPython and for
97 consumers of the API.
146 consumers of the API.
98
147
99 This new API is capable of pulling completions from :any:`jedi`, thus allowing
148 This new API is capable of pulling completions from :any:`jedi`, thus allowing
100 type inference on non-executed code. If :any:`jedi` is installed, completions like
149 type inference on non-executed code. If :any:`jedi` is installed, completions like
101 the following are now possible without code evaluation:
150 the following are now possible without code evaluation:
102
151
103 >>> data = ['Number of users', 123_456]
152 >>> data = ['Number of users', 123_456]
104 ... data[0].<tab>
153 ... data[0].<tab>
105
154
106 That is to say, IPython is now capable of inferring that `data[0]` is a string,
155 That is to say, IPython is now capable of inferring that `data[0]` is a string,
107 and will suggest completions like `.capitalize`. The completion power of IPython
156 and will suggest completions like `.capitalize`. The completion power of IPython
108 will increase with new Jedi releases, and a number of bug-fixes and more completions
157 will increase with new Jedi releases, and a number of bug-fixes and more completions
109 are already available on the development version of :any:`jedi` if you are curious.
158 are already available on the development version of :any:`jedi` if you are curious.
110
159
111 With the help of prompt toolkit, types of completions can be shown in the
160 With the help of prompt toolkit, types of completions can be shown in the
112 completer interface:
161 completer interface:
113
162
114 .. image:: ../_images/jedi_type_inference_60.png
163 .. image:: ../_images/jedi_type_inference_60.png
115 :alt: Jedi showing ability to do type inference
164 :alt: Jedi showing ability to do type inference
116 :align: center
165 :align: center
117 :width: 400px
166 :width: 400px
118 :target: ../_images/jedi_type_inference_60.png
167 :target: ../_images/jedi_type_inference_60.png
119
168
120 The appearance of the completer is controlled by the
169 The appearance of the completer is controlled by the
121 ``c.TerminalInteractiveShell.display_completions`` option that will show the
170 ``c.TerminalInteractiveShell.display_completions`` option that will show the
122 type differently depending on the value among ``'column'``, ``'multicolumn'``
171 type differently depending on the value among ``'column'``, ``'multicolumn'``
123 and ``'readlinelike'``
172 and ``'readlinelike'``
124
173
125 The use of Jedi also fulfills a number of requests and fixes a number of bugs
174 The use of Jedi also fulfills a number of requests and fixes a number of bugs
126 like case-insensitive completion and completion after division operator: See
175 like case-insensitive completion and completion after division operator: See
127 :ghpull:`10182`.
176 :ghpull:`10182`.
128
177
129 Extra patches and updates will be needed to the :mod:`ipykernel` package for
178 Extra patches and updates will be needed to the :mod:`ipykernel` package for
130 this feature to be available to other clients like Jupyter Notebook, Lab,
179 this feature to be available to other clients like Jupyter Notebook, Lab,
131 Nteract, Hydrogen...
180 Nteract, Hydrogen...
132
181
133 The use of Jedi should be barely noticeable on recent machines, but
182 The use of Jedi should be barely noticeable on recent machines, but
134 can be slower on older ones. To tweak the performance, the amount
183 can be slower on older ones. To tweak the performance, the amount
135 of time given to Jedi to compute type inference can be adjusted with
184 of time given to Jedi to compute type inference can be adjusted with
136 ``c.IPCompleter.jedi_compute_type_timeout``. The objects whose type were not
185 ``c.IPCompleter.jedi_compute_type_timeout``. The objects whose type were not
137 inferred will be shown as ``<unknown>``. Jedi can also be completely deactivated
186 inferred will be shown as ``<unknown>``. Jedi can also be completely deactivated
138 by using the ``c.Completer.use_jedi=False`` option.
187 by using the ``c.Completer.use_jedi=False`` option.
139
188
140
189
141 The old ``Completer.complete()`` API is waiting deprecation and should be
190 The old ``Completer.complete()`` API is waiting deprecation and should be
142 replaced replaced by ``Completer.completions()`` in the near future. Feedback on
191 replaced replaced by ``Completer.completions()`` in the near future. Feedback on
143 the current state of the API and suggestions are welcome.
192 the current state of the API and suggestions are welcome.
144
193
145 Python 3 only codebase
194 Python 3 only codebase
146 ----------------------
195 ----------------------
147
196
148 One of the large challenges in IPython 6.0 has been the adoption of a pure
197 One of the large challenges in IPython 6.0 has been the adoption of a pure
149 Python 3 codebase, which has led to upstream patches in pip,
198 Python 3 codebase, which has led to upstream patches in pip,
150 pypi and warehouse to make sure Python 2 systems still upgrade to the latest
199 pypi and warehouse to make sure Python 2 systems still upgrade to the latest
151 compatible Python version.
200 compatible Python version.
152
201
153 We remind our Python 2 users that IPython 5 is still compatible with Python 2.7,
202 We remind our Python 2 users that IPython 5 is still compatible with Python 2.7,
154 still maintained and will get regular releases. Using pip 9+, upgrading IPython will
203 still maintained and will get regular releases. Using pip 9+, upgrading IPython will
155 automatically upgrade to the latest version compatible with your system.
204 automatically upgrade to the latest version compatible with your system.
156
205
157 .. warning::
206 .. warning::
158
207
159 If you are on a system using an older version of pip on Python 2, pip may
208 If you are on a system using an older version of pip on Python 2, pip may
160 still install IPython 6.0 on your system, and IPython will refuse to start.
209 still install IPython 6.0 on your system, and IPython will refuse to start.
161 You can fix this by upgrading pip, and reinstalling ipython, or forcing pip to
210 You can fix this by upgrading pip, and reinstalling ipython, or forcing pip to
162 install an earlier version: ``pip install 'ipython<6'``
211 install an earlier version: ``pip install 'ipython<6'``
163
212
164 The ability to use only Python 3 on the code base of IPython brings a number
213 The ability to use only Python 3 on the code base of IPython brings a number
165 of advantages. Most of the newly written code make use of `optional function type
214 of advantages. Most of the newly written code make use of `optional function type
166 annotation <https://www.python.org/dev/peps/pep-0484/>`_ leading to clearer code
215 annotation <https://www.python.org/dev/peps/pep-0484/>`_ leading to clearer code
167 and better documentation.
216 and better documentation.
168
217
169 The total size of the repository has also decreased by about 1500 lines (for the
218 The total size of the repository has also decreased by about 1500 lines (for the
170 first time excluding the big split for 4.0). The decrease is potentially
219 first time excluding the big split for 4.0). The decrease is potentially
171 a bit more for the sour as some documents like this one are append only and
220 a bit more for the sour as some documents like this one are append only and
172 are about 300 lines long.
221 are about 300 lines long.
173
222
174 The removal of the Python2/Python3 shim layer has made the code quite a lot clearer and
223 The removal of the Python2/Python3 shim layer has made the code quite a lot clearer and
175 more idiomatic in a number of locations, and much friendlier to work with and
224 more idiomatic in a number of locations, and much friendlier to work with and
176 understand. We hope to further embrace Python 3 capabilities in the next release
225 understand. We hope to further embrace Python 3 capabilities in the next release
177 cycle and introduce more of the Python 3 only idioms (yield from, kwarg only,
226 cycle and introduce more of the Python 3 only idioms (yield from, kwarg only,
178 general unpacking) in the IPython code base, and see if we can take advantage
227 general unpacking) in the IPython code base, and see if we can take advantage
179 of these to improve user experience with better error messages and
228 of these to improve user experience with better error messages and
180 hints.
229 hints.
181
230
182
231
183 Configurable TerminalInteractiveShell, readline interface
232 Configurable TerminalInteractiveShell, readline interface
184 ---------------------------------------------------------
233 ---------------------------------------------------------
185
234
186 IPython gained a new ``c.TerminalIPythonApp.interactive_shell_class`` option
235 IPython gained a new ``c.TerminalIPythonApp.interactive_shell_class`` option
187 that allows customizing the class used to start the terminal frontend. This
236 that allows customizing the class used to start the terminal frontend. This
188 should allow a user to use custom interfaces, like reviving the former readline
237 should allow a user to use custom interfaces, like reviving the former readline
189 interface which is now a separate package not actively maintained by the core
238 interface which is now a separate package not actively maintained by the core
190 team. See the project to bring back the readline interface: `rlipython
239 team. See the project to bring back the readline interface: `rlipython
191 <https://github.com/ipython/rlipython>`_.
240 <https://github.com/ipython/rlipython>`_.
192
241
193 This change will be backported to the IPython 5.x series.
242 This change will be backported to the IPython 5.x series.
194
243
195 Misc improvements
244 Misc improvements
196 -----------------
245 -----------------
197
246
198
247
199 - The :cellmagic:`capture` magic can now capture the result of a cell (from
248 - The :cellmagic:`capture` magic can now capture the result of a cell (from
200 an expression on the last line), as well as printed and displayed output.
249 an expression on the last line), as well as printed and displayed output.
201 :ghpull:`9851`.
250 :ghpull:`9851`.
202
251
203 - Pressing Ctrl-Z in the terminal debugger now suspends IPython, as it already
252 - Pressing Ctrl-Z in the terminal debugger now suspends IPython, as it already
204 does in the main terminal prompt.
253 does in the main terminal prompt.
205
254
206 - Autoreload can now reload ``Enum``. See :ghissue:`10232` and :ghpull:`10316`
255 - Autoreload can now reload ``Enum``. See :ghissue:`10232` and :ghpull:`10316`
207
256
208 - IPython.display has gained a :any:`GeoJSON <IPython.display.GeoJSON>` object.
257 - IPython.display has gained a :any:`GeoJSON <IPython.display.GeoJSON>` object.
209 :ghpull:`10288` and :ghpull:`10253`
258 :ghpull:`10288` and :ghpull:`10253`
210
259
211 Functions Deprecated in 6.x Development cycle
260 Functions Deprecated in 6.x Development cycle
212 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
261 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
213
262
214 - Loading extensions from ``ipython_extension_dir`` prints a warning that this
263 - Loading extensions from ``ipython_extension_dir`` prints a warning that this
215 location is pending deprecation. This should only affect users still having
264 location is pending deprecation. This should only affect users still having
216 extensions installed with ``%install_ext`` which has been deprecated since
265 extensions installed with ``%install_ext`` which has been deprecated since
217 IPython 4.0, and removed in 5.0. Extensions still present in
266 IPython 4.0, and removed in 5.0. Extensions still present in
218 ``ipython_extension_dir`` may shadow more recently installed versions using
267 ``ipython_extension_dir`` may shadow more recently installed versions using
219 pip. It is thus recommended to clean ``ipython_extension_dir`` of any
268 pip. It is thus recommended to clean ``ipython_extension_dir`` of any
220 extension now available as a package.
269 extension now available as a package.
221
270
222
271
223 - ``IPython.utils.warn`` was deprecated in IPython 4.0, and has now been removed.
272 - ``IPython.utils.warn`` was deprecated in IPython 4.0, and has now been removed.
224 instead of ``IPython.utils.warn`` inbuilt :any:`warnings` module is used.
273 instead of ``IPython.utils.warn`` inbuilt :any:`warnings` module is used.
225
274
226
275
227 - The function `IPython.core.oinspect.py:call_tip` is unused, was marked as
276 - The function `IPython.core.oinspect.py:call_tip` is unused, was marked as
228 deprecated (raising a `DeprecationWarning`) and marked for later removal.
277 deprecated (raising a `DeprecationWarning`) and marked for later removal.
229 :ghpull:`10104`
278 :ghpull:`10104`
230
279
231 Backward incompatible changes
280 Backward incompatible changes
232 ------------------------------
281 ------------------------------
233
282
234 Functions Removed in 6.x Development cycle
283 Functions Removed in 6.x Development cycle
235 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
284 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
236
285
237 The following functions have been removed in the
286 The following functions have been removed in the
238 development cycle marked for Milestone 6.0.
287 development cycle marked for Milestone 6.0.
239
288
240 - ``IPython/utils/process.py`` - ``is_cmd_found``
289 - ``IPython/utils/process.py`` - ``is_cmd_found``
241 - ``IPython/utils/process.py`` - ``pycmd2argv``
290 - ``IPython/utils/process.py`` - ``pycmd2argv``
242
291
243 - The `--deep-reload` flag and the corresponding options to inject `dreload` or
292 - The `--deep-reload` flag and the corresponding options to inject `dreload` or
244 `reload` into the interactive namespace have been removed. You have to
293 `reload` into the interactive namespace have been removed. You have to
245 explicitly import `reload` from `IPython.lib.deepreload` to use it.
294 explicitly import `reload` from `IPython.lib.deepreload` to use it.
246
295
247 - The :magic:`profile` used to print the current IPython profile, and which
296 - The :magic:`profile` used to print the current IPython profile, and which
248 was deprecated in IPython 2.0 does now raise a `DeprecationWarning` error when
297 was deprecated in IPython 2.0 does now raise a `DeprecationWarning` error when
249 used. It is often confused with the :magic:`prun` and the deprecation removal
298 used. It is often confused with the :magic:`prun` and the deprecation removal
250 should free up the ``profile`` name in future versions.
299 should free up the ``profile`` name in future versions.
General Comments 0
You need to be logged in to leave comments. Login now