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