##// END OF EJS Templates
add known regressesion to whatsnew
MinRK -
Show More
@@ -1,277 +1,290 b''
1 1 ================================================
2 2 Development version
3 3 ================================================
4 4
5 5 The changes listed here are a brief summary of the substantial work on IPython
6 6 since the 0.10.x release series. For more details, please consult the actual
7 7 source.
8 8
9 9 Main `ipython` branch
10 10 =====================
11 11
12 12 Refactoring
13 13 -----------
14 14
15 15 As of the 0.11 version of IPython, a signifiant portion of the core has been
16 16 refactored. This refactoring is founded on a number of new abstractions.
17 17 The main new classes that implement these abstractions are:
18 18
19 * :class:`IPython.utils.traitlets.HasTraitlets`.
19 * :class:`IPython.utils.traitlets.HasTraits`.
20 20 * :class:`IPython.config.configurable.Configurable`.
21 21 * :class:`IPython.config.application.Application`.
22 22 * :class:`IPython.config.loader.ConfigLoader`.
23 23 * :class:`IPython.config.loader.Config`
24 24
25 25 We are still in the process of writing developer focused documentation about
26 26 these classes, but for now our :ref:`configuration documentation
27 27 <config_overview>` contains a high level overview of the concepts that these
28 28 classes express.
29 29
30 30 The biggest user-visible change is likely the move to using the config system to
31 31 determine the command-line arguments for IPython applications. The benefit of
32 32 this is that *all* configurable values in IPython are exposed on the
33 33 command-line, but the syntax for specifying values has changed. The gist is that
34 34 assigning values is pure Python assignment, so there is always an '=', and never
35 35 a leading '-', nor a space separating key from value. Flags exist, to set
36 36 multiple values or boolean flags, and these are always prefixed with '--', and
37 37 never take arguments.
38 38
39 39 ZMQ architecture
40 40 ----------------
41 41
42 42 There is a new GUI framework for IPython, based on a client-server model in
43 43 which multiple clients can communicate with one IPython kernel, using the
44 44 ZeroMQ messaging framework. There is already a Qt console client, which can
45 45 be started by calling ``ipython qtconsole``. The protocol is :ref:`documented
46 46 <messaging>`.
47 47
48 48 The parallel computing framework has also been rewritten using ZMQ. The
49 49 protocol is described :ref:`here <parallel_messages>`, and the code is in the
50 50 new :mod:`IPython.parallel` module.
51 51
52 52 New features
53 53 ------------
54 54
55 55 * Added ``Bytes`` traitlet, removing ``Str``. All 'string' traitlets should
56 56 either be ``Unicode`` if a real string, or ``Bytes`` if a C-string. This
57 57 removes ambiguity and helps the Python 3 transition.
58 58
59 59 * New magic ``%loadpy`` loads a python file from disk or web URL into
60 60 the current input buffer.
61 61
62 62 * New magic ``%pastebin`` for sharing code via the 'Lodge it' pastebin.
63 63
64 64 * New magic ``%precision`` for controlling float and numpy pretty printing.
65 65
66 66 * IPython applications initiate logging, so any object can gain access to
67 67 a the logger of the currently running Application with:
68 68
69 69 .. sourcecode:: python
70 70
71 71 from IPython.config.application import Application
72 72 logger = Application.instance().log
73 73
74 74 * You can now get help on an object halfway through typing a command. For
75 75 instance, typing ``a = zip?`` shows the details of :func:`zip`. It also
76 76 leaves the command at the next prompt so you can carry on with it.
77 77
78 78 * The input history is now written to an SQLite database. The API for
79 79 retrieving items from the history has also been redesigned.
80 80
81 81 * The :mod:`IPython.extensions.pretty` extension has been moved out of
82 82 quarantine and fully updated to the new extension API.
83 83
84 84 * New magics for loading/unloading/reloading extensions have been added:
85 85 ``%load_ext``, ``%unload_ext`` and ``%reload_ext``.
86 86
87 87 * The configuration system and configuration files are brand new. See the
88 88 configuration system :ref:`documentation <config_index>` for more details.
89 89
90 90 * The :class:`~IPython.core.interactiveshell.InteractiveShell` class is now a
91 91 :class:`~IPython.config.configurable.Configurable` subclass and has traitlets that
92 92 determine the defaults and runtime environment. The ``__init__`` method has
93 93 also been refactored so this class can be instantiated and run without the
94 94 old :mod:`ipmaker` module.
95 95
96 96 * The methods of :class:`~IPython.core.interactiveshell.InteractiveShell` have
97 97 been organized into sections to make it easier to turn more sections
98 98 of functionality into components.
99 99
100 100 * The embedded shell has been refactored into a truly standalone subclass of
101 101 :class:`InteractiveShell` called :class:`InteractiveShellEmbed`. All
102 102 embedding logic has been taken out of the base class and put into the
103 103 embedded subclass.
104 104
105 105 * Added methods of :class:`~IPython.core.interactiveshell.InteractiveShell` to
106 106 help it cleanup after itself. The :meth:`cleanup` method controls this. We
107 107 couldn't do this in :meth:`__del__` because we have cycles in our object
108 108 graph that prevent it from being called.
109 109
110 110 * Created a new module :mod:`IPython.utils.importstring` for resolving
111 111 strings like ``foo.bar.Bar`` to the actual class.
112 112
113 113 * Completely refactored the :mod:`IPython.core.prefilter` module into
114 114 :class:`~IPython.config.configurable.Configurable` subclasses. Added a new layer
115 115 into the prefilter system, called "transformations" that all new prefilter
116 116 logic should use (rather than the older "checker/handler" approach).
117 117
118 118 * Aliases are now components (:mod:`IPython.core.alias`).
119 119
120 120 * We are now using an internally shipped version of
121 121 :mod:`~IPython.external.argparse` to parse command line options for
122 122 :command:`ipython`.
123 123
124 124 * New top level :func:`~IPython.frontend.terminal.embed.embed` function that can
125 125 be called to embed IPython at any place in user's code. One the first call it
126 126 will create an :class:`~IPython.frontend.terminal.embed.InteractiveShellEmbed`
127 127 instance and call it. In later calls, it just calls the previously created
128 128 :class:`~IPython.frontend.terminal.embed.InteractiveShellEmbed`.
129 129
130 130 * Created a configuration system (:mod:`IPython.config.configurable`) that is
131 131 based on :mod:`IPython.utils.traitlets`. Configurables are arranged into a
132 132 runtime containment tree (not inheritance) that i) automatically propagates
133 133 configuration information and ii) allows singletons to discover each other in
134 134 a loosely coupled manner. In the future all parts of IPython will be
135 135 subclasses of :class:`~IPython.config.configurable.Configurable`. All IPython
136 136 developers should become familiar with the config system.
137 137
138 138 * Created a new :class:`~IPython.config.loader.Config` for holding
139 139 configuration information. This is a dict like class with a few extras: i)
140 140 it supports attribute style access, ii) it has a merge function that merges
141 141 two :class:`~IPython.config.loader.Config` instances recursively and iii) it
142 142 will automatically create sub-:class:`~IPython.config.loader.Config`
143 143 instances for attributes that start with an uppercase character.
144 144
145 145 * Created new configuration loaders in :mod:`IPython.config.loader`. These
146 146 loaders provide a unified loading interface for all configuration
147 147 information including command line arguments and configuration files. We
148 148 have two default implementations based on :mod:`argparse` and plain python
149 149 files. These are used to implement the new configuration system.
150 150
151 151 * Created a top-level :class:`Application` class in
152 152 :mod:`IPython.core.application` that is designed to encapsulate the starting
153 153 of any basic Python program. An application loads and merges all the
154 154 configuration objects, constructs the main application, configures and
155 155 initiates logging, and creates and configures any :class:`Configurable`
156 156 instances and then starts the application running. An extended
157 157 :class:`BaseIPythonApplication` class adds logic for handling the
158 158 IPython directory as well as profiles, and all IPython entry points
159 159 extend it.
160 160
161 161 * The :class:`Type` and :class:`Instance` traitlets now handle classes given
162 162 as strings, like ``foo.bar.Bar``. This is needed for forward declarations.
163 163 But, this was implemented in a careful way so that string to class
164 164 resolution is done at a single point, when the parent
165 165 :class:`~IPython.utils.traitlets.HasTraitlets` is instantiated.
166 166
167 167 * :mod:`IPython.utils.ipstruct` has been refactored to be a subclass of
168 168 dict. It also now has full docstrings and doctests.
169 169 * Created a Trait's like implementation in :mod:`IPython.utils.traitlets`.
170 170 This is a pure Python, lightweight version of a library that is similar to
171 171 :mod:`enthought.traits`. We are using this for validation, defaults and
172 172 notification in our new component system. Although it is not API compatible
173 173 with :mod:`enthought.traits`, we plan on moving in this direction so that
174 174 eventually our implementation could be replaced by a (yet to exist) pure
175 175 Python version of :mod:`enthought.traits`.
176 176
177 177 * Added a new module :mod:`IPython.lib.inputhook` to manage the integration
178 178 with GUI event loops using `PyOS_InputHook`. See the docstrings in this
179 179 module or the main IPython docs for details.
180 180
181 181 * For users, GUI event loop integration is now handled through the new
182 182 :command:`%gui` magic command. Type ``%gui?`` at an IPython prompt for
183 183 documentation.
184 184
185 185 * For developers :mod:`IPython.lib.inputhook` provides a simple interface
186 186 for managing the event loops in their interactive GUI applications.
187 187 Examples can be found in our :file:`docs/examples/lib` directory.
188 188
189 189 Backwards incompatible changes
190 190 ------------------------------
191 191
192 192 * The Twisted-based :mod:`IPython.kernel` has been removed, and completely
193 193 rewritten as :mod:`IPython.parallel`, using ZeroMQ.
194 194
195 195 * Profiles are now directories. Instead of a profile being a single config file,
196 196 profiles are now self-contained directories. By default, profiles get their
197 197 own IPython history, log files, and everything. To create a new profile, do
198 198 ``ipython profile create <name>``.
199 199
200 200 * All IPython applications have been rewritten to use
201 201 :class:`~IPython.config.loader.KeyValueConfigLoader`. This means that
202 202 command-line options have changed. Now, all configurable values are accessible
203 203 from the command-line with the same syntax as in a configuration file.
204 204
205 205 * The command line options ``-wthread``, ``-qthread`` and
206 206 ``-gthread`` have been removed. Use ``gui=wx``, ``gui=qt``, ``gui=gtk``
207 207 instead.
208 208
209 209 * The extension loading functions have been renamed to
210 210 :func:`load_ipython_extension` and :func:`unload_ipython_extension`.
211 211
212 212 * :class:`~IPython.core.interactiveshell.InteractiveShell` no longer takes an
213 213 ``embedded`` argument. Instead just use the
214 214 :class:`~IPython.core.interactiveshell.InteractiveShellEmbed` class.
215 215
216 216 * ``__IPYTHON__`` is no longer injected into ``__builtin__``.
217 217
218 218 * :meth:`Struct.__init__` no longer takes `None` as its first argument. It
219 219 must be a :class:`dict` or :class:`Struct`.
220 220
221 221 * :meth:`~IPython.core.interactiveshell.InteractiveShell.ipmagic` has been
222 222 renamed :meth:`~IPython.core.interactiveshell.InteractiveShell.magic.`
223 223
224 224 * The functions :func:`ipmagic` and :func:`ipalias` have been removed from
225 225 :mod:`__builtins__`.
226 226
227 227 * The references to the global
228 228 :class:`~IPython.core.interactivehell.InteractiveShell` instance (``_ip``, and
229 229 ``__IP``) have been removed from the user's namespace. They are replaced by a
230 230 new function called :func:`get_ipython` that returns the current
231 231 :class:`~IPython.core.interactiveshell.InteractiveShell` instance. This
232 232 function is injected into the user's namespace and is now the main way of
233 233 accessing the running IPython.
234 234
235 235 * Old style configuration files :file:`ipythonrc` and :file:`ipy_user_conf.py`
236 236 are no longer supported. Users should migrate there configuration files to
237 237 the new format described :ref:`here <config_overview>` and :ref:`here
238 238 <configuring_ipython>`.
239 239
240 240 * The old IPython extension API that relied on :func:`ipapi` has been
241 241 completely removed. The new extension API is described :ref:`here
242 242 <configuring_ipython>`.
243 243
244 244 * Support for ``qt3`` has been dropped. Users who need this should use
245 245 previous versions of IPython.
246 246
247 247 * Removed :mod:`shellglobals` as it was obsolete.
248 248
249 249 * Removed all the threaded shells in :mod:`IPython.core.shell`. These are no
250 250 longer needed because of the new capabilities in
251 251 :mod:`IPython.lib.inputhook`.
252 252
253 253 * New top-level sub-packages have been created: :mod:`IPython.core`,
254 254 :mod:`IPython.lib`, :mod:`IPython.utils`, :mod:`IPython.deathrow`,
255 255 :mod:`IPython.quarantine`. All existing top-level modules have been
256 256 moved to appropriate sub-packages. All internal import statements
257 257 have been updated and tests have been added. The build system (setup.py
258 258 and friends) have been updated. See :ref:`this section <module_reorg>` of the
259 259 documentation for descriptions of these new sub-packages.
260 260
261 261 * :mod:`IPython.ipapi` has been moved to :mod:`IPython.core.ipapi`.
262 262 :mod:`IPython.Shell` and :mod:`IPython.iplib` have been split and removed as
263 263 part of the refactor.
264 264
265 265 * :mod:`Extensions` has been moved to :mod:`extensions` and all existing
266 266 extensions have been moved to either :mod:`IPython.quarantine` or
267 267 :mod:`IPython.deathrow`. :mod:`IPython.quarantine` contains modules that we
268 268 plan on keeping but that need to be updated. :mod:`IPython.deathrow`
269 269 contains modules that are either dead or that should be maintained as third
270 270 party libraries. More details about this can be found :ref:`here
271 271 <module_reorg>`.
272 272
273 273 * Previous IPython GUIs in :mod:`IPython.frontend` and :mod:`IPython.gui` are
274 274 likely broken, and have been removed to :mod:`IPython.deathrow` because of the
275 275 refactoring in the core. With proper updates, these should still work.
276 276
277 277
278 Known Regressions
279 -----------------
280
281 We do our best to improve IPython, but there are some known regressions in 0.11 relative
282 to 0.10.2.
283
284 * The machinery that adds functionality to the 'sh' profile for using IPython as your
285 system shell has not been updated to use the new APIs. As a result, only the aesthetic
286 (prompt) changes are still implemented. We intend to fix this by 0.12.
287
288 * The installation of scripts on Windows was broken without setuptools, so we now
289 depend on setuptools on Windows. We hope to fix setuptools-less installation,
290 and then remove the setuptools dependency.
General Comments 0
You need to be logged in to leave comments. Login now