##// END OF EJS Templates
Merge pull request #4775 from takluyver/pr-whatsnew-2...
Min RK -
r14084:41d856c8 merge
parent child Browse files
Show More
@@ -1,102 +1,230 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
14 - `%%capture` cell magic now captures the rich display output, not just
15 stdout/stderr
16
17 Select Notebook Name When Renaming a Notebook
13 Select Notebook Name When Renaming a Notebook
18 ---------------------------------------------
14 ---------------------------------------------
19
15
20 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
21 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
22 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.
23
19
24 clear_output changes
20 clear_output changes
25 --------------------
21 --------------------
26
22
27 * There is no longer a 500ms delay when calling ``clear_output``.
23 * There is no longer a 500ms delay when calling ``clear_output``.
28 * The ability to clear stderr and stdout individually was removed.
24 * The ability to clear stderr and stdout individually was removed.
29 * 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
30 output is available. This eliminates animation flickering by allowing the
26 output is available. This eliminates animation flickering by allowing the
31 user to double buffer the output.
27 user to double buffer the output.
32 * 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.
33
29
34 Extending Configurable Containers
30 Extending Configurable Containers
35 ---------------------------------
31 ---------------------------------
36
32
37 Some configurable traits are containers (list, dict, set)
33 Some configurable traits are containers (list, dict, set)
38 Config objects now support calling ``extend``, ``update``, ``insert``, etc.
34 Config objects now support calling ``extend``, ``update``, ``insert``, etc.
39 on traits in config files, which will ultimately result in calling
35 on traits in config files, which will ultimately result in calling
40 those methods on the original object.
36 those methods on the original object.
41
37
42 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
43 the initial value::
39 the initial value::
44
40
45 c = get_config()
41 c = get_config()
46 c.InlineBackend.rc.update({ 'figure.figsize' : (6, 4) })
42 c.InlineBackend.rc.update({ 'figure.figsize' : (6, 4) })
47
43
48 * In notebook, Showing tooltip on tab has been disables to avoid conflict with
49 completion, Shift-Tab could still be used to invoke tooltip when inside
50 function signature and/or on selection.
51
52 Single codebase Python 3 support
44 Single codebase Python 3 support
53 --------------------------------
45 --------------------------------
54
46
55 IPython previously supported Python 3 by running 2to3 during setup. We
47 IPython previously supported Python 3 by running 2to3 during setup. We
56 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
57 and 3.3.
49 and 3.3.
58
50
59 For notes on how to maintain this, see :doc:`/development/pycompat`.
51 For notes on how to maintain this, see :doc:`/development/pycompat`.
60
52
53 changes to hidden namespace on startup
54 --------------------------------------
55
56 Previously, all names declared in code run at startup
57 (startup files, ``ipython -i script.py``, etc.)
58 were added to the hidden namespace, which hides the names from tools like ``%whos``.
59 There are two changes to this behavior:
60
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.
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.
65
66 Using dill to expand serialization support
67 ------------------------------------------
68
69 adds :func:`~IPython.utils.pickleutil.use_dill` for allowing
70 dill to extend serialization support in :mod:`IPython.parallel` (closures, etc.).
71 Also adds :meth:`DirectView.use_dill` convenience method for enabling dill
72 locally and on all engines with one call.
73
74 New IPython Console Lexer
75 -------------------------
76
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
79 available at :mod:`IPython.nbconvert.utils.lexers`. These include:
80
81 IPythonLexer & IPython3Lexer
82 Lexers for pure IPython (python + magic/shell commands)
83
84 IPythonPartialTracebackLexer & IPythonTracebackLexer
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.
87 The full lexer combines the partial lexer with an IPython lexer.
88
89 IPythonConsoleLexer
90 A lexer for IPython console sessions, with support for tracebacks.
91 Supports 2.x and 3.x via the keyword `python3`.
92
93 IPyLexer
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.
96 Supports 2.x and 3.x via the keyword `python3`.
97
98 Previously, the :class:`IPythonConsoleLexer` class was available at
99 :mod:`IPython.sphinxext.ipython_console_hightlight`. It was inserted
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
102 is not the same as IPython code (which itself is a superset of the Python
103 language).
104
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
107 `ipython3`. Although the names can be confusing (as mentioned above), their
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
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.
112
113 Code blocks such as:
114
115 .. code-block:: rst
116
117 .. code-block:: ipython
118
119 In [1]: 2**2
120 Out[1]: 4
121
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:
124
125 .. code-block:: rst
126
127 .. code-block:: ipython
128
129 x = ''.join(map(str, range(10)))
130 !echo $x
131
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.
134
135 DisplayFormatter changes
136 ------------------------
137
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`:
140
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
143 - ``pop(type_or_str)`` - remove a type (by type or string).
144 Pass a second argument to avoid KeyError (like dict).
145
146 All of the above methods raise a KeyError if no match is found.
147
148 And the following methods are changed:
149
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()``,
152 but it remains for backward compatibility.
153
154 Other changes
155 -------------
156
157 * `%%capture` cell magic now captures the rich display output, not just
158 stdout/stderr
159
160 * In notebook, Showing tooltip on tab has been disables to avoid conflict with
161 completion, Shift-Tab could still be used to invoke tooltip when inside
162 function signature and/or on selection.
163
61 * ``object_info_request`` as been replaced by ``object_info`` for consistency in the javascript API.
164 * ``object_info_request`` as been replaced by ``object_info`` for consistency in the javascript API.
62 ``object_info`` as a simpler interface to register callback that is incompatible with ``object_info_request``.
165 ``object_info`` as a simpler interface to register callback that is incompatible with ``object_info_request``.
63
166
64 * Previous versions of IPython on Linux would use the XDG config directory,
167 * Previous versions of IPython on Linux would use the XDG config directory,
65 creating :file:`~/.config/ipython` by default. We have decided to go
168 creating :file:`~/.config/ipython` by default. We have decided to go
66 back to :file:`~/.ipython` for consistency among systems. IPython will
169 back to :file:`~/.ipython` for consistency among systems. IPython will
67 issue a warning if it finds the XDG location, and will move it to the new
170 issue a warning if it finds the XDG location, and will move it to the new
68 location if there isn't already a directory there.
171 location if there isn't already a directory there.
69
172
70 * Equations, images and tables are now centered in Markdown cells.
173 * Equations, images and tables are now centered in Markdown cells.
71 * Multiline equations are now centered in output areas; single line equations
174 * Multiline equations are now centered in output areas; single line equations
72 remain left justified.
175 remain left justified.
73
176
177 * IPython config objects can be loaded from and serialized to JSON.
178 JSON config file have the same base name as their ``.py`` counterpart,
179 and will be loaded with higher priority if found.
180
181 * bash completion updated with support for all ipython subcommands and flags, including nbconvert
182
183 * ``ipython history trim``: added ``--keep=<N>`` as an alias for the more verbose
184 ``--HistoryTrim.keep=<N>``
185 * new ``ipython history clear`` subcommand, which is the same as the newly supported
186 ``ipython history trim --keep=0``
187
188 * You can now run notebooks in an interactive session via ``%run notebook.ipynb``.
189
190 * Print preview is back in the notebook menus, along with options to
191 download the open notebook in various formats. This is powered by
192 nbconvert.
193
74 .. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT.
194 .. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT.
75
195
76 Backwards incompatible changes
196 Backwards incompatible changes
77 ------------------------------
197 ------------------------------
78
198
79 * Python 2.6 and 3.2 are no longer supported: the minimum required
199 * Python 2.6 and 3.2 are no longer supported: the minimum required
80 Python versions are now 2.7 and 3.3.
200 Python versions are now 2.7 and 3.3.
81 * The Transformer classes have been renamed to Preprocessor in nbconvert and
201 * The Transformer classes have been renamed to Preprocessor in nbconvert and
82 their `call` methods for them have been renamed to `preprocess`.
202 their `call` methods for them have been renamed to `preprocess`.
83 * The `call` methods of nbconvert post-processsors have been renamed to
203 * The `call` methods of nbconvert post-processsors have been renamed to
84 `postprocess`.
204 `postprocess`.
85
205
86 * The module ``IPython.core.fakemodule`` has been removed.
206 * The module ``IPython.core.fakemodule`` has been removed.
87
207
88 * The alias system has been reimplemented to use magic functions. There should be little
208 * The alias system has been reimplemented to use magic functions. There should be little
89 visible difference while automagics are enabled, as they are by default, but parts of the
209 visible difference while automagics are enabled, as they are by default, but parts of the
90 :class:`~IPython.core.alias.AliasManager` API have been removed.
210 :class:`~IPython.core.alias.AliasManager` API have been removed.
91
211
92 * We fixed an issue with switching between matplotlib inline and GUI backends,
212 * We fixed an issue with switching between matplotlib inline and GUI backends,
93 but the fix requires matplotlib 1.1 or newer. So from now on, we consider
213 but the fix requires matplotlib 1.1 or newer. So from now on, we consider
94 matplotlib 1.1 to be the minimally supported version for IPython. Older
214 matplotlib 1.1 to be the minimally supported version for IPython. Older
95 versions for the most part will work, but we make no guarantees about it.
215 versions for the most part will work, but we make no guarantees about it.
96
216
97 * The :command:`pycolor` command has been removed. We recommend the much more capable
217 * The :command:`pycolor` command has been removed. We recommend the much more capable
98 :command:`pygmentize` command from the `Pygments <http://pygments.org/>`_ project.
218 :command:`pygmentize` command from the `Pygments <http://pygments.org/>`_ project.
99 If you need to keep the exact output of :command:`pycolor`, you can still use
219 If you need to keep the exact output of :command:`pycolor`, you can still use
100 ``python -m IPython.utils.PyColorize foo.py``.
220 ``python -m IPython.utils.PyColorize foo.py``.
101
221
222 * :mod:`IPython.lib.irunner` and its command-line entry point have been removed.
223 It had fallen out of use long ago.
224
225 * The ``input_prefilter`` hook has been removed, as it was never
226 actually used by the code. The input transformer system offers much
227 more powerful APIs to work with input code. See
228 :doc:`/config/inputtransforms` for details.
229
102 .. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT.
230 .. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT.
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now