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