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