##// END OF EJS Templates
Print View has been removed...
Paul Ivanov -
Show More
@@ -1,287 +1,289 b''
1 1 ============
2 2 1.0 Series
3 3 ============
4 4
5 5 Release 1.0
6 6 ===========
7 7
8 8 IPython 1.0 requires Python β‰₯ 2.6.5 or β‰₯ 3.2.1.
9 9 It does not support Python 3.0, 3.1, or 2.5.
10 10
11 11 This is a big release. The principal milestone is the addition of :mod:`IPython.nbconvert`,
12 12 but there has been a great deal of work improving all parts of IPython as well.
13 13
14 14 The previous version (0.13) was released on June 30, 2012,
15 15 and in this development cycle we had:
16 16
17 17 - ~12 months of work.
18 18 - ~700 pull requests merged.
19 19 - ~600 issues closed (non-pull requests).
20 20 - contributions from ~150 authors.
21 21 - ~4000 commits.
22 22
23 23 The amount of work included in this release is so large that we can only cover
24 24 here the main highlights; please see our :ref:`detailed release statistics
25 25 <issues_list_100>` for links to every issue and pull request closed on GitHub
26 26 as well as a full list of individual contributors.
27 27 It includes
28 28
29 29 Reorganization
30 30 --------------
31 31
32 32 There have been two major reorganizations in IPython 1.0:
33 33
34 34 - Added :mod:`IPython.kernel` for all kernel-related code.
35 35 This means that :mod:`IPython.zmq` has been removed,
36 36 and much of it is now in :mod:`IPython.kernel.zmq`,
37 37 some of it being in the top-level :mod:`IPython.kernel`.
38 38 - We have removed the `frontend` subpackage,
39 39 as it caused unnecessary depth. So what was :mod:`IPython.frontend.qt`
40 40 is now :mod:`IPython.qt`, and so on. The one difference is that
41 41 the notebook has been further flattened, so that
42 42 :mod:`IPython.frontend.html.notebook` is now just `IPython.html`.
43 43 There is a shim module, so :mod:`IPython.frontend` is still
44 44 importable in 1.0, but there will be a warning.
45 45 - The IPython sphinx directives are now installed in :mod:`IPython.sphinx`,
46 46 so they can be imported by other projects.
47 47
48 48
49 49 Public APIs
50 50 -----------
51 51
52 52 For the first time since 0.10 (sorry, everyone),
53 53 there is an official public API for starting IPython:
54 54
55 55 .. sourcecode:: python
56 56
57 57 from IPython import start_ipython
58 58 start_ipython()
59 59
60 60 This is what packages should use that start their own IPython session,
61 61 but don't actually want embedded IPython (most cases).
62 62
63 63 We also have added:
64 64
65 65 .. sourcecode:: python
66 66
67 67 from IPython import get_ipython
68 68
69 69
70 70 Which is a *library* function for getting the current IPython instance,
71 71 and will return ``None`` if no IPython instance is running.
72 72 This is the official way to check whether your code is called from inside an IPython session.
73 73 If you want to check for IPython without unnecessarily importing IPython,
74 74 use this function:
75 75
76 76 .. sourcecode:: python
77 77
78 78 def get_ipython():
79 79 """return IPython instance if there is one, None otherwise"""
80 80 import sys
81 81 if "IPython" in sys.modules:
82 82 import IPython
83 83 return IPython.get_ipython()
84 84
85 85 Core
86 86 ----
87 87
88 88 - The input transformation framework has been reworked. This fixes some corner
89 89 cases, and adds more flexibility for projects which use IPython, like SymPy &
90 90 SAGE. For more details, see :doc:`/config/inputtransforms`.
91 91 - Exception types can now be displayed with a custom traceback, by defining a
92 92 ``_render_traceback_()`` method which returns a list of strings, each
93 93 containing one line of the traceback.
94 94 - A new command, ``ipython history trim`` can be used to delete everything but
95 95 the last 1000 entries in the history database.
96 96 - ``__file__`` is defined in both config files at load time,
97 97 and ``.ipy`` files executed with ``%run``.
98 98 - ``%logstart`` and ``%logappend`` are no longer broken.
99 99 - Add glob expansion for ``%run``, e.g. ``%run -g script.py *.txt``.
100 100 - Expand variables (``$foo``) in Cell Magic argument line.
101 101 - By default, :command:`iptest` will exclude various slow tests.
102 102 All tests can be run with :command:`iptest --all`.
103 103 - SQLite history can be disabled in the various cases that it does not behave well.
104 104 - ``%edit`` works on interactively defined variables.
105 105 - editor hooks have been restored from quarantine, enabling TextMate as editor,
106 106 etc.
107 107 - The env variable PYTHONSTARTUP is respected by IPython.
108 108 - A ``%matplotlib`` magic is added, which is like the old ``%pylab`` magic,
109 109 but it does not import anything to the interactive namespace.
110 110 It is recommended that users switch to ``%matplotlib`` and explicit imports.
111 111
112 112
113 113 Backwards incompatible changes
114 114 ******************************
115 115
116 116 - Calling :meth:`InteractiveShell.prefilter` will no longer perform static
117 117 transformations - the processing of escaped commands such as ``%magic`` and
118 118 ``!system``, and stripping input prompts from code blocks. This functionality
119 119 was duplicated in :mod:`IPython.core.inputsplitter`, and the latter version
120 120 was already what IPython relied on. A new API to transform input will be ready
121 121 before release.
122 122 - Functions from :mod:`IPython.lib.inputhook` to control integration with GUI
123 123 event loops are no longer exposed in the top level of :mod:`IPython.lib`.
124 124 Code calling these should make sure to import them from
125 125 :mod:`IPython.lib.inputhook`.
126 126 - For all kernel managers, the ``sub_channel`` attribute has been renamed to
127 127 ``iopub_channel``.
128 128 - Users on Python versions before 2.6.6, 2.7.1 or 3.2 will now need to call
129 129 :func:`IPython.utils.doctestreload.doctest_reload` to make doctests run
130 130 correctly inside IPython. Python releases since those versions are unaffected.
131 131 For details, see :ghpull:`3068` and `Python issue 8048 <http://bugs.python.org/issue8048>`_.
132 132 - The ``InteractiveShell.cache_main_mod()`` method has been removed, and
133 133 :meth:`~IPython.core.interactiveshell.InteractiveShell.new_main_mod` has a
134 134 different signature, expecting a filename where earlier versions expected
135 135 a namespace. See :ghpull:`3555` for details.
136 136 - The short-lived plugin system has been removed. Extensions are the way to go.
137 137
138 138
139 139 NbConvert
140 140 ---------
141 141
142 142 The major milestone for IPython 1.0 is the addition of :mod:`IPython.nbconvert` - tools for converting
143 143 IPython notebooks to various other formats.
144 144
145 145 .. warning::
146 146
147 147 nbconvert is Ξ±-level preview code in 1.0
148 148
149 149 To use nbconvert to convert various file formats::
150 150
151 151 ipython nbconvert --format full_html *.ipynb
152 152
153 153 See ``ipython nbconvert --help`` for more information.
154 154 nbconvert depends on `pandoc`_ for many of the translations to and from various formats.
155 155
156 156 .. _pandoc: http://johnmacfarlane.net/pandoc/
157 157
158 158 Notebook
159 159 --------
160 160
161 161 Major changes to the IPython Notebook in 1.0:
162 162
163 163 - The notebook is now autosaved, by default at an interval of two minutes.
164 164 When you press 'save' or Ctrl-S, a *checkpoint* is made, in a hidden folder.
165 165 This checkpoint can be restored, so that the autosave model is strictly safer
166 166 than traditional save. If you change nothing about your save habits,
167 167 you will always have a checkpoint that you have written,
168 168 and an autosaved file that is kept up to date.
169 169 - You can load custom javascript and CSS in the notebook by editing the files
170 170 :file:`$(ipython locate profile)/static/custom/custom.{js,css}`.
171 171 - Add ``%%html``, ``%%svg``, ``%%javascript``, and ``%%latex`` cell magics
172 172 for writing raw output in notebook cells.
173 173 - add a redirect handler and anchors on heading cells, so you can link
174 174 across notebooks, directly to heading cells in other notebooks.
175 175 - Images support width and height metadata,
176 176 and thereby 2x scaling (retina support).
177 177 - ``_repr_foo_`` methods can return a tuple of (data, metadata),
178 178 where metadata is a dict containing metadata about the displayed object.
179 179 This is used to set size, etc. for retina graphics. To enable retina matplotlib figures,
180 180 simply set ``InlineBackend.figure_format = 'retina'`` for 2x PNG figures.
181 181 - Add display.FileLink and FileLinks for quickly displaying HTML links to local files.
182 182 - Cells have metadata, which can be edited via cell toolbars.
183 183 This metadata can be used by external code (e.g. reveal.js or exporters),
184 184 when examining the notebook.
185 185 - Fix an issue parsing LaTeX in markdown cells, which required users to type ``\\\``,
186 186 instead of ``\\``.
187 187 - Notebook templates are rendered with Jinja instead of Tornado.
188 188 - ``%%file`` has been renamed ``%%writefile`` (``%%file``) is deprecated.
189 189 - ANSI (and VT100) color parsing has been improved in both performance and
190 190 supported values.
191 191 - The static files path can be found as ``IPython.html.DEFAULT_STATIC_FILES_PATH``,
192 192 which may be changed by package managers.
193 193 - The notebook supports :func:`raw_input`, and thus also ``%debug``.
194 194 - IPython's CSS is installed in :file:`static/css/style.min.css`
195 195 (all style, including bootstrap), and :file:`static/css/ipython.min.css`,
196 196 which only has IPython's own CSS. The latter file should be useful for embedding
197 197 IPython notebooks in other pages, blogs, etc.
198 - The "Print View" has been removed, as the main notebook page is fully capable
199 of being printed using standard web browser print facilities.
198 200
199 201 Javascript Components
200 202 *********************
201 203
202 204 The javascript components used in the notebook have been updated significantly.
203 205
204 206 - updates to jQuery (2.0) and jQueryUI (1.10)
205 207 - Update CodeMirror to 3.14
206 208 - Twitter Bootstrap (2.3) for layout
207 209 - Font-Awesome (3.1) for icons
208 210 - highlight.js (7.3) for syntax highlighting
209 211 - marked (0.2.8) for markdown rendering
210 212 - require.js (2.1) for loading javascript
211 213
212 214 Some relevant changes that are results of this:
213 215
214 216 - Markdown cells now support GitHub-flavored Markdown (GFM),
215 217 which includes ``\`\`\`python`` code blocks and tables.
216 218 - Notebook UI behaves better on more screen sizes.
217 219 - Various code cell input issues have been fixed.
218 220
219 221
220 222 Kernel
221 223 ------
222 224
223 225 The kernel code has been substantially reorganized.
224 226
225 227 New features in the kernel:
226 228
227 229 - Kernels support ZeroMQ IPC transport, not just TCP
228 230 - The message protocol has added a top-level metadata field,
229 231 used for information about messages.
230 232 - Add a `data_pub` message that functions much like `display_pub`,
231 233 but publishes raw (usually pickled) data, rather than representations.
232 234 - Ensure that ``sys.stdout.encoding`` is defined in Kernels.
233 235 - Stdout from forked subprocesses should be forwarded to frontends (instead of crashing).
234 236
235 237 IPEP 13
236 238 *******
237 239
238 240 The KernelManager has been split into a :class:`~.KernelManager` and a :class:`~.KernelClient`.
239 241 The Manager owns a kernel and starts / signals / restarts it. There is always zero or one
240 242 KernelManager per Kernel. Clients communicate with Kernels via zmq channels,
241 243 and there can be zero-to-many Clients connected to a Kernel at any given time.
242 244
243 245 The KernelManager now automatically restarts the kernel when it dies,
244 246 rather than requiring user input at the notebook or QtConsole UI
245 247 (which may or may not exist at restart time).
246 248
247 249 In-process kernels
248 250 ******************
249 251
250 252 The Python-language frontends, particularly the Qt console, may now communicate
251 253 with in-process kernels, in addition to the traditional out-of-process
252 254 kernels. An in-process kernel permits direct access to the kernel namespace,
253 255 which is necessary in some applications. It should be understood, however, that
254 256 the in-process kernel is not robust to bad user input and will block the main
255 257 (GUI) thread while executing. Developers must decide on a case-by-case basis
256 258 whether this tradeoff is appropriate for their application.
257 259
258 260
259 261
260 262 Parallel
261 263 --------
262 264
263 265 IPython.parallel has had some refactoring as well.
264 266 There are many improvements and fixes, but these are the major changes:
265 267
266 268 - Connections have been simplified. All ports and the serialization in use
267 269 are written to the connection file, rather than the initial two-stage system.
268 270 - Serialization has been rewritten, fixing many bugs and dramatically improving
269 271 performance serializing large containers.
270 272 - Load-balancing scheduler performance with large numbers of tasks has been dramatically improved.
271 273 - There should be fewer (hopefully zero) false-positives for engine failures.
272 274 - Increased compatibility with various use cases that produced serialization / argument errors
273 275 with map, etc.
274 276 - The controller can attempt to resume operation if it has crashed,
275 277 by passing ``ipcontroller --restore``.
276 278 - Engines can monitor the Hub heartbeat, and shutdown if the Hub disappears for too long.
277 279 - add HTCondor support in launchers
278 280
279 281
280 282 QtConsole
281 283 ---------
282 284
283 285 Various fixes, including improved performance with lots of text output,
284 286 and better drag and drop support.
285 287 The initial window size of the qtconsole is now configurable via ``IPythonWidget.width``
286 288 and ``IPythonWidget.height``.
287 289
General Comments 0
You need to be logged in to leave comments. Login now