##// END OF EJS Templates
remove InlineBackend.quality from whatsnew
MinRK -
Show More
@@ -1,285 +1,283 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 Select Notebook Name When Renaming a Notebook
13 Select Notebook Name When Renaming a Notebook
14 ---------------------------------------------
14 ---------------------------------------------
15
15
16 The default notebook name is Untitled. It's unlikely you want to keep this name
16 The default notebook name is Untitled. It's unlikely you want to keep this name
17 or part of it when naming your notebook. Instead, IPython will select the text
17 or part of it when naming your notebook. Instead, IPython will select the text
18 in the input field so the user can easily type over the name and change it.
18 in the input field so the user can easily type over the name and change it.
19
19
20 clear_output changes
20 clear_output changes
21 --------------------
21 --------------------
22
22
23 * There is no longer a 500ms delay when calling ``clear_output``.
23 * There is no longer a 500ms delay when calling ``clear_output``.
24 * The ability to clear stderr and stdout individually was removed.
24 * The ability to clear stderr and stdout individually was removed.
25 * A new ``wait`` flag that prevents ``clear_output`` from being executed until new
25 * A new ``wait`` flag that prevents ``clear_output`` from being executed until new
26 output is available. This eliminates animation flickering by allowing the
26 output is available. This eliminates animation flickering by allowing the
27 user to double buffer the output.
27 user to double buffer the output.
28 * The output div height is remembered when the ``wait=True`` flag is used.
28 * The output div height is remembered when the ``wait=True`` flag is used.
29
29
30 Extending Configurable Containers
30 Extending Configurable Containers
31 ---------------------------------
31 ---------------------------------
32
32
33 Some configurable traits are containers (list, dict, set)
33 Some configurable traits are containers (list, dict, set)
34 Config objects now support calling ``extend``, ``update``, ``insert``, etc.
34 Config objects now support calling ``extend``, ``update``, ``insert``, etc.
35 on traits in config files, which will ultimately result in calling
35 on traits in config files, which will ultimately result in calling
36 those methods on the original object.
36 those methods on the original object.
37
37
38 The effect being that you can now add to containers without having to copy/paste
38 The effect being that you can now add to containers without having to copy/paste
39 the initial value::
39 the initial value::
40
40
41 c = get_config()
41 c = get_config()
42 c.InlineBackend.rc.update({ 'figure.figsize' : (6, 4) })
42 c.InlineBackend.rc.update({ 'figure.figsize' : (6, 4) })
43
43
44 Single codebase Python 3 support
44 Single codebase Python 3 support
45 --------------------------------
45 --------------------------------
46
46
47 IPython previously supported Python 3 by running 2to3 during setup. We
47 IPython previously supported Python 3 by running 2to3 during setup. We
48 have now switched to a single codebase which runs natively on Python 2.7
48 have now switched to a single codebase which runs natively on Python 2.7
49 and 3.3.
49 and 3.3.
50
50
51 For notes on how to maintain this, see :doc:`/development/pycompat`.
51 For notes on how to maintain this, see :doc:`/development/pycompat`.
52
52
53 changes to hidden namespace on startup
53 changes to hidden namespace on startup
54 --------------------------------------
54 --------------------------------------
55
55
56 Previously, all names declared in code run at startup
56 Previously, all names declared in code run at startup
57 (startup files, ``ipython -i script.py``, etc.)
57 (startup files, ``ipython -i script.py``, etc.)
58 were added to the hidden namespace, which hides the names from tools like ``%whos``.
58 were added to the hidden namespace, which hides the names from tools like ``%whos``.
59 There are two changes to this behavior:
59 There are two changes to this behavior:
60
60
61 1. Scripts run on the command-line ``ipython -i script.py``now behave the same as if they were
61 1. Scripts run on the command-line ``ipython -i script.py``now behave the same as if they were
62 passed to ``%run``, so their variables are never hidden.
62 passed to ``%run``, so their variables are never hidden.
63 2. A boolean config flag ``InteractiveShellApp.hide_initial_ns`` has been added to optionally
63 2. A boolean config flag ``InteractiveShellApp.hide_initial_ns`` has been added to optionally
64 disable the hidden behavior altogether. The default behavior is unchanged.
64 disable the hidden behavior altogether. The default behavior is unchanged.
65
65
66 Using dill to expand serialization support
66 Using dill to expand serialization support
67 ------------------------------------------
67 ------------------------------------------
68
68
69 adds :func:`~IPython.utils.pickleutil.use_dill` for allowing
69 adds :func:`~IPython.utils.pickleutil.use_dill` for allowing
70 dill to extend serialization support in :mod:`IPython.parallel` (closures, etc.).
70 dill to extend serialization support in :mod:`IPython.parallel` (closures, etc.).
71 Also adds :meth:`DirectView.use_dill` convenience method for enabling dill
71 Also adds :meth:`DirectView.use_dill` convenience method for enabling dill
72 locally and on all engines with one call.
72 locally and on all engines with one call.
73
73
74 New IPython Console Lexer
74 New IPython Console Lexer
75 -------------------------
75 -------------------------
76
76
77 The IPython console lexer has been rewritten and now supports tracebacks
77 The IPython console lexer has been rewritten and now supports tracebacks
78 and customized input/output prompts. An entire suite of lexers is now
78 and customized input/output prompts. An entire suite of lexers is now
79 available at :mod:`IPython.nbconvert.utils.lexers`. These include:
79 available at :mod:`IPython.nbconvert.utils.lexers`. These include:
80
80
81 IPythonLexer & IPython3Lexer
81 IPythonLexer & IPython3Lexer
82 Lexers for pure IPython (python + magic/shell commands)
82 Lexers for pure IPython (python + magic/shell commands)
83
83
84 IPythonPartialTracebackLexer & IPythonTracebackLexer
84 IPythonPartialTracebackLexer & IPythonTracebackLexer
85 Supports 2.x and 3.x via the keyword `python3`. The partial traceback
85 Supports 2.x and 3.x via the keyword `python3`. The partial traceback
86 lexer reads everything but the Python code appearing in a traceback.
86 lexer reads everything but the Python code appearing in a traceback.
87 The full lexer combines the partial lexer with an IPython lexer.
87 The full lexer combines the partial lexer with an IPython lexer.
88
88
89 IPythonConsoleLexer
89 IPythonConsoleLexer
90 A lexer for IPython console sessions, with support for tracebacks.
90 A lexer for IPython console sessions, with support for tracebacks.
91 Supports 2.x and 3.x via the keyword `python3`.
91 Supports 2.x and 3.x via the keyword `python3`.
92
92
93 IPyLexer
93 IPyLexer
94 A friendly lexer which examines the first line of text and from it,
94 A friendly lexer which examines the first line of text and from it,
95 decides whether to use an IPython lexer or an IPython console lexer.
95 decides whether to use an IPython lexer or an IPython console lexer.
96 Supports 2.x and 3.x via the keyword `python3`.
96 Supports 2.x and 3.x via the keyword `python3`.
97
97
98 Previously, the :class:`IPythonConsoleLexer` class was available at
98 Previously, the :class:`IPythonConsoleLexer` class was available at
99 :mod:`IPython.sphinxext.ipython_console_hightlight`. It was inserted
99 :mod:`IPython.sphinxext.ipython_console_hightlight`. It was inserted
100 into Pygments' list of available lexers under the name `ipython`. It should
100 into Pygments' list of available lexers under the name `ipython`. It should
101 be mentioned that this name is inaccurate, since an IPython console session
101 be mentioned that this name is inaccurate, since an IPython console session
102 is not the same as IPython code (which itself is a superset of the Python
102 is not the same as IPython code (which itself is a superset of the Python
103 language).
103 language).
104
104
105 Now, the Sphinx extension inserts two console lexers into Pygments' list of
105 Now, the Sphinx extension inserts two console lexers into Pygments' list of
106 available lexers. Both are IPyLexer instances under the names: `ipython` and
106 available lexers. Both are IPyLexer instances under the names: `ipython` and
107 `ipython3`. Although the names can be confusing (as mentioned above), their
107 `ipython3`. Although the names can be confusing (as mentioned above), their
108 continued use is, in part, to maintain backwards compatibility and to
108 continued use is, in part, to maintain backwards compatibility and to
109 aid typical usage. If a project needs to make Pygments aware of more than just
109 aid typical usage. If a project needs to make Pygments aware of more than just
110 the IPyLexer class, then one should not make the IPyLexer class available under
110 the IPyLexer class, then one should not make the IPyLexer class available under
111 the name `ipython` and use `ipy` or some other non-conflicting value.
111 the name `ipython` and use `ipy` or some other non-conflicting value.
112
112
113 Code blocks such as:
113 Code blocks such as:
114
114
115 .. code-block:: rst
115 .. code-block:: rst
116
116
117 .. code-block:: ipython
117 .. code-block:: ipython
118
118
119 In [1]: 2**2
119 In [1]: 2**2
120 Out[1]: 4
120 Out[1]: 4
121
121
122 will continue to work as before, but now, they will also properly highlight
122 will continue to work as before, but now, they will also properly highlight
123 tracebacks. For pure IPython code, the same lexer will also work:
123 tracebacks. For pure IPython code, the same lexer will also work:
124
124
125 .. code-block:: rst
125 .. code-block:: rst
126
126
127 .. code-block:: ipython
127 .. code-block:: ipython
128
128
129 x = ''.join(map(str, range(10)))
129 x = ''.join(map(str, range(10)))
130 !echo $x
130 !echo $x
131
131
132 Since the first line of the block did not begin with a standard IPython console
132 Since the first line of the block did not begin with a standard IPython console
133 prompt, the entire block is assumed to consist of IPython code instead.
133 prompt, the entire block is assumed to consist of IPython code instead.
134
134
135 DisplayFormatter changes
135 DisplayFormatter changes
136 ------------------------
136 ------------------------
137
137
138 There was no official way to query or remove callbacks in the Formatter API.
138 There was no official way to query or remove callbacks in the Formatter API.
139 To remedy this, the following methods are added to :class:`BaseFormatter`:
139 To remedy this, the following methods are added to :class:`BaseFormatter`:
140
140
141 - ``lookup(instance)`` - return appropriate callback or a given object
141 - ``lookup(instance)`` - return appropriate callback or a given object
142 - ``lookup_by_type(type_or_str)`` - return appropriate callback for a given type or ``'mod.name'`` type string
142 - ``lookup_by_type(type_or_str)`` - return appropriate callback for a given type or ``'mod.name'`` type string
143 - ``pop(type_or_str)`` - remove a type (by type or string).
143 - ``pop(type_or_str)`` - remove a type (by type or string).
144 Pass a second argument to avoid KeyError (like dict).
144 Pass a second argument to avoid KeyError (like dict).
145
145
146 All of the above methods raise a KeyError if no match is found.
146 All of the above methods raise a KeyError if no match is found.
147
147
148 And the following methods are changed:
148 And the following methods are changed:
149
149
150 - ``for_type(type_or_str)`` - behaves the same as before, only adding support for ``'mod.name'``
150 - ``for_type(type_or_str)`` - behaves the same as before, only adding support for ``'mod.name'``
151 type strings in addition to plain types. This removes the need for ``for_type_by_name()``,
151 type strings in addition to plain types. This removes the need for ``for_type_by_name()``,
152 but it remains for backward compatibility.
152 but it remains for backward compatibility.
153
153
154 Notebook Widgets
154 Notebook Widgets
155 ----------------
155 ----------------
156
156
157 Available in the new `IPython.html.widgets` namespace, widgets provide an easy
157 Available in the new `IPython.html.widgets` namespace, widgets provide an easy
158 way for IPython notebook users to display GUI controls in the IPython notebook.
158 way for IPython notebook users to display GUI controls in the IPython notebook.
159 IPython comes with bundle of built-in widgets and also the ability for users
159 IPython comes with bundle of built-in widgets and also the ability for users
160 to define their own widgets. A widget is displayed in the front-end using
160 to define their own widgets. A widget is displayed in the front-end using
161 using a view. For example, a FloatRangeWidget can be displayed using a
161 using a view. For example, a FloatRangeWidget can be displayed using a
162 FloatSliderView (which is the default if no view is specified when displaying
162 FloatSliderView (which is the default if no view is specified when displaying
163 the widget). IPython also comes with a bundle of views and the ability for the
163 the widget). IPython also comes with a bundle of views and the ability for the
164 user to define custom views. One widget can be displayed multiple times, in on
164 user to define custom views. One widget can be displayed multiple times, in on
165 or more cells, using one or more views. All views will automatically remain in
165 or more cells, using one or more views. All views will automatically remain in
166 sync with the widget which is accessible in the back-end.
166 sync with the widget which is accessible in the back-end.
167
167
168 The widget layer provides an MVC-like architecture on top of the comm layer.
168 The widget layer provides an MVC-like architecture on top of the comm layer.
169 It's useful for widgets that can be expressed via a list of properties.
169 It's useful for widgets that can be expressed via a list of properties.
170 Widgets work by synchronizing IPython traitlet models in the back-end with
170 Widgets work by synchronizing IPython traitlet models in the back-end with
171 backbone models in the front-end. The widget layer automatically handles
171 backbone models in the front-end. The widget layer automatically handles
172
172
173 * delta compression (only sending the state information that has changed)
173 * delta compression (only sending the state information that has changed)
174 * wiring the message callbacks to the correct cells automatically
174 * wiring the message callbacks to the correct cells automatically
175 * inter-view synchronization (handled by backbone)
175 * inter-view synchronization (handled by backbone)
176 * message throttling (to avoid flooding the kernel)
176 * message throttling (to avoid flooding the kernel)
177 * parent/child relationships between views (which one can override to specify custom parent/child relationships)
177 * parent/child relationships between views (which one can override to specify custom parent/child relationships)
178 * ability to manipulate the widget view's DOM from python using CSS, $().addClass, and $().removeClass methods
178 * ability to manipulate the widget view's DOM from python using CSS, $().addClass, and $().removeClass methods
179
179
180 Signing Notebooks
180 Signing Notebooks
181 -----------------
181 -----------------
182
182
183 To prevent untrusted code from executing on users' behalf when notebooks open,
183 To prevent untrusted code from executing on users' behalf when notebooks open,
184 we have added a signature to the notebook, stored in metadata.
184 we have added a signature to the notebook, stored in metadata.
185
185
186 For more information, see :ref:`signing_notebooks`.
186 For more information, see :ref:`signing_notebooks`.
187
187
188 Other changes
188 Other changes
189 -------------
189 -------------
190
190
191 * `%%capture` cell magic now captures the rich display output, not just
191 * `%%capture` cell magic now captures the rich display output, not just
192 stdout/stderr
192 stdout/stderr
193
193
194 * In notebook, Showing tooltip on tab has been disables to avoid conflict with
194 * In notebook, Showing tooltip on tab has been disables to avoid conflict with
195 completion, Shift-Tab could still be used to invoke tooltip when inside
195 completion, Shift-Tab could still be used to invoke tooltip when inside
196 function signature and/or on selection.
196 function signature and/or on selection.
197
197
198 * ``object_info_request`` as been replaced by ``object_info`` for consistency in the javascript API.
198 * ``object_info_request`` as been replaced by ``object_info`` for consistency in the javascript API.
199 ``object_info`` as a simpler interface to register callback that is incompatible with ``object_info_request``.
199 ``object_info`` as a simpler interface to register callback that is incompatible with ``object_info_request``.
200
200
201 * Previous versions of IPython on Linux would use the XDG config directory,
201 * Previous versions of IPython on Linux would use the XDG config directory,
202 creating :file:`~/.config/ipython` by default. We have decided to go
202 creating :file:`~/.config/ipython` by default. We have decided to go
203 back to :file:`~/.ipython` for consistency among systems. IPython will
203 back to :file:`~/.ipython` for consistency among systems. IPython will
204 issue a warning if it finds the XDG location, and will move it to the new
204 issue a warning if it finds the XDG location, and will move it to the new
205 location if there isn't already a directory there.
205 location if there isn't already a directory there.
206
206
207 * Equations, images and tables are now centered in Markdown cells.
207 * Equations, images and tables are now centered in Markdown cells.
208 * Multiline equations are now centered in output areas; single line equations
208 * Multiline equations are now centered in output areas; single line equations
209 remain left justified.
209 remain left justified.
210
210
211 * IPython config objects can be loaded from and serialized to JSON.
211 * IPython config objects can be loaded from and serialized to JSON.
212 JSON config file have the same base name as their ``.py`` counterpart,
212 JSON config file have the same base name as their ``.py`` counterpart,
213 and will be loaded with higher priority if found.
213 and will be loaded with higher priority if found.
214
214
215 * bash completion updated with support for all ipython subcommands and flags, including nbconvert
215 * bash completion updated with support for all ipython subcommands and flags, including nbconvert
216
216
217 * ``ipython history trim``: added ``--keep=<N>`` as an alias for the more verbose
217 * ``ipython history trim``: added ``--keep=<N>`` as an alias for the more verbose
218 ``--HistoryTrim.keep=<N>``
218 ``--HistoryTrim.keep=<N>``
219 * new ``ipython history clear`` subcommand, which is the same as the newly supported
219 * new ``ipython history clear`` subcommand, which is the same as the newly supported
220 ``ipython history trim --keep=0``
220 ``ipython history trim --keep=0``
221
221
222 * You can now run notebooks in an interactive session via ``%run notebook.ipynb``.
222 * You can now run notebooks in an interactive session via ``%run notebook.ipynb``.
223
223
224 * Print preview is back in the notebook menus, along with options to
224 * Print preview is back in the notebook menus, along with options to
225 download the open notebook in various formats. This is powered by
225 download the open notebook in various formats. This is powered by
226 nbconvert.
226 nbconvert.
227
227
228 * :exc:`~IPython.nbconvert.utils.pandoc.PandocMissing` exceptions will be
228 * :exc:`~IPython.nbconvert.utils.pandoc.PandocMissing` exceptions will be
229 raised if Pandoc is unavailable, and warnings will be printed if the version
229 raised if Pandoc is unavailable, and warnings will be printed if the version
230 found is too old. The recommended Pandoc version for use with nbconvert is
230 found is too old. The recommended Pandoc version for use with nbconvert is
231 1.12.1.
231 1.12.1.
232
232
233 * The InlineBackend.figure_format flag now supports JPEG output if PIL/Pillow is available.
233 * The InlineBackend.figure_format flag now supports JPEG output if PIL/Pillow is available.
234 * The new ``InlineBackend.quality`` flag is a Integer in the range [10, 100] which controls
235 the quality of figures where higher values give nicer images (currently JPEG only).
236
234
237 * Input transformers (see :doc:`/config/inputtransforms`) may now raise
235 * Input transformers (see :doc:`/config/inputtransforms`) may now raise
238 :exc:`SyntaxError` if they determine that input is invalid. The input
236 :exc:`SyntaxError` if they determine that input is invalid. The input
239 transformation machinery in IPython will handle displaying the exception to
237 transformation machinery in IPython will handle displaying the exception to
240 the user and resetting state.
238 the user and resetting state.
241
239
242 .. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT.
240 .. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT.
243
241
244 Backwards incompatible changes
242 Backwards incompatible changes
245 ------------------------------
243 ------------------------------
246
244
247 * Python 2.6 and 3.2 are no longer supported: the minimum required
245 * Python 2.6 and 3.2 are no longer supported: the minimum required
248 Python versions are now 2.7 and 3.3.
246 Python versions are now 2.7 and 3.3.
249 * The Transformer classes have been renamed to Preprocessor in nbconvert and
247 * The Transformer classes have been renamed to Preprocessor in nbconvert and
250 their `call` methods for them have been renamed to `preprocess`.
248 their `call` methods for them have been renamed to `preprocess`.
251 * The `call` methods of nbconvert post-processsors have been renamed to
249 * The `call` methods of nbconvert post-processsors have been renamed to
252 `postprocess`.
250 `postprocess`.
253
251
254 * The module ``IPython.core.fakemodule`` has been removed.
252 * The module ``IPython.core.fakemodule`` has been removed.
255
253
256 * The alias system has been reimplemented to use magic functions. There should be little
254 * The alias system has been reimplemented to use magic functions. There should be little
257 visible difference while automagics are enabled, as they are by default, but parts of the
255 visible difference while automagics are enabled, as they are by default, but parts of the
258 :class:`~IPython.core.alias.AliasManager` API have been removed.
256 :class:`~IPython.core.alias.AliasManager` API have been removed.
259
257
260 * We fixed an issue with switching between matplotlib inline and GUI backends,
258 * We fixed an issue with switching between matplotlib inline and GUI backends,
261 but the fix requires matplotlib 1.1 or newer. So from now on, we consider
259 but the fix requires matplotlib 1.1 or newer. So from now on, we consider
262 matplotlib 1.1 to be the minimally supported version for IPython. Older
260 matplotlib 1.1 to be the minimally supported version for IPython. Older
263 versions for the most part will work, but we make no guarantees about it.
261 versions for the most part will work, but we make no guarantees about it.
264
262
265 * The :command:`pycolor` command has been removed. We recommend the much more capable
263 * The :command:`pycolor` command has been removed. We recommend the much more capable
266 :command:`pygmentize` command from the `Pygments <http://pygments.org/>`_ project.
264 :command:`pygmentize` command from the `Pygments <http://pygments.org/>`_ project.
267 If you need to keep the exact output of :command:`pycolor`, you can still use
265 If you need to keep the exact output of :command:`pycolor`, you can still use
268 ``python -m IPython.utils.PyColorize foo.py``.
266 ``python -m IPython.utils.PyColorize foo.py``.
269
267
270 * :mod:`IPython.lib.irunner` and its command-line entry point have been removed.
268 * :mod:`IPython.lib.irunner` and its command-line entry point have been removed.
271 It had fallen out of use long ago.
269 It had fallen out of use long ago.
272
270
273 * The ``input_prefilter`` hook has been removed, as it was never
271 * The ``input_prefilter`` hook has been removed, as it was never
274 actually used by the code. The input transformer system offers much
272 actually used by the code. The input transformer system offers much
275 more powerful APIs to work with input code. See
273 more powerful APIs to work with input code. See
276 :doc:`/config/inputtransforms` for details.
274 :doc:`/config/inputtransforms` for details.
277
275
278 * :class:`IPython.core.inputsplitter.IPythonInputSplitter` no longer has a method
276 * :class:`IPython.core.inputsplitter.IPythonInputSplitter` no longer has a method
279 ``source_raw_reset()``, but gains :meth:`~IPython.core.inputsplitter.IPythonInputSplitter.raw_reset`
277 ``source_raw_reset()``, but gains :meth:`~IPython.core.inputsplitter.IPythonInputSplitter.raw_reset`
280 instead. Use of ``source_raw_reset`` can be replaced with::
278 instead. Use of ``source_raw_reset`` can be replaced with::
281
279
282 raw = isp.source_raw
280 raw = isp.source_raw
283 transformed = isp.source_reset()
281 transformed = isp.source_reset()
284
282
285 .. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT.
283 .. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT.
General Comments 0
You need to be logged in to leave comments. Login now