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