Show More
@@ -1,379 +1,379 | |||||
1 | ============ |
|
1 | ============ | |
2 | 2.x Series |
|
2 | 2.x Series | |
3 | ============ |
|
3 | ============ | |
4 |
|
4 | |||
5 | Release 2.4 |
|
5 | Release 2.4 | |
6 | =========== |
|
6 | =========== | |
7 |
|
7 | |||
8 |
January, 201 |
|
8 | January, 2015 | |
9 |
|
9 | |||
10 | - backport read support for nbformat v4 from IPython 3 |
|
10 | - backport read support for nbformat v4 from IPython 3 | |
11 | - support for PyQt5 |
|
11 | - support for PyQt5 | |
12 | - support for Pygments 2.0 |
|
12 | - support for Pygments 2.0 | |
13 |
|
13 | |||
14 | For more information on what fixes have been backported to 2.4, |
|
14 | For more information on what fixes have been backported to 2.4, | |
15 | see our :ref:`detailed release info <issues_list_200>`. |
|
15 | see our :ref:`detailed release info <issues_list_200>`. | |
16 |
|
16 | |||
17 |
|
17 | |||
18 | Release 2.3.1 |
|
18 | Release 2.3.1 | |
19 | ============= |
|
19 | ============= | |
20 |
|
20 | |||
21 | November, 2014 |
|
21 | November, 2014 | |
22 |
|
22 | |||
23 | - Fix CRCRLF line-ending bug in notebooks on Windows |
|
23 | - Fix CRCRLF line-ending bug in notebooks on Windows | |
24 |
|
24 | |||
25 | For more information on what fixes have been backported to 2.3.1, |
|
25 | For more information on what fixes have been backported to 2.3.1, | |
26 | see our :ref:`detailed release info <issues_list_200>`. |
|
26 | see our :ref:`detailed release info <issues_list_200>`. | |
27 |
|
27 | |||
28 | Release 2.3.0 |
|
28 | Release 2.3.0 | |
29 | ============= |
|
29 | ============= | |
30 |
|
30 | |||
31 | October, 2014 |
|
31 | October, 2014 | |
32 |
|
32 | |||
33 | - improve qt5 support |
|
33 | - improve qt5 support | |
34 | - prevent notebook data loss with atomic writes |
|
34 | - prevent notebook data loss with atomic writes | |
35 |
|
35 | |||
36 | For more information on what fixes have been backported to 2.3, |
|
36 | For more information on what fixes have been backported to 2.3, | |
37 | see our :ref:`detailed release info <issues_list_200>`. |
|
37 | see our :ref:`detailed release info <issues_list_200>`. | |
38 |
|
38 | |||
39 | Release 2.2.0 |
|
39 | Release 2.2.0 | |
40 | ============= |
|
40 | ============= | |
41 |
|
41 | |||
42 | August, 2014 |
|
42 | August, 2014 | |
43 |
|
43 | |||
44 | - Add CORS configuration |
|
44 | - Add CORS configuration | |
45 |
|
45 | |||
46 | For more information on what fixes have been backported to 2.2, |
|
46 | For more information on what fixes have been backported to 2.2, | |
47 | see our :ref:`detailed release info <issues_list_200>`. |
|
47 | see our :ref:`detailed release info <issues_list_200>`. | |
48 |
|
48 | |||
49 | Release 2.1.0 |
|
49 | Release 2.1.0 | |
50 | ============= |
|
50 | ============= | |
51 |
|
51 | |||
52 | May, 2014 |
|
52 | May, 2014 | |
53 |
|
53 | |||
54 | IPython 2.1 is the first bugfix release for 2.0. |
|
54 | IPython 2.1 is the first bugfix release for 2.0. | |
55 | For more information on what fixes have been backported to 2.1, |
|
55 | For more information on what fixes have been backported to 2.1, | |
56 | see our :ref:`detailed release info |
|
56 | see our :ref:`detailed release info | |
57 | <issues_list_200>`. |
|
57 | <issues_list_200>`. | |
58 |
|
58 | |||
59 |
|
59 | |||
60 | Release 2.0.0 |
|
60 | Release 2.0.0 | |
61 | ============= |
|
61 | ============= | |
62 |
|
62 | |||
63 | April, 2014 |
|
63 | April, 2014 | |
64 |
|
64 | |||
65 | IPython 2.0 requires Python β₯ 2.7.2 or β₯ 3.3.0. |
|
65 | IPython 2.0 requires Python β₯ 2.7.2 or β₯ 3.3.0. | |
66 | It does not support Python 3.0, 3.1, 3.2, 2.5, or 2.6. |
|
66 | It does not support Python 3.0, 3.1, 3.2, 2.5, or 2.6. | |
67 |
|
67 | |||
68 | The principal milestones of 2.0 are: |
|
68 | The principal milestones of 2.0 are: | |
69 |
|
69 | |||
70 | - interactive widgets for the notebook |
|
70 | - interactive widgets for the notebook | |
71 | - directory navigation in the notebook dashboard |
|
71 | - directory navigation in the notebook dashboard | |
72 | - persistent URLs for notebooks |
|
72 | - persistent URLs for notebooks | |
73 | - a new modal user interface in the notebook |
|
73 | - a new modal user interface in the notebook | |
74 | - a security model for notebooks |
|
74 | - a security model for notebooks | |
75 |
|
75 | |||
76 | Contribution summary since IPython 1.0 in August, 2013: |
|
76 | Contribution summary since IPython 1.0 in August, 2013: | |
77 |
|
77 | |||
78 | - ~8 months of work |
|
78 | - ~8 months of work | |
79 | - ~650 pull requests merged |
|
79 | - ~650 pull requests merged | |
80 | - ~400 issues closed (non-pull requests) |
|
80 | - ~400 issues closed (non-pull requests) | |
81 | - contributions from ~100 authors |
|
81 | - contributions from ~100 authors | |
82 | - ~4000 commits |
|
82 | - ~4000 commits | |
83 |
|
83 | |||
84 | The amount of work included in this release is so large that we can only cover |
|
84 | The amount of work included in this release is so large that we can only cover | |
85 | here the main highlights; please see our :ref:`detailed release statistics |
|
85 | here the main highlights; please see our :ref:`detailed release statistics | |
86 | <issues_list_200>` for links to every issue and pull request closed on GitHub |
|
86 | <issues_list_200>` for links to every issue and pull request closed on GitHub | |
87 | as well as a full list of individual contributors. |
|
87 | as well as a full list of individual contributors. | |
88 |
|
88 | |||
89 | New stuff in the IPython notebook |
|
89 | New stuff in the IPython notebook | |
90 | --------------------------------- |
|
90 | --------------------------------- | |
91 |
|
91 | |||
92 | Directory navigation |
|
92 | Directory navigation | |
93 | ******************** |
|
93 | ******************** | |
94 |
|
94 | |||
95 | .. image:: /_images/2.0/treeview.png |
|
95 | .. image:: /_images/2.0/treeview.png | |
96 | :width: 392px |
|
96 | :width: 392px | |
97 | :alt: Directory navigation |
|
97 | :alt: Directory navigation | |
98 | :align: center |
|
98 | :align: center | |
99 |
|
99 | |||
100 | The IPython notebook dashboard allows navigation into subdirectories. |
|
100 | The IPython notebook dashboard allows navigation into subdirectories. | |
101 | URLs are persistent based on the notebook's path and name, |
|
101 | URLs are persistent based on the notebook's path and name, | |
102 | so no more random UUID URLs. |
|
102 | so no more random UUID URLs. | |
103 |
|
103 | |||
104 | Serving local files no longer needs the ``files/`` prefix. |
|
104 | Serving local files no longer needs the ``files/`` prefix. | |
105 | Relative links across notebooks and other files should work just as if notebooks were regular HTML files. |
|
105 | Relative links across notebooks and other files should work just as if notebooks were regular HTML files. | |
106 |
|
106 | |||
107 | Interactive widgets |
|
107 | Interactive widgets | |
108 | ******************* |
|
108 | ******************* | |
109 |
|
109 | |||
110 | .. image:: /_images/2.0/widgets.png |
|
110 | .. image:: /_images/2.0/widgets.png | |
111 | :width: 392px |
|
111 | :width: 392px | |
112 | :alt: Interactive widgets |
|
112 | :alt: Interactive widgets | |
113 | :align: center |
|
113 | :align: center | |
114 |
|
114 | |||
115 | IPython 2.0 adds :mod:`IPython.html.widgets`, for manipulating |
|
115 | IPython 2.0 adds :mod:`IPython.html.widgets`, for manipulating | |
116 | Python objects in the kernel with GUI controls in the notebook. |
|
116 | Python objects in the kernel with GUI controls in the notebook. | |
117 | IPython comes with a few built-in widgets for simple data types, |
|
117 | IPython comes with a few built-in widgets for simple data types, | |
118 | and an API designed for developers to build more complex widgets. |
|
118 | and an API designed for developers to build more complex widgets. | |
119 | See the `widget docs`_ for more information. |
|
119 | See the `widget docs`_ for more information. | |
120 |
|
120 | |||
121 | .. _widget docs: http://nbviewer.ipython.org/github/ipython/ipython/blob/2.x/examples/Interactive%20Widgets/Index.ipynb |
|
121 | .. _widget docs: http://nbviewer.ipython.org/github/ipython/ipython/blob/2.x/examples/Interactive%20Widgets/Index.ipynb | |
122 |
|
122 | |||
123 |
|
123 | |||
124 | Modal user interface |
|
124 | Modal user interface | |
125 | ******************** |
|
125 | ******************** | |
126 |
|
126 | |||
127 | The notebook has added separate Edit and Command modes, |
|
127 | The notebook has added separate Edit and Command modes, | |
128 | allowing easier keyboard commands and making keyboard shortcut customization possible. |
|
128 | allowing easier keyboard commands and making keyboard shortcut customization possible. | |
129 | See the new `User Interface notebook`_ for more information. |
|
129 | See the new `User Interface notebook`_ for more information. | |
130 |
|
130 | |||
131 | .. _User Interface Notebook: http://nbviewer.ipython.org/github/ipython/ipython/blob/2.x/examples/Notebook/User%20Interface.ipynb |
|
131 | .. _User Interface Notebook: http://nbviewer.ipython.org/github/ipython/ipython/blob/2.x/examples/Notebook/User%20Interface.ipynb | |
132 |
|
132 | |||
133 |
|
133 | |||
134 | You can familiarize yourself with the updated notebook user interface, including an |
|
134 | You can familiarize yourself with the updated notebook user interface, including an | |
135 | explanation of Edit and Command modes, by going through the short guided tour |
|
135 | explanation of Edit and Command modes, by going through the short guided tour | |
136 | which can be started from the Help menu. |
|
136 | which can be started from the Help menu. | |
137 |
|
137 | |||
138 | .. image:: /_images/2.0/user-interface.png |
|
138 | .. image:: /_images/2.0/user-interface.png | |
139 | :width: 392px |
|
139 | :width: 392px | |
140 | :alt: Interface tour |
|
140 | :alt: Interface tour | |
141 | :align: center |
|
141 | :align: center | |
142 |
|
142 | |||
143 |
|
143 | |||
144 | Security |
|
144 | Security | |
145 | ******** |
|
145 | ******** | |
146 |
|
146 | |||
147 | 2.0 introduces a :ref:`security model <notebook_security>` for notebooks, |
|
147 | 2.0 introduces a :ref:`security model <notebook_security>` for notebooks, | |
148 | to prevent untrusted code from executing on users' behalf when notebooks open. |
|
148 | to prevent untrusted code from executing on users' behalf when notebooks open. | |
149 | A quick summary of the model: |
|
149 | A quick summary of the model: | |
150 |
|
150 | |||
151 | - Trust is determined by :ref:`signing notebooks<signing_notebooks>`. |
|
151 | - Trust is determined by :ref:`signing notebooks<signing_notebooks>`. | |
152 | - Untrusted HTML output is sanitized. |
|
152 | - Untrusted HTML output is sanitized. | |
153 | - Untrusted Javascript is never executed. |
|
153 | - Untrusted Javascript is never executed. | |
154 | - HTML and Javascript in Markdown are never trusted. |
|
154 | - HTML and Javascript in Markdown are never trusted. | |
155 |
|
155 | |||
156 | Dashboard "Running" tab |
|
156 | Dashboard "Running" tab | |
157 | *********************** |
|
157 | *********************** | |
158 |
|
158 | |||
159 | .. image:: /_images/2.0/running-crop.png |
|
159 | .. image:: /_images/2.0/running-crop.png | |
160 | :width: 392px |
|
160 | :width: 392px | |
161 | :alt: Running tab |
|
161 | :alt: Running tab | |
162 | :align: center |
|
162 | :align: center | |
163 |
|
163 | |||
164 | The dashboard now has a "Running" tab which shows all of the running notebooks. |
|
164 | The dashboard now has a "Running" tab which shows all of the running notebooks. | |
165 |
|
165 | |||
166 | Single codebase Python 3 support |
|
166 | Single codebase Python 3 support | |
167 | -------------------------------- |
|
167 | -------------------------------- | |
168 |
|
168 | |||
169 | IPython previously supported Python 3 by running 2to3 during setup. We |
|
169 | IPython previously supported Python 3 by running 2to3 during setup. We | |
170 | have now switched to a single codebase which runs natively on Python 2.7 |
|
170 | have now switched to a single codebase which runs natively on Python 2.7 | |
171 | and 3.3. |
|
171 | and 3.3. | |
172 |
|
172 | |||
173 | For notes on how to maintain this, see :doc:`/development/pycompat`. |
|
173 | For notes on how to maintain this, see :doc:`/development/pycompat`. | |
174 |
|
174 | |||
175 | Selecting matplotlib figure formats |
|
175 | Selecting matplotlib figure formats | |
176 | ----------------------------------- |
|
176 | ----------------------------------- | |
177 |
|
177 | |||
178 | Deprecate single-format ``InlineBackend.figure_format`` |
|
178 | Deprecate single-format ``InlineBackend.figure_format`` | |
179 | configurable in favor of ``InlineBackend.figure_formats``, |
|
179 | configurable in favor of ``InlineBackend.figure_formats``, | |
180 | which is a set, supporting multiple simultaneous figure formats (e.g. png, pdf). |
|
180 | which is a set, supporting multiple simultaneous figure formats (e.g. png, pdf). | |
181 |
|
181 | |||
182 | This is available at runtime with the new API function :func:`IPython.display.set_matplotlib_formats`. |
|
182 | This is available at runtime with the new API function :func:`IPython.display.set_matplotlib_formats`. | |
183 |
|
183 | |||
184 | clear_output changes |
|
184 | clear_output changes | |
185 | -------------------- |
|
185 | -------------------- | |
186 |
|
186 | |||
187 | * There is no longer a 500ms delay when calling ``clear_output``. |
|
187 | * There is no longer a 500ms delay when calling ``clear_output``. | |
188 | * The ability to clear stderr and stdout individually was removed. |
|
188 | * The ability to clear stderr and stdout individually was removed. | |
189 | * A new ``wait`` flag that prevents ``clear_output`` from being executed until new |
|
189 | * A new ``wait`` flag that prevents ``clear_output`` from being executed until new | |
190 | output is available. This eliminates animation flickering by allowing the |
|
190 | output is available. This eliminates animation flickering by allowing the | |
191 | user to double buffer the output. |
|
191 | user to double buffer the output. | |
192 | * The output div height is remembered when the ``wait=True`` flag is used. |
|
192 | * The output div height is remembered when the ``wait=True`` flag is used. | |
193 |
|
193 | |||
194 | Extending configurable containers |
|
194 | Extending configurable containers | |
195 | --------------------------------- |
|
195 | --------------------------------- | |
196 |
|
196 | |||
197 | Some configurable traits are containers (list, dict, set) |
|
197 | Some configurable traits are containers (list, dict, set) | |
198 | Config objects now support calling ``extend``, ``update``, ``insert``, etc. |
|
198 | Config objects now support calling ``extend``, ``update``, ``insert``, etc. | |
199 | on traits in config files, which will ultimately result in calling |
|
199 | on traits in config files, which will ultimately result in calling | |
200 | those methods on the original object. |
|
200 | those methods on the original object. | |
201 |
|
201 | |||
202 | The effect being that you can now add to containers without having to copy/paste |
|
202 | The effect being that you can now add to containers without having to copy/paste | |
203 | the initial value:: |
|
203 | the initial value:: | |
204 |
|
204 | |||
205 | c = get_config() |
|
205 | c = get_config() | |
206 | c.InlineBackend.rc.update({ 'figure.figsize' : (6, 4) }) |
|
206 | c.InlineBackend.rc.update({ 'figure.figsize' : (6, 4) }) | |
207 |
|
207 | |||
208 | Changes to hidden namespace on startup |
|
208 | Changes to hidden namespace on startup | |
209 | -------------------------------------- |
|
209 | -------------------------------------- | |
210 |
|
210 | |||
211 | Previously, all names declared in code run at startup |
|
211 | Previously, all names declared in code run at startup | |
212 | (startup files, ``ipython -i script.py``, etc.) |
|
212 | (startup files, ``ipython -i script.py``, etc.) | |
213 | were added to the hidden namespace, which hides the names from tools like ``%whos``. |
|
213 | were added to the hidden namespace, which hides the names from tools like ``%whos``. | |
214 | There are two changes to this behavior: |
|
214 | There are two changes to this behavior: | |
215 |
|
215 | |||
216 | 1. Scripts run on the command-line ``ipython -i script.py``now behave the same as if they were |
|
216 | 1. Scripts run on the command-line ``ipython -i script.py``now behave the same as if they were | |
217 | passed to ``%run``, so their variables are never hidden. |
|
217 | passed to ``%run``, so their variables are never hidden. | |
218 | 2. A boolean config flag ``InteractiveShellApp.hide_initial_ns`` has been added to optionally |
|
218 | 2. A boolean config flag ``InteractiveShellApp.hide_initial_ns`` has been added to optionally | |
219 | disable the hidden behavior altogether. The default behavior is unchanged. |
|
219 | disable the hidden behavior altogether. The default behavior is unchanged. | |
220 |
|
220 | |||
221 | Using dill to expand serialization support |
|
221 | Using dill to expand serialization support | |
222 | ------------------------------------------ |
|
222 | ------------------------------------------ | |
223 |
|
223 | |||
224 | The new function :func:`~IPython.utils.pickleutil.use_dill` allows |
|
224 | The new function :func:`~IPython.utils.pickleutil.use_dill` allows | |
225 | dill to extend serialization support in :mod:`IPython.parallel` (closures, etc.). |
|
225 | dill to extend serialization support in :mod:`IPython.parallel` (closures, etc.). | |
226 | A :meth:`DirectView.use_dill` convenience method was also added, to enable dill |
|
226 | A :meth:`DirectView.use_dill` convenience method was also added, to enable dill | |
227 | locally and on all engines with one call. |
|
227 | locally and on all engines with one call. | |
228 |
|
228 | |||
229 | New IPython console lexer |
|
229 | New IPython console lexer | |
230 | ------------------------- |
|
230 | ------------------------- | |
231 |
|
231 | |||
232 | The IPython console lexer has been rewritten and now supports tracebacks |
|
232 | The IPython console lexer has been rewritten and now supports tracebacks | |
233 | and customized input/output prompts. See the :ref:`new lexer docs <console_lexer>` |
|
233 | and customized input/output prompts. See the :ref:`new lexer docs <console_lexer>` | |
234 | for details. |
|
234 | for details. | |
235 |
|
235 | |||
236 | DisplayFormatter changes |
|
236 | DisplayFormatter changes | |
237 | ------------------------ |
|
237 | ------------------------ | |
238 |
|
238 | |||
239 | There was no official way to query or remove callbacks in the Formatter API. |
|
239 | There was no official way to query or remove callbacks in the Formatter API. | |
240 | To remedy this, the following methods are added to :class:`BaseFormatter`: |
|
240 | To remedy this, the following methods are added to :class:`BaseFormatter`: | |
241 |
|
241 | |||
242 | - ``lookup(instance)`` - return appropriate callback or a given object |
|
242 | - ``lookup(instance)`` - return appropriate callback or a given object | |
243 | - ``lookup_by_type(type_or_str)`` - return appropriate callback for a given type or ``'mod.name'`` type string |
|
243 | - ``lookup_by_type(type_or_str)`` - return appropriate callback for a given type or ``'mod.name'`` type string | |
244 | - ``pop(type_or_str)`` - remove a type (by type or string). |
|
244 | - ``pop(type_or_str)`` - remove a type (by type or string). | |
245 | Pass a second argument to avoid KeyError (like dict). |
|
245 | Pass a second argument to avoid KeyError (like dict). | |
246 |
|
246 | |||
247 | All of the above methods raise a KeyError if no match is found. |
|
247 | All of the above methods raise a KeyError if no match is found. | |
248 |
|
248 | |||
249 | And the following methods are changed: |
|
249 | And the following methods are changed: | |
250 |
|
250 | |||
251 | - ``for_type(type_or_str)`` - behaves the same as before, only adding support for ``'mod.name'`` |
|
251 | - ``for_type(type_or_str)`` - behaves the same as before, only adding support for ``'mod.name'`` | |
252 | type strings in addition to plain types. This removes the need for ``for_type_by_name()``, |
|
252 | type strings in addition to plain types. This removes the need for ``for_type_by_name()``, | |
253 | but it remains for backward compatibility. |
|
253 | but it remains for backward compatibility. | |
254 |
|
254 | |||
255 | Formatters can now raise NotImplementedError in addition to returning None |
|
255 | Formatters can now raise NotImplementedError in addition to returning None | |
256 | to indicate that they cannot format a given object. |
|
256 | to indicate that they cannot format a given object. | |
257 |
|
257 | |||
258 | Exceptions and Warnings |
|
258 | Exceptions and Warnings | |
259 | *********************** |
|
259 | *********************** | |
260 |
|
260 | |||
261 | Exceptions are no longer silenced when formatters fail. |
|
261 | Exceptions are no longer silenced when formatters fail. | |
262 | Instead, these are turned into a :class:`~IPython.core.formatters.FormatterWarning`. |
|
262 | Instead, these are turned into a :class:`~IPython.core.formatters.FormatterWarning`. | |
263 | A FormatterWarning will also be issued if a formatter returns data of an invalid type |
|
263 | A FormatterWarning will also be issued if a formatter returns data of an invalid type | |
264 | (e.g. an integer for 'image/png'). |
|
264 | (e.g. an integer for 'image/png'). | |
265 |
|
265 | |||
266 |
|
266 | |||
267 | Other changes |
|
267 | Other changes | |
268 | ------------- |
|
268 | ------------- | |
269 |
|
269 | |||
270 | * `%%capture` cell magic now captures the rich display output, not just |
|
270 | * `%%capture` cell magic now captures the rich display output, not just | |
271 | stdout/stderr |
|
271 | stdout/stderr | |
272 |
|
272 | |||
273 | * In notebook, Showing tooltip on tab has been disables to avoid conflict with |
|
273 | * In notebook, Showing tooltip on tab has been disables to avoid conflict with | |
274 | completion, Shift-Tab could still be used to invoke tooltip when inside |
|
274 | completion, Shift-Tab could still be used to invoke tooltip when inside | |
275 | function signature and/or on selection. |
|
275 | function signature and/or on selection. | |
276 |
|
276 | |||
277 | * ``object_info_request`` has been replaced by ``object_info`` for consistency in the javascript API. |
|
277 | * ``object_info_request`` has been replaced by ``object_info`` for consistency in the javascript API. | |
278 | ``object_info`` is a simpler interface to register callback that is incompatible with ``object_info_request``. |
|
278 | ``object_info`` is a simpler interface to register callback that is incompatible with ``object_info_request``. | |
279 |
|
279 | |||
280 | * Previous versions of IPython on Linux would use the XDG config directory, |
|
280 | * Previous versions of IPython on Linux would use the XDG config directory, | |
281 | creating :file:`~/.config/ipython` by default. We have decided to go |
|
281 | creating :file:`~/.config/ipython` by default. We have decided to go | |
282 | back to :file:`~/.ipython` for consistency among systems. IPython will |
|
282 | back to :file:`~/.ipython` for consistency among systems. IPython will | |
283 | issue a warning if it finds the XDG location, and will move it to the new |
|
283 | issue a warning if it finds the XDG location, and will move it to the new | |
284 | location if there isn't already a directory there. |
|
284 | location if there isn't already a directory there. | |
285 |
|
285 | |||
286 | * Equations, images and tables are now centered in Markdown cells. |
|
286 | * Equations, images and tables are now centered in Markdown cells. | |
287 | * Multiline equations are now centered in output areas; single line equations |
|
287 | * Multiline equations are now centered in output areas; single line equations | |
288 | remain left justified. |
|
288 | remain left justified. | |
289 |
|
289 | |||
290 | * IPython config objects can be loaded from and serialized to JSON. |
|
290 | * IPython config objects can be loaded from and serialized to JSON. | |
291 | JSON config file have the same base name as their ``.py`` counterpart, |
|
291 | JSON config file have the same base name as their ``.py`` counterpart, | |
292 | and will be loaded with higher priority if found. |
|
292 | and will be loaded with higher priority if found. | |
293 |
|
293 | |||
294 | * bash completion updated with support for all ipython subcommands and flags, including nbconvert |
|
294 | * bash completion updated with support for all ipython subcommands and flags, including nbconvert | |
295 |
|
295 | |||
296 | * ``ipython history trim``: added ``--keep=<N>`` as an alias for the more verbose |
|
296 | * ``ipython history trim``: added ``--keep=<N>`` as an alias for the more verbose | |
297 | ``--HistoryTrim.keep=<N>`` |
|
297 | ``--HistoryTrim.keep=<N>`` | |
298 | * New ``ipython history clear`` subcommand, which is the same as the newly supported |
|
298 | * New ``ipython history clear`` subcommand, which is the same as the newly supported | |
299 | ``ipython history trim --keep=0`` |
|
299 | ``ipython history trim --keep=0`` | |
300 |
|
300 | |||
301 | * You can now run notebooks in an interactive session via ``%run notebook.ipynb``. |
|
301 | * You can now run notebooks in an interactive session via ``%run notebook.ipynb``. | |
302 |
|
302 | |||
303 | * Print preview is back in the notebook menus, along with options to |
|
303 | * Print preview is back in the notebook menus, along with options to | |
304 | download the open notebook in various formats. This is powered by |
|
304 | download the open notebook in various formats. This is powered by | |
305 | nbconvert. |
|
305 | nbconvert. | |
306 |
|
306 | |||
307 | * :exc:`~IPython.nbconvert.utils.pandoc.PandocMissing` exceptions will be |
|
307 | * :exc:`~IPython.nbconvert.utils.pandoc.PandocMissing` exceptions will be | |
308 | raised if Pandoc is unavailable, and warnings will be printed if the version |
|
308 | raised if Pandoc is unavailable, and warnings will be printed if the version | |
309 | found is too old. The recommended Pandoc version for use with nbconvert is |
|
309 | found is too old. The recommended Pandoc version for use with nbconvert is | |
310 | 1.12.1. |
|
310 | 1.12.1. | |
311 |
|
311 | |||
312 | * The InlineBackend.figure_format now supports JPEG output if PIL/Pillow is available. |
|
312 | * The InlineBackend.figure_format now supports JPEG output if PIL/Pillow is available. | |
313 |
|
313 | |||
314 | * Input transformers (see :doc:`/config/inputtransforms`) may now raise |
|
314 | * Input transformers (see :doc:`/config/inputtransforms`) may now raise | |
315 | :exc:`SyntaxError` if they determine that input is invalid. The input |
|
315 | :exc:`SyntaxError` if they determine that input is invalid. The input | |
316 | transformation machinery in IPython will handle displaying the exception to |
|
316 | transformation machinery in IPython will handle displaying the exception to | |
317 | the user and resetting state. |
|
317 | the user and resetting state. | |
318 |
|
318 | |||
319 | * Calling ``container.show()`` on javascript display is deprecated and will |
|
319 | * Calling ``container.show()`` on javascript display is deprecated and will | |
320 | trigger errors on future IPython notebook versions. ``container`` now show |
|
320 | trigger errors on future IPython notebook versions. ``container`` now show | |
321 | itself as soon as non-empty |
|
321 | itself as soon as non-empty | |
322 |
|
322 | |||
323 | * Added ``InlineBackend.print_figure_kwargs`` to allow passing keyword arguments |
|
323 | * Added ``InlineBackend.print_figure_kwargs`` to allow passing keyword arguments | |
324 | to matplotlib's ``Canvas.print_figure``. This can be used to change the value of |
|
324 | to matplotlib's ``Canvas.print_figure``. This can be used to change the value of | |
325 | ``bbox_inches``, which is 'tight' by default, or set the quality of JPEG figures. |
|
325 | ``bbox_inches``, which is 'tight' by default, or set the quality of JPEG figures. | |
326 |
|
326 | |||
327 | * A new callback system has been introduced. For details, see :doc:`/config/callbacks`. |
|
327 | * A new callback system has been introduced. For details, see :doc:`/config/callbacks`. | |
328 |
|
328 | |||
329 | * jQuery and require.js are loaded from CDNs in the default HTML template, |
|
329 | * jQuery and require.js are loaded from CDNs in the default HTML template, | |
330 | so javascript is available in static HTML export (e.g. nbviewer). |
|
330 | so javascript is available in static HTML export (e.g. nbviewer). | |
331 |
|
331 | |||
332 | Backwards incompatible changes |
|
332 | Backwards incompatible changes | |
333 | ------------------------------ |
|
333 | ------------------------------ | |
334 |
|
334 | |||
335 | * Python 2.6 and 3.2 are no longer supported: the minimum required |
|
335 | * Python 2.6 and 3.2 are no longer supported: the minimum required | |
336 | Python versions are now 2.7 and 3.3. |
|
336 | Python versions are now 2.7 and 3.3. | |
337 | * The Transformer classes have been renamed to Preprocessor in nbconvert and |
|
337 | * The Transformer classes have been renamed to Preprocessor in nbconvert and | |
338 | their ``call`` methods have been renamed to ``preprocess``. |
|
338 | their ``call`` methods have been renamed to ``preprocess``. | |
339 | * The ``call`` methods of nbconvert post-processsors have been renamed to |
|
339 | * The ``call`` methods of nbconvert post-processsors have been renamed to | |
340 | ``postprocess``. |
|
340 | ``postprocess``. | |
341 |
|
341 | |||
342 | * The module ``IPython.core.fakemodule`` has been removed. |
|
342 | * The module ``IPython.core.fakemodule`` has been removed. | |
343 |
|
343 | |||
344 | * The alias system has been reimplemented to use magic functions. There should be little |
|
344 | * The alias system has been reimplemented to use magic functions. There should be little | |
345 | visible difference while automagics are enabled, as they are by default, but parts of the |
|
345 | visible difference while automagics are enabled, as they are by default, but parts of the | |
346 | :class:`~IPython.core.alias.AliasManager` API have been removed. |
|
346 | :class:`~IPython.core.alias.AliasManager` API have been removed. | |
347 |
|
347 | |||
348 | * We fixed an issue with switching between matplotlib inline and GUI backends, |
|
348 | * We fixed an issue with switching between matplotlib inline and GUI backends, | |
349 | but the fix requires matplotlib 1.1 or newer. So from now on, we consider |
|
349 | but the fix requires matplotlib 1.1 or newer. So from now on, we consider | |
350 | matplotlib 1.1 to be the minimally supported version for IPython. Older |
|
350 | matplotlib 1.1 to be the minimally supported version for IPython. Older | |
351 | versions for the most part will work, but we make no guarantees about it. |
|
351 | versions for the most part will work, but we make no guarantees about it. | |
352 |
|
352 | |||
353 | * The :command:`pycolor` command has been removed. We recommend the much more capable |
|
353 | * The :command:`pycolor` command has been removed. We recommend the much more capable | |
354 | :command:`pygmentize` command from the `Pygments <http://pygments.org/>`_ project. |
|
354 | :command:`pygmentize` command from the `Pygments <http://pygments.org/>`_ project. | |
355 | If you need to keep the exact output of :command:`pycolor`, you can still use |
|
355 | If you need to keep the exact output of :command:`pycolor`, you can still use | |
356 | ``python -m IPython.utils.PyColorize foo.py``. |
|
356 | ``python -m IPython.utils.PyColorize foo.py``. | |
357 |
|
357 | |||
358 | * :mod:`IPython.lib.irunner` and its command-line entry point have been removed. |
|
358 | * :mod:`IPython.lib.irunner` and its command-line entry point have been removed. | |
359 | It had fallen out of use long ago. |
|
359 | It had fallen out of use long ago. | |
360 |
|
360 | |||
361 | * The ``input_prefilter`` hook has been removed, as it was never |
|
361 | * The ``input_prefilter`` hook has been removed, as it was never | |
362 | actually used by the code. The input transformer system offers much |
|
362 | actually used by the code. The input transformer system offers much | |
363 | more powerful APIs to work with input code. See |
|
363 | more powerful APIs to work with input code. See | |
364 | :doc:`/config/inputtransforms` for details. |
|
364 | :doc:`/config/inputtransforms` for details. | |
365 |
|
365 | |||
366 | * :class:`IPython.core.inputsplitter.IPythonInputSplitter` no longer has a method |
|
366 | * :class:`IPython.core.inputsplitter.IPythonInputSplitter` no longer has a method | |
367 | ``source_raw_reset()``, but gains :meth:`~IPython.core.inputsplitter.IPythonInputSplitter.raw_reset` |
|
367 | ``source_raw_reset()``, but gains :meth:`~IPython.core.inputsplitter.IPythonInputSplitter.raw_reset` | |
368 | instead. Use of ``source_raw_reset`` can be replaced with:: |
|
368 | instead. Use of ``source_raw_reset`` can be replaced with:: | |
369 |
|
369 | |||
370 | raw = isp.source_raw |
|
370 | raw = isp.source_raw | |
371 | transformed = isp.source_reset() |
|
371 | transformed = isp.source_reset() | |
372 |
|
372 | |||
373 | * The Azure notebook manager was removed as it was no longer compatible with the notebook storage scheme. |
|
373 | * The Azure notebook manager was removed as it was no longer compatible with the notebook storage scheme. | |
374 |
|
374 | |||
375 | * Simplifying configurable URLs |
|
375 | * Simplifying configurable URLs | |
376 |
|
376 | |||
377 | - base_project_url is renamed to base_url (base_project_url is kept as a deprecated alias, for now) |
|
377 | - base_project_url is renamed to base_url (base_project_url is kept as a deprecated alias, for now) | |
378 | - base_kernel_url configurable is removed (use base_url) |
|
378 | - base_kernel_url configurable is removed (use base_url) | |
379 | - websocket_url configurable is removed (use base_url) |
|
379 | - websocket_url configurable is removed (use base_url) |
@@ -1,310 +1,310 | |||||
1 | ============ |
|
1 | ============ | |
2 | 3.x Series |
|
2 | 3.x Series | |
3 | ============ |
|
3 | ============ | |
4 |
|
4 | |||
5 |
|
5 | |||
6 | Release 3.0 |
|
6 | Release 3.0 | |
7 | =========== |
|
7 | =========== | |
8 |
|
8 | |||
9 |
Coming Feb |
|
9 | Coming February, 2015 | |
10 |
|
10 | |||
11 | This is a really big release. Over 150 contributors, and almost 6000 commits in a bit under a year. |
|
11 | This is a really big release. Over 150 contributors, and almost 6000 commits in a bit under a year. | |
12 | Support for languages other than Python is greatly improved, |
|
12 | Support for languages other than Python is greatly improved, | |
13 | notebook UI has been significantly redesigned, |
|
13 | notebook UI has been significantly redesigned, | |
14 | and a lot of improvement has happened in the experimental interactive widgets. |
|
14 | and a lot of improvement has happened in the experimental interactive widgets. | |
15 | The message protocol and document format have both been updated, |
|
15 | The message protocol and document format have both been updated, | |
16 | while maintaining better compatibility with previous versions than prior updates. |
|
16 | while maintaining better compatibility with previous versions than prior updates. | |
17 | The notebook webapp now enables editing of any text file, and even |
|
17 | The notebook webapp now enables editing of any text file, and even | |
18 | a web-based terminal (on Unix platforms). |
|
18 | a web-based terminal (on Unix platforms). | |
19 |
|
19 | |||
20 | 3.x will be the last monolithic release of IPython, |
|
20 | 3.x will be the last monolithic release of IPython, | |
21 | as the next release cycle will see the growing project split into its Python-specific and language-agnostic components. |
|
21 | as the next release cycle will see the growing project split into its Python-specific and language-agnostic components. | |
22 | Language-agnostic projects (notebook, qtconsole, etc.) will move under the umbrella of the new Project Jupyter name, |
|
22 | Language-agnostic projects (notebook, qtconsole, etc.) will move under the umbrella of the new Project Jupyter name, | |
23 | while Python-specific projects (interactive Python shell, Python kernel, IPython.parallel) |
|
23 | while Python-specific projects (interactive Python shell, Python kernel, IPython.parallel) | |
24 | will remain under IPython, and be split into a few smaller packages. |
|
24 | will remain under IPython, and be split into a few smaller packages. | |
25 | To reflect this, IPython is in a bit of a transition state. |
|
25 | To reflect this, IPython is in a bit of a transition state. | |
26 | The logo on the notebook is now the Jupyter logo. |
|
26 | The logo on the notebook is now the Jupyter logo. | |
27 | When installing kernels system-wide, they go in a `jupyter` directory. |
|
27 | When installing kernels system-wide, they go in a `jupyter` directory. | |
28 | We are going to do our best to ease this transition for users and developers. |
|
28 | We are going to do our best to ease this transition for users and developers. | |
29 |
|
29 | |||
30 | Big changes are ahead. |
|
30 | Big changes are ahead. | |
31 |
|
31 | |||
32 |
|
32 | |||
33 | Using different kernels |
|
33 | Using different kernels | |
34 | ----------------------- |
|
34 | ----------------------- | |
35 |
|
35 | |||
36 | .. image:: ../_images/kernel_selector_screenshot.png |
|
36 | .. image:: ../_images/kernel_selector_screenshot.png | |
37 | :alt: Screenshot of 'new' dropdown showing different kernels |
|
37 | :alt: Screenshot of 'new' dropdown showing different kernels | |
38 | :align: center |
|
38 | :align: center | |
39 |
|
39 | |||
40 | You can now choose a kernel for a notebook within the user interface, rather |
|
40 | You can now choose a kernel for a notebook within the user interface, rather | |
41 | than starting up a separate notebook server for each kernel you want to use. The |
|
41 | than starting up a separate notebook server for each kernel you want to use. The | |
42 | syntax highlighting adapts to match the language you're working in. |
|
42 | syntax highlighting adapts to match the language you're working in. | |
43 |
|
43 | |||
44 | Information about the kernel is stored in the notebook file, so when you open a |
|
44 | Information about the kernel is stored in the notebook file, so when you open a | |
45 | notebook, it will automatically start the correct kernel. |
|
45 | notebook, it will automatically start the correct kernel. | |
46 |
|
46 | |||
47 | It is also easier to use the Qt console and the terminal console with other |
|
47 | It is also easier to use the Qt console and the terminal console with other | |
48 | kernels, using the --kernel flag:: |
|
48 | kernels, using the --kernel flag:: | |
49 |
|
49 | |||
50 | ipython qtconsole --kernel bash |
|
50 | ipython qtconsole --kernel bash | |
51 | ipython console --kernel bash |
|
51 | ipython console --kernel bash | |
52 |
|
52 | |||
53 | # To list available kernels |
|
53 | # To list available kernels | |
54 | ipython kernelspec list |
|
54 | ipython kernelspec list | |
55 |
|
55 | |||
56 | Kernel authors should see :ref:`kernelspecs` for how to register their kernels |
|
56 | Kernel authors should see :ref:`kernelspecs` for how to register their kernels | |
57 | with IPython so that these mechanisms work. |
|
57 | with IPython so that these mechanisms work. | |
58 |
|
58 | |||
59 | Typing unicode identifiers |
|
59 | Typing unicode identifiers | |
60 | -------------------------- |
|
60 | -------------------------- | |
61 |
|
61 | |||
62 | .. image:: /_images/unicode_completion.png |
|
62 | .. image:: /_images/unicode_completion.png | |
63 |
|
63 | |||
64 | Complex expressions can be much cleaner when written with a wider choice of |
|
64 | Complex expressions can be much cleaner when written with a wider choice of | |
65 | characters. Python 3 allows unicode identifiers, and IPython 3 makes it easier |
|
65 | characters. Python 3 allows unicode identifiers, and IPython 3 makes it easier | |
66 | to type those, using a feature from Julia. Type a backslash followed by a LaTeX |
|
66 | to type those, using a feature from Julia. Type a backslash followed by a LaTeX | |
67 | style short name, such as ``\alpha``. Press tab, and it will turn into Ξ±. |
|
67 | style short name, such as ``\alpha``. Press tab, and it will turn into Ξ±. | |
68 |
|
68 | |||
69 | Other new features |
|
69 | Other new features | |
70 | ------------------ |
|
70 | ------------------ | |
71 |
|
71 | |||
72 | * :class:`~.TextWidget` and :class:`~.TextareaWidget` objects now include a |
|
72 | * :class:`~.TextWidget` and :class:`~.TextareaWidget` objects now include a | |
73 | ``placeholder`` attribute, for displaying placeholder text before the |
|
73 | ``placeholder`` attribute, for displaying placeholder text before the | |
74 | user has typed anything. |
|
74 | user has typed anything. | |
75 |
|
75 | |||
76 | * The :magic:`load` magic can now find the source for objects in the user namespace. |
|
76 | * The :magic:`load` magic can now find the source for objects in the user namespace. | |
77 | To enable searching the namespace, use the ``-n`` option. |
|
77 | To enable searching the namespace, use the ``-n`` option. | |
78 |
|
78 | |||
79 | .. sourcecode:: ipython |
|
79 | .. sourcecode:: ipython | |
80 |
|
80 | |||
81 | In [1]: %load -n my_module.some_function |
|
81 | In [1]: %load -n my_module.some_function | |
82 |
|
82 | |||
83 | * :class:`~.DirectView` objects have a new :meth:`~.DirectView.use_cloudpickle` |
|
83 | * :class:`~.DirectView` objects have a new :meth:`~.DirectView.use_cloudpickle` | |
84 | method, which works like ``view.use_dill()``, but causes the ``cloudpickle`` |
|
84 | method, which works like ``view.use_dill()``, but causes the ``cloudpickle`` | |
85 | module from PiCloud's `cloud`__ library to be used rather than dill or the |
|
85 | module from PiCloud's `cloud`__ library to be used rather than dill or the | |
86 | builtin pickle module. |
|
86 | builtin pickle module. | |
87 |
|
87 | |||
88 | __ https://pypi.python.org/pypi/cloud |
|
88 | __ https://pypi.python.org/pypi/cloud | |
89 |
|
89 | |||
90 | * Added a .ipynb exporter to nbconvert. It can be used by passing `--to notebook` |
|
90 | * Added a .ipynb exporter to nbconvert. It can be used by passing `--to notebook` | |
91 | as a commandline argument to nbconvert. |
|
91 | as a commandline argument to nbconvert. | |
92 |
|
92 | |||
93 | * New nbconvert preprocessor called :class:`~.ClearOutputPreprocessor`. This |
|
93 | * New nbconvert preprocessor called :class:`~.ClearOutputPreprocessor`. This | |
94 | clears the output from IPython notebooks. |
|
94 | clears the output from IPython notebooks. | |
95 |
|
95 | |||
96 | * New preprocessor for nbconvert that executes all the code cells in a notebook. |
|
96 | * New preprocessor for nbconvert that executes all the code cells in a notebook. | |
97 | To run a notebook and save its output in a new notebook:: |
|
97 | To run a notebook and save its output in a new notebook:: | |
98 |
|
98 | |||
99 | ipython nbconvert InputNotebook --ExecutePreprocessor.enabled=True --to notebook --output Executed |
|
99 | ipython nbconvert InputNotebook --ExecutePreprocessor.enabled=True --to notebook --output Executed | |
100 |
|
100 | |||
101 | * Consecutive stream (stdout/stderr) output is merged into a single output |
|
101 | * Consecutive stream (stdout/stderr) output is merged into a single output | |
102 | in the notebook document. |
|
102 | in the notebook document. | |
103 | Previously, all output messages were preserved as separate output fields in the JSON. |
|
103 | Previously, all output messages were preserved as separate output fields in the JSON. | |
104 | Now, the same merge is applied to the stored output as the displayed output, |
|
104 | Now, the same merge is applied to the stored output as the displayed output, | |
105 | improving document load time for notebooks with many small outputs. |
|
105 | improving document load time for notebooks with many small outputs. | |
106 |
|
106 | |||
107 | * ``NotebookApp.webapp_settings`` is deprecated and replaced with |
|
107 | * ``NotebookApp.webapp_settings`` is deprecated and replaced with | |
108 | the more informatively named ``NotebookApp.tornado_settings``. |
|
108 | the more informatively named ``NotebookApp.tornado_settings``. | |
109 |
|
109 | |||
110 | * Using :magic:`timeit` prints warnings if there is atleast a 4x difference in timings |
|
110 | * Using :magic:`timeit` prints warnings if there is atleast a 4x difference in timings | |
111 | between the slowest and fastest runs, since this might meant that the multiple |
|
111 | between the slowest and fastest runs, since this might meant that the multiple | |
112 | runs are not independent of one another. |
|
112 | runs are not independent of one another. | |
113 |
|
113 | |||
114 | * It's now possible to provide mechanisms to integrate IPython with other event |
|
114 | * It's now possible to provide mechanisms to integrate IPython with other event | |
115 | loops, in addition to the ones we already support. This lets you run GUI code |
|
115 | loops, in addition to the ones we already support. This lets you run GUI code | |
116 | in IPython with an interactive prompt, and to embed the IPython |
|
116 | in IPython with an interactive prompt, and to embed the IPython | |
117 | kernel in GUI applications. See :doc:`/config/eventloops` for details. As part |
|
117 | kernel in GUI applications. See :doc:`/config/eventloops` for details. As part | |
118 | of this, the direct ``enable_*`` and ``disable_*`` functions for various GUIs |
|
118 | of this, the direct ``enable_*`` and ``disable_*`` functions for various GUIs | |
119 | in :mod:`IPython.lib.inputhook` have been deprecated in favour of |
|
119 | in :mod:`IPython.lib.inputhook` have been deprecated in favour of | |
120 | :meth:`~.InputHookManager.enable_gui` and :meth:`~.InputHookManager.disable_gui`. |
|
120 | :meth:`~.InputHookManager.enable_gui` and :meth:`~.InputHookManager.disable_gui`. | |
121 |
|
121 | |||
122 | * A ``ScrollManager`` was added to the notebook. The ``ScrollManager`` controls how the notebook document is scrolled using keyboard. Users can inherit from the ``ScrollManager`` or ``TargetScrollManager`` to customize how their notebook scrolls. The default ``ScrollManager`` is the ``SlideScrollManager``, which tries to scroll to the nearest slide or sub-slide cell. |
|
122 | * A ``ScrollManager`` was added to the notebook. The ``ScrollManager`` controls how the notebook document is scrolled using keyboard. Users can inherit from the ``ScrollManager`` or ``TargetScrollManager`` to customize how their notebook scrolls. The default ``ScrollManager`` is the ``SlideScrollManager``, which tries to scroll to the nearest slide or sub-slide cell. | |
123 |
|
123 | |||
124 | * The function :func:`~IPython.html.widgets.interaction.interact_manual` has been |
|
124 | * The function :func:`~IPython.html.widgets.interaction.interact_manual` has been | |
125 | added which behaves similarly to :func:`~IPython.html.widgets.interaction.interact`, |
|
125 | added which behaves similarly to :func:`~IPython.html.widgets.interaction.interact`, | |
126 | but adds a button to explicitly run the interacted-with function, rather than |
|
126 | but adds a button to explicitly run the interacted-with function, rather than | |
127 | doing it automatically for every change of the parameter widgets. This should |
|
127 | doing it automatically for every change of the parameter widgets. This should | |
128 | be useful for long-running functions. |
|
128 | be useful for long-running functions. | |
129 |
|
129 | |||
130 | * The ``%cython`` magic is now part of the Cython module. Use `%load_ext Cython` with a version of Cython >= 0.21 to have access to the magic now. |
|
130 | * The ``%cython`` magic is now part of the Cython module. Use `%load_ext Cython` with a version of Cython >= 0.21 to have access to the magic now. | |
131 |
|
131 | |||
132 | * The Notebook application now offers integrated terminals on Unix platforms, |
|
132 | * The Notebook application now offers integrated terminals on Unix platforms, | |
133 | intended for when it is used on a remote server. To enable these, install |
|
133 | intended for when it is used on a remote server. To enable these, install | |
134 | the ``terminado`` Python package. |
|
134 | the ``terminado`` Python package. | |
135 |
|
135 | |||
136 | * The Notebook application can now edit any plain text files, via a full-page CodeMirror instance. |
|
136 | * The Notebook application can now edit any plain text files, via a full-page CodeMirror instance. | |
137 |
|
137 | |||
138 | * Setting the default highlighting language for nbconvert with the config option |
|
138 | * Setting the default highlighting language for nbconvert with the config option | |
139 | ``NbConvertBase.default_language`` is deprecated. Nbconvert now respects |
|
139 | ``NbConvertBase.default_language`` is deprecated. Nbconvert now respects | |
140 | metadata stored in the :ref:`kernel spec <kernelspecs>`. |
|
140 | metadata stored in the :ref:`kernel spec <kernelspecs>`. | |
141 |
|
141 | |||
142 | * IPython can now be configured systemwide, with files in :file:`/etc/ipython` |
|
142 | * IPython can now be configured systemwide, with files in :file:`/etc/ipython` | |
143 | or :file:`/usr/local/etc/ipython` on Unix systems, |
|
143 | or :file:`/usr/local/etc/ipython` on Unix systems, | |
144 | or :file:`{%PROGRAMDATA%}\\ipython` on Windows. |
|
144 | or :file:`{%PROGRAMDATA%}\\ipython` on Windows. | |
145 |
|
145 | |||
146 | * Added support for configurable user-supplied `Jinja |
|
146 | * Added support for configurable user-supplied `Jinja | |
147 | <http://jinja.pocoo.org/>`_ HTML templates for the notebook. Paths to |
|
147 | <http://jinja.pocoo.org/>`_ HTML templates for the notebook. Paths to | |
148 | directories containing template files can be specified via |
|
148 | directories containing template files can be specified via | |
149 | ``NotebookApp.extra_template_paths``. User-supplied template directories |
|
149 | ``NotebookApp.extra_template_paths``. User-supplied template directories | |
150 | searched first by the notebook, making it possible to replace existing |
|
150 | searched first by the notebook, making it possible to replace existing | |
151 | templates with your own files. |
|
151 | templates with your own files. | |
152 |
|
152 | |||
153 | For example, to replace the notebook's built-in ``error.html`` with your own, |
|
153 | For example, to replace the notebook's built-in ``error.html`` with your own, | |
154 | create a directory like ``/home/my_templates`` and put your override template |
|
154 | create a directory like ``/home/my_templates`` and put your override template | |
155 | at ``/home/my_templates/error.html``. To start the notebook with your custom |
|
155 | at ``/home/my_templates/error.html``. To start the notebook with your custom | |
156 | error page enabled, you would run:: |
|
156 | error page enabled, you would run:: | |
157 |
|
157 | |||
158 | ipython notebook '--extra_template_paths=["/home/my_templates/"]' |
|
158 | ipython notebook '--extra_template_paths=["/home/my_templates/"]' | |
159 |
|
159 | |||
160 | It's also possible to override a template while also `inheriting |
|
160 | It's also possible to override a template while also `inheriting | |
161 | <http://jinja.pocoo.org/docs/dev/templates/#template-inheritance>`_ from that |
|
161 | <http://jinja.pocoo.org/docs/dev/templates/#template-inheritance>`_ from that | |
162 | template, by prepending ``templates/`` to the ``{% extends %}`` target of |
|
162 | template, by prepending ``templates/`` to the ``{% extends %}`` target of | |
163 | your child template. This is useful when you only want to override a |
|
163 | your child template. This is useful when you only want to override a | |
164 | specific block of a template. For example, to add additional CSS to the |
|
164 | specific block of a template. For example, to add additional CSS to the | |
165 | built-in ``error.html``, you might create an override that looks like:: |
|
165 | built-in ``error.html``, you might create an override that looks like:: | |
166 |
|
166 | |||
167 | {% extends "templates/error.html" %} |
|
167 | {% extends "templates/error.html" %} | |
168 |
|
168 | |||
169 | {% block stylesheet %} |
|
169 | {% block stylesheet %} | |
170 | {{super()}} |
|
170 | {{super()}} | |
171 | <style type="text/css"> |
|
171 | <style type="text/css"> | |
172 | /* My Awesome CSS */ |
|
172 | /* My Awesome CSS */ | |
173 | </style> |
|
173 | </style> | |
174 | {% endblock %} |
|
174 | {% endblock %} | |
175 |
|
175 | |||
176 | * Added a widget persistence API. This allows you to persist your notebooks interactive widgets. |
|
176 | * Added a widget persistence API. This allows you to persist your notebooks interactive widgets. | |
177 | Two levels of control are provided: |
|
177 | Two levels of control are provided: | |
178 | 1. Higher level- ``WidgetManager.set_state_callbacks`` allows you to register callbacks for loading and saving widget state. The callbacks you register are automatically called when necessary. |
|
178 | 1. Higher level- ``WidgetManager.set_state_callbacks`` allows you to register callbacks for loading and saving widget state. The callbacks you register are automatically called when necessary. | |
179 | 2. Lower level- the ``WidgetManager`` Javascript class now has ``get_state`` and ``set_state`` methods that allow you to get and set the state of the widget runtime. |
|
179 | 2. Lower level- the ``WidgetManager`` Javascript class now has ``get_state`` and ``set_state`` methods that allow you to get and set the state of the widget runtime. | |
180 |
|
180 | |||
181 | Example code for persisting your widget state to session data:: |
|
181 | Example code for persisting your widget state to session data:: | |
182 |
|
182 | |||
183 | %%javascript |
|
183 | %%javascript | |
184 | require(['widgets/js/manager'], function(manager) { |
|
184 | require(['widgets/js/manager'], function(manager) { | |
185 | manager.WidgetManager.set_state_callbacks(function() { // Load |
|
185 | manager.WidgetManager.set_state_callbacks(function() { // Load | |
186 | return JSON.parse(sessionStorage.widgets_state || '{}'); |
|
186 | return JSON.parse(sessionStorage.widgets_state || '{}'); | |
187 | }, function(state) { // Save |
|
187 | }, function(state) { // Save | |
188 | sessionStorage.widgets_state = JSON.stringify(state); |
|
188 | sessionStorage.widgets_state = JSON.stringify(state); | |
189 | }); |
|
189 | }); | |
190 | }); |
|
190 | }); | |
191 |
|
191 | |||
192 | * Enhanced support for :magic:`env` magic. As before, :magic:`env` with no |
|
192 | * Enhanced support for :magic:`env` magic. As before, :magic:`env` with no | |
193 | arguments displays all environment variables and values. Additionally, |
|
193 | arguments displays all environment variables and values. Additionally, | |
194 | :magic:`env` can be used to get or set individual environment variables. To |
|
194 | :magic:`env` can be used to get or set individual environment variables. To | |
195 | display an individual value, use the `%env var` syntax. To set a value, use |
|
195 | display an individual value, use the `%env var` syntax. To set a value, use | |
196 | `env var val` or `env var=val`. Python value expansion using `$` works as usual. |
|
196 | `env var val` or `env var=val`. Python value expansion using `$` works as usual. | |
197 |
|
197 | |||
198 |
|
198 | |||
199 | Backwards incompatible changes |
|
199 | Backwards incompatible changes | |
200 | ------------------------------ |
|
200 | ------------------------------ | |
201 |
|
201 | |||
202 | * The :ref:`message protocol <messaging>` has been updated from version 4 to version 5. |
|
202 | * The :ref:`message protocol <messaging>` has been updated from version 4 to version 5. | |
203 | Adapters are included, so IPython frontends can still talk to kernels that |
|
203 | Adapters are included, so IPython frontends can still talk to kernels that | |
204 | implement protocol version 4. |
|
204 | implement protocol version 4. | |
205 |
|
205 | |||
206 | * The :ref:`notebook format <nbformat>` has been updated from version 3 to version 4. |
|
206 | * The :ref:`notebook format <nbformat>` has been updated from version 3 to version 4. | |
207 | Read-only support for v4 notebooks has been backported to IPython 2.4. |
|
207 | Read-only support for v4 notebooks has been backported to IPython 2.4. | |
208 | Notable changes: |
|
208 | Notable changes: | |
209 |
|
209 | |||
210 | * heading cells are removed in favor or markdown headings |
|
210 | * heading cells are removed in favor or markdown headings | |
211 | * notebook outputs and output messages are more consistent with each other |
|
211 | * notebook outputs and output messages are more consistent with each other | |
212 | * use :func:`IPython.nbformat.read` and :func:`~IPython.nbformat.write` |
|
212 | * use :func:`IPython.nbformat.read` and :func:`~IPython.nbformat.write` | |
213 | to read and write notebook files |
|
213 | to read and write notebook files | |
214 | instead of the deprecated :mod:`IPython.nbformat.current` APIs. |
|
214 | instead of the deprecated :mod:`IPython.nbformat.current` APIs. | |
215 |
|
215 | |||
216 | * :func:`IPython.core.oinspect.getsource` call specification has changed: |
|
216 | * :func:`IPython.core.oinspect.getsource` call specification has changed: | |
217 |
|
217 | |||
218 | * `oname` keyword argument has been added for property source formatting |
|
218 | * `oname` keyword argument has been added for property source formatting | |
219 | * `is_binary` keyword argument has been dropped, passing ``True`` had |
|
219 | * `is_binary` keyword argument has been dropped, passing ``True`` had | |
220 | previously short-circuited the function to return ``None`` unconditionally |
|
220 | previously short-circuited the function to return ``None`` unconditionally | |
221 |
|
221 | |||
222 | * Removed the octavemagic extension: it is now available as ``oct2py.ipython``. |
|
222 | * Removed the octavemagic extension: it is now available as ``oct2py.ipython``. | |
223 |
|
223 | |||
224 | * Creating PDFs with LaTeX no longer uses a post processor. |
|
224 | * Creating PDFs with LaTeX no longer uses a post processor. | |
225 | Use `nbconvert --to pdf` instead of `nbconvert --to latex --post pdf`. |
|
225 | Use `nbconvert --to pdf` instead of `nbconvert --to latex --post pdf`. | |
226 |
|
226 | |||
227 | * Used https://github.com/jdfreder/bootstrap2to3 to migrate the Notebook to Bootstrap 3. |
|
227 | * Used https://github.com/jdfreder/bootstrap2to3 to migrate the Notebook to Bootstrap 3. | |
228 |
|
228 | |||
229 | Additional changes: |
|
229 | Additional changes: | |
230 |
|
230 | |||
231 | - Set `.tab-content .row` `0px;` left and right margin (bootstrap default is `-15px;`) |
|
231 | - Set `.tab-content .row` `0px;` left and right margin (bootstrap default is `-15px;`) | |
232 | - Removed `height: @btn_mini_height;` from `.list_header>div, .list_item>div` in `tree.less` |
|
232 | - Removed `height: @btn_mini_height;` from `.list_header>div, .list_item>div` in `tree.less` | |
233 | - Set `#header` div `margin-bottom: 0px;` |
|
233 | - Set `#header` div `margin-bottom: 0px;` | |
234 | - Set `#menus` to `float: left;` |
|
234 | - Set `#menus` to `float: left;` | |
235 | - Set `#maintoolbar .navbar-text` to `float: none;` |
|
235 | - Set `#maintoolbar .navbar-text` to `float: none;` | |
236 | - Added no-padding convenience class. |
|
236 | - Added no-padding convenience class. | |
237 | - Set border of #maintoolbar to 0px |
|
237 | - Set border of #maintoolbar to 0px | |
238 |
|
238 | |||
239 | * Accessing the `container` DOM object when displaying javascript has been |
|
239 | * Accessing the `container` DOM object when displaying javascript has been | |
240 | deprecated in IPython 2.0 in favor of accessing `element`. Starting with |
|
240 | deprecated in IPython 2.0 in favor of accessing `element`. Starting with | |
241 | IPython 3.0 trying to access `container` will raise an error in browser |
|
241 | IPython 3.0 trying to access `container` will raise an error in browser | |
242 | javascript console. |
|
242 | javascript console. | |
243 |
|
243 | |||
244 | * ``IPython.utils.py3compat.open`` was removed: :func:`io.open` provides all |
|
244 | * ``IPython.utils.py3compat.open`` was removed: :func:`io.open` provides all | |
245 | the same functionality. |
|
245 | the same functionality. | |
246 |
|
246 | |||
247 | * The NotebookManager and ``/api/notebooks`` service has been replaced by |
|
247 | * The NotebookManager and ``/api/notebooks`` service has been replaced by | |
248 | a more generic ContentsManager and ``/api/contents`` service, |
|
248 | a more generic ContentsManager and ``/api/contents`` service, | |
249 | which supports all kinds of files. |
|
249 | which supports all kinds of files. | |
250 | * The Dashboard now lists all files, not just notebooks and directories. |
|
250 | * The Dashboard now lists all files, not just notebooks and directories. | |
251 | * The ``--script`` hook for saving notebooks to Python scripts is removed, |
|
251 | * The ``--script`` hook for saving notebooks to Python scripts is removed, | |
252 | use :samp:`ipython nbconvert --to python {notebook}` instead. |
|
252 | use :samp:`ipython nbconvert --to python {notebook}` instead. | |
253 |
|
253 | |||
254 | * The ``rmagic`` extension is deprecated, as it is now part of rpy2. See |
|
254 | * The ``rmagic`` extension is deprecated, as it is now part of rpy2. See | |
255 | :mod:`rpy2.ipython.rmagic`. |
|
255 | :mod:`rpy2.ipython.rmagic`. | |
256 |
|
256 | |||
257 | * :meth:`~.KernelManager.start_kernel` and :meth:`~.KernelManager.format_kernel_cmd` |
|
257 | * :meth:`~.KernelManager.start_kernel` and :meth:`~.KernelManager.format_kernel_cmd` | |
258 | no longer accept a ``executable`` parameter. Use the kernelspec machinery instead. |
|
258 | no longer accept a ``executable`` parameter. Use the kernelspec machinery instead. | |
259 |
|
259 | |||
260 | * The widget classes have been renamed from `*Widget` to `*`. The old names are |
|
260 | * The widget classes have been renamed from `*Widget` to `*`. The old names are | |
261 | still functional, but are deprecated. i.e. `IntSliderWidget` has been renamed |
|
261 | still functional, but are deprecated. i.e. `IntSliderWidget` has been renamed | |
262 | to `IntSlider`. |
|
262 | to `IntSlider`. | |
263 | * The ContainerWidget was renamed to Box and no longer defaults as a flexible |
|
263 | * The ContainerWidget was renamed to Box and no longer defaults as a flexible | |
264 | box in the web browser. A new FlexBox widget was added, which allows you to |
|
264 | box in the web browser. A new FlexBox widget was added, which allows you to | |
265 | use the flexible box model. |
|
265 | use the flexible box model. | |
266 |
|
266 | |||
267 | * The notebook now uses a single websocket at `/kernels/<kernel-id>/channels` instead of separate |
|
267 | * The notebook now uses a single websocket at `/kernels/<kernel-id>/channels` instead of separate | |
268 | `/kernels/<kernel-id>/{shell|iopub|stdin}` channels. Messages on each channel are identified by a |
|
268 | `/kernels/<kernel-id>/{shell|iopub|stdin}` channels. Messages on each channel are identified by a | |
269 | `channel` key in the message dict, for both send and recv. |
|
269 | `channel` key in the message dict, for both send and recv. | |
270 |
|
270 | |||
271 |
|
271 | |||
272 | Content Security Policy |
|
272 | Content Security Policy | |
273 | ``````````````````````` |
|
273 | ``````````````````````` | |
274 |
|
274 | |||
275 | The Content Security Policy is a web standard for adding a layer of security to |
|
275 | The Content Security Policy is a web standard for adding a layer of security to | |
276 | detect and mitigate certain classes of attacks, including Cross Site Scripting |
|
276 | detect and mitigate certain classes of attacks, including Cross Site Scripting | |
277 | (XSS) and data injection attacks. This was introduced into the notebook to |
|
277 | (XSS) and data injection attacks. This was introduced into the notebook to | |
278 | ensure that the IPython Notebook and its APIs (by default) can only be embedded |
|
278 | ensure that the IPython Notebook and its APIs (by default) can only be embedded | |
279 | in an iframe on the same origin. |
|
279 | in an iframe on the same origin. | |
280 |
|
280 | |||
281 | Override ``headers['Content-Security-Policy']`` within your notebook |
|
281 | Override ``headers['Content-Security-Policy']`` within your notebook | |
282 | configuration to extend for alternate domains and security settings.:: |
|
282 | configuration to extend for alternate domains and security settings.:: | |
283 |
|
283 | |||
284 | c.NotebookApp.tornado_settings = { |
|
284 | c.NotebookApp.tornado_settings = { | |
285 | 'headers': { |
|
285 | 'headers': { | |
286 | 'Content-Security-Policy': "frame-ancestors 'self'" |
|
286 | 'Content-Security-Policy': "frame-ancestors 'self'" | |
287 | } |
|
287 | } | |
288 | } |
|
288 | } | |
289 |
|
289 | |||
290 | Example policies:: |
|
290 | Example policies:: | |
291 |
|
291 | |||
292 | Content-Security-Policy: default-src 'self' https://*.jupyter.org |
|
292 | Content-Security-Policy: default-src 'self' https://*.jupyter.org | |
293 |
|
293 | |||
294 | Matches embeddings on any subdomain of jupyter.org, so long as they are served |
|
294 | Matches embeddings on any subdomain of jupyter.org, so long as they are served | |
295 | over SSL. |
|
295 | over SSL. | |
296 |
|
296 | |||
297 | There is a `report-uri <https://developer.mozilla.org/en-US/docs/Web/Security/CSP/CSP_policy_directives#report-uri>`_ endpoint available for logging CSP violations, located at |
|
297 | There is a `report-uri <https://developer.mozilla.org/en-US/docs/Web/Security/CSP/CSP_policy_directives#report-uri>`_ endpoint available for logging CSP violations, located at | |
298 | ``/api/security/csp-report``. To use it, set ``report-uri`` as part of the CSP:: |
|
298 | ``/api/security/csp-report``. To use it, set ``report-uri`` as part of the CSP:: | |
299 |
|
299 | |||
300 | c.NotebookApp.tornado_settings = { |
|
300 | c.NotebookApp.tornado_settings = { | |
301 | 'headers': { |
|
301 | 'headers': { | |
302 | 'Content-Security-Policy': "frame-ancestors 'self'; report-uri /api/security/csp-report" |
|
302 | 'Content-Security-Policy': "frame-ancestors 'self'; report-uri /api/security/csp-report" | |
303 | } |
|
303 | } | |
304 | } |
|
304 | } | |
305 |
|
305 | |||
306 | It simply provides the CSP report as a warning in IPython's logs. The default |
|
306 | It simply provides the CSP report as a warning in IPython's logs. The default | |
307 | CSP sets this report-uri relative to the ``base_url`` (not shown above). |
|
307 | CSP sets this report-uri relative to the ``base_url`` (not shown above). | |
308 |
|
308 | |||
309 | For a more thorough and accurate guide on Content Security Policies, check out |
|
309 | For a more thorough and accurate guide on Content Security Policies, check out | |
310 | `MDN's Using Content Security Policy <https://developer.mozilla.org/en-US/docs/Web/Security/CSP/Using_Content_Security_Policy>`_ for more examples. |
|
310 | `MDN's Using Content Security Policy <https://developer.mozilla.org/en-US/docs/Web/Security/CSP/Using_Content_Security_Policy>`_ for more examples. |
General Comments 0
You need to be logged in to leave comments.
Login now