##// END OF EJS Templates
Merge pull request #4775 from takluyver/pr-whatsnew-2...
Min RK -
r14084:41d856c8 merge
parent child Browse files
Show More
@@ -10,10 +10,6 b' This document describes in-flight development work.'
10 10 conflicts for other Pull Requests). Instead, create a new file in the
11 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 13 Select Notebook Name When Renaming a Notebook
18 14 ---------------------------------------------
19 15
@@ -45,10 +41,6 b' the initial value::'
45 41 c = get_config()
46 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 44 Single codebase Python 3 support
53 45 --------------------------------
54 46
@@ -58,6 +50,117 b' and 3.3.'
58 50
59 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 164 * ``object_info_request`` as been replaced by ``object_info`` for consistency in the javascript API.
62 165 ``object_info`` as a simpler interface to register callback that is incompatible with ``object_info_request``.
63 166
@@ -71,6 +174,23 b' For notes on how to maintain this, see :doc:`/development/pycompat`.'
71 174 * Multiline equations are now centered in output areas; single line equations
72 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 194 .. DO NOT EDIT THIS LINE BEFORE RELEASE. FEATURE INSERTION POINT.
75 195
76 196 Backwards incompatible changes
@@ -99,4 +219,12 b' Backwards incompatible changes'
99 219 If you need to keep the exact output of :command:`pycolor`, you can still use
100 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 230 .. DO NOT EDIT THIS LINE BEFORE RELEASE. INCOMPAT INSERTION POINT.
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now