Show More
@@ -1,212 +1,231 b'' | |||
|
1 | 1 | ================================================ |
|
2 | 2 | Development version |
|
3 | 3 | ================================================ |
|
4 | 4 | |
|
5 | 5 | Main `ipython` branch |
|
6 | 6 | ===================== |
|
7 | 7 | |
|
8 | 8 | As of the 0.11 version of IPython, a signifiant portion of the core has been |
|
9 | 9 | refactored. This refactoring is founded on a number of new abstractions. |
|
10 | 10 | The main new classes that implement these abstractions are: |
|
11 | 11 | |
|
12 | 12 | * :class:`IPython.utils.traitlets.HasTraitlets`. |
|
13 | 13 | * :class:`IPython.core.component.Component`. |
|
14 | 14 | * :class:`IPython.core.application.Application`. |
|
15 | 15 | * :class:`IPython.config.loader.ConfigLoader`. |
|
16 | 16 | * :class:`IPython.config.loader.Config` |
|
17 | 17 | |
|
18 | 18 | We are still in the process of writing developer focused documentation about |
|
19 | 19 | these classes, but for now our :ref:`configuration documentation |
|
20 | 20 | <config_overview>` contains a high level overview of the concepts that these |
|
21 | 21 | classes express. |
|
22 | 22 | |
|
23 | 23 | The changes listed here are a brief summary of the recent work on IPython. |
|
24 | 24 | For more details, please consult the actual source. |
|
25 | 25 | |
|
26 | 26 | New features |
|
27 | 27 | ------------ |
|
28 | 28 | |
|
29 | * The :mod:`IPython.extensions.pretty` extension has been moved out of | |
|
30 | quarantine and fully updated to the new extension API. | |
|
31 | ||
|
32 | * New magics for loading/unloading/reloading extensions have been added: | |
|
33 | ``%load_ext``, ``%unload_ext`` and ``%reload_ext``. | |
|
34 | ||
|
29 | 35 | * The configuration system and configuration files are brand new. See the |
|
30 | 36 | configuration system :ref:`documentation <config_index>` for more details. |
|
31 | 37 | |
|
32 | 38 | * The :class:`~IPython.core.iplib.InteractiveShell` class is now a |
|
33 | 39 | :class:`~IPython.core.component.Component` subclass and has traitlets that |
|
34 | 40 | determine the defaults and runtime environment. The ``__init__`` method has |
|
35 | 41 | also been refactored so this class can be instantiated and run without the |
|
36 | 42 | old :mod:`ipmaker` module. |
|
37 | 43 | |
|
38 | 44 | * The methods of :class:`~IPython.core.iplib.InteractiveShell` have |
|
39 | 45 | been organized into sections to make it easier to turn more sections |
|
40 | 46 | of functionality into componenets. |
|
41 | 47 | |
|
42 | 48 | * The embedded shell has been refactored into a truly standalone subclass of |
|
43 | 49 | :class:`InteractiveShell` called :class:`InteractiveShellEmbed`. All |
|
44 | 50 | embedding logic has been taken out of the base class and put into the |
|
45 | 51 | embedded subclass. |
|
46 | 52 | |
|
47 | 53 | * I have created methods of :class:`~IPython.core.iplib.InteractiveShell` to |
|
48 | 54 | help it cleanup after itself. The :meth:`cleanup` method controls this. We |
|
49 | 55 | couldn't do this in :meth:`__del__` because we have cycles in our object |
|
50 | 56 | graph that prevent it from being called. |
|
51 | 57 | |
|
52 | 58 | * Created a new module :mod:`IPython.utils.importstring` for resolving |
|
53 | 59 | strings like ``foo.bar.Bar`` to the actual class. |
|
54 | 60 | |
|
55 | 61 | * Completely refactored the :mod:`IPython.core.prefilter` module into |
|
56 | 62 | :class:`~IPython.core.component.Component` subclasses. Added a new layer |
|
57 | 63 | into the prefilter system, called "transformations" that all new prefilter |
|
58 | 64 | logic should use (rather than the older "checker/handler" approach). |
|
59 | 65 | |
|
60 | 66 | * Aliases are now components (:mod:`IPython.core.alias`). |
|
61 | 67 | |
|
62 | 68 | * We are now using an internally shipped version of |
|
63 | 69 | :mod:`~IPython.external.argparse` to parse command line options for |
|
64 | 70 | :command:`ipython`. |
|
65 | 71 | |
|
66 | 72 | * New top level :func:`~IPython.core.embed.embed` function that can be called |
|
67 | 73 | to embed IPython at any place in user's code. One the first call it will |
|
68 | 74 | create an :class:`~IPython.core.embed.InteractiveShellEmbed` instance and |
|
69 | 75 | call it. In later calls, it just calls the previously created |
|
70 | 76 | :class:`~IPython.core.embed.InteractiveShellEmbed`. |
|
71 | 77 | |
|
72 | 78 | * Created a component system (:mod:`IPython.core.component`) that is based on |
|
73 | 79 | :mod:`IPython.utils.traitlets`. Components are arranged into a runtime |
|
74 | 80 | containment tree (not inheritance) that i) automatically propagates |
|
75 | 81 | configuration information and ii) allows components to discover each other |
|
76 | 82 | in a loosely coupled manner. In the future all parts of IPython will be |
|
77 | 83 | subclasses of :class:`~IPython.core.component.Component`. All IPython |
|
78 | 84 | developers should become familiar with the component system. |
|
79 | 85 | |
|
80 | 86 | * Created a new :class:`~IPython.config.loader.Config` for holding |
|
81 | 87 | configuration information. This is a dict like class with a few extras: i) |
|
82 | 88 | it supports attribute style access, ii) it has a merge function that merges |
|
83 | 89 | two :class:`~IPython.config.loader.Config` instances recursively and iii) it |
|
84 | 90 | will automatically create sub-:class:`~IPython.config.loader.Config` |
|
85 | 91 | instances for attributes that start with an uppercase character. |
|
86 | 92 | |
|
87 | 93 | * Created new configuration loaders in :mod:`IPython.config.loader`. These |
|
88 | 94 | loaders provide a unified loading interface for all configuration |
|
89 | 95 | information including command line arguments and configuration files. We |
|
90 | 96 | have two default implementations based on :mod:`argparse` and plain python |
|
91 | 97 | files. These are used to implement the new configuration system. |
|
92 | 98 | |
|
93 | 99 | * Created a top-level :class:`Application` class in |
|
94 | 100 | :mod:`IPython.core.application` that is designed to encapsulate the starting |
|
95 | 101 | of any IPython process. An application loads and merges all the |
|
96 | 102 | configuration objects, constructs the main application :class:`Component` |
|
97 | 103 | instances and then starts the application running. The default |
|
98 | 104 | :class:`Application` class has built-in logic for handling the IPython |
|
99 | 105 | directory as well as profiles. |
|
100 | 106 | |
|
101 | 107 | * The :class:`Type` and :class:`Instance` traitlets now handle classes given |
|
102 | 108 | as strings, like ``foo.bar.Bar``. This is needed for forward declarations. |
|
103 | 109 | But, this was implemented in a careful way so that string to class |
|
104 | 110 | resolution is done at a single point, when the parent |
|
105 | 111 | :class:`~IPython.utils.traitlets.HasTraitlets` is instantiated. |
|
106 | 112 | |
|
107 | 113 | * :mod:`IPython.utils.ipstruct` has been refactored to be a subclass of |
|
108 | 114 | dict. It also now has full docstrings and doctests. |
|
109 | 115 | * Created a Trait's like implementation in :mod:`IPython.utils.traitlets`. |
|
110 | 116 | This is a pure Python, lightweight version of a library that is similar to |
|
111 | 117 | :mod:`enthought.traits`. We are using this for validation, defaults and |
|
112 | 118 | notification in our new component system. Although it is not API compatible |
|
113 | 119 | with :mod:`enthought.traits`, we plan on moving in this direction so that |
|
114 | 120 | eventually our implementation could be replaced by a (yet to exist) pure |
|
115 | 121 | Python version of :mod:`enthought.traits`. |
|
116 | 122 | |
|
117 | 123 | * Added a new module :mod:`IPython.lib.inputhook` to manage the integration |
|
118 | 124 | with GUI event loops using `PyOS_InputHook`. See the docstrings in this |
|
119 | 125 | module or the main IPython docs for details. |
|
120 | 126 | |
|
121 | 127 | * For users, GUI event loop integration is now handled through the new |
|
122 | 128 | :command:`%gui` magic command. Type ``%gui?`` at an IPython prompt for |
|
123 | 129 | documentation. |
|
124 | 130 | |
|
125 | 131 | * The command line options ``-wthread``, ``-qthread`` and |
|
126 | 132 | ``-gthread`` just call the appropriate :mod:`IPython.lib.inputhook` |
|
127 | 133 | functions. |
|
128 | 134 | |
|
129 | 135 | * For developers :mod:`IPython.lib.inputhook` provides a simple interface |
|
130 | 136 | for managing the event loops in their interactive GUI applications. |
|
131 | 137 | Examples can be found in our :file:`docs/examples/lib` directory. |
|
132 | 138 | |
|
133 | 139 | Bug fixes |
|
134 | 140 | --------- |
|
135 | 141 | |
|
142 | * Previously, the latex Sphinx docs were in a single chapter. This has been | |
|
143 | fixed by adding a sixth argument of True to the ``latex_documents`` | |
|
144 | attribute of :file:`conf.py`. | |
|
145 | ||
|
146 | * The ``psum`` example in the MPI documentation has been updated to mpi4py | |
|
147 | version 1.1.0. Thanks to J. Thomas for this fix. | |
|
148 | ||
|
149 | * The top-level, zero-install :file:`ipython.py` script has been updated to | |
|
150 | the new application launching API. | |
|
151 | ||
|
136 | 152 | * Keyboard interrupts now work with GUI support enabled across all platforms |
|
137 | 153 | and all GUI toolkits reliably. |
|
138 | 154 | |
|
139 | 155 | Backwards incompatible changes |
|
140 | 156 | ------------------------------ |
|
141 | 157 | |
|
158 | * The extension loading functions have been renamed to | |
|
159 | :func:`load_ipython_extension` and :func:`unload_ipython_extension`. | |
|
160 | ||
|
142 | 161 | * :class:`~IPython.core.iplib.InteractiveShell` no longer takes an |
|
143 | 162 | ``embedded`` argument. Instead just use the |
|
144 | 163 | :class:`~IPython.core.iplib.InteractiveShellEmbed` class. |
|
145 | 164 | |
|
146 | 165 | * ``__IPYTHON__`` is no longer injected into ``__builtin__``. |
|
147 | 166 | |
|
148 | 167 | * :meth:`Struct.__init__` no longer takes `None` as its first argument. It |
|
149 | 168 | must be a :class:`dict` or :class:`Struct`. |
|
150 | 169 | |
|
151 | 170 | * :meth:`~IPython.core.iplib.InteractiveShell.ipmagic` has been renamed |
|
152 | 171 | :meth:`~IPython.core.iplib.InteractiveShell.magic.` |
|
153 | 172 | |
|
154 | 173 | * The functions :func:`ipmagic` and :func:`ipalias` have been removed from |
|
155 | 174 | :mod:`__builtins__`. |
|
156 | 175 | |
|
157 | 176 | * The references to the global :class:`~IPython.core.iplib.InteractiveShell` |
|
158 | 177 | instance (``_ip``, and ``__IP``) have been removed from the user's |
|
159 | 178 | namespace. They are replaced by a new function called :func:`get_ipython` |
|
160 | 179 | that returns the current :class:`~IPython.core.iplib.InteractiveShell` |
|
161 | 180 | instance. This function is injected into the user's namespace and is now the |
|
162 | 181 | main way of accessing IPython's API. |
|
163 | 182 | |
|
164 | 183 | * Old style configuration files :file:`ipythonrc` and :file:`ipy_user_conf.py` |
|
165 | 184 | are no longer supported. Users should migrate there configuration files to |
|
166 | 185 | the new format described :ref:`here <config_overview>` and :ref:`here |
|
167 | 186 | <configuring_ipython>`. |
|
168 | 187 | |
|
169 | 188 | * The old IPython extension API that relied on :func:`ipapi` has been |
|
170 | 189 | completely removed. The new extension API is described :ref:`here |
|
171 | 190 | <configuring_ipython>`. |
|
172 | 191 | |
|
173 | 192 | * Support for ``qt3`` has been dropped. User's who need this should use |
|
174 | 193 | previous versions of IPython. |
|
175 | 194 | |
|
176 | 195 | * Removed :mod:`shellglobals` as it was obsolete. |
|
177 | 196 | |
|
178 | 197 | * Removed all the threaded shells in :mod:`IPython.core.shell`. These are no |
|
179 | 198 | longer needed because of the new capabilities in |
|
180 | 199 | :mod:`IPython.lib.inputhook`. |
|
181 | 200 | |
|
182 | 201 | * The ``-pylab`` command line flag has been disabled until matplotlib adds |
|
183 | 202 | support for the new :mod:`IPython.lib.inputhook` approach. The new stuff |
|
184 | 203 | does work with matplotlib, but you have to set everything up by hand. |
|
185 | 204 | |
|
186 | 205 | * New top-level sub-packages have been created: :mod:`IPython.core`, |
|
187 | 206 | :mod:`IPython.lib`, :mod:`IPython.utils`, :mod:`IPython.deathrow`, |
|
188 | 207 | :mod:`IPython.quarantine`. All existing top-level modules have been |
|
189 | 208 | moved to appropriate sub-packages. All internal import statements |
|
190 | 209 | have been updated and tests have been added. The build system (setup.py |
|
191 | 210 | and friends) have been updated. See :ref:`this section <module_reorg>` of the |
|
192 | 211 | documentation for descriptions of these new sub-packages. |
|
193 | 212 | |
|
194 | 213 | * Compatability modules have been created for :mod:`IPython.Shell`, |
|
195 | 214 | :mod:`IPython.ipapi` and :mod:`IPython.iplib` that display warnings |
|
196 | 215 | and then load the actual implementation from :mod:`IPython.core`. |
|
197 | 216 | |
|
198 | 217 | * :mod:`Extensions` has been moved to :mod:`extensions` and all existing |
|
199 | 218 | extensions have been moved to either :mod:`IPython.quarantine` or |
|
200 | 219 | :mod:`IPython.deathrow`. :mod:`IPython.quarantine` contains modules that we |
|
201 | 220 | plan on keeping but that need to be updated. :mod:`IPython.deathrow` |
|
202 | 221 | contains modules that are either dead or that should be maintained as third |
|
203 | 222 | party libraries. More details about this can be found :ref:`here |
|
204 | 223 | <module_reorg>`. |
|
205 | 224 | |
|
206 | 225 | * The IPython GUIs in :mod:`IPython.frontend` and :mod:`IPython.gui` are likely |
|
207 | 226 | broken because of the refactoring in the core. With proper updates, these |
|
208 | 227 | should still work. We probably want to get these so they are not using |
|
209 | 228 | :mod:`IPython.kernel.core` (which is being phased out). |
|
210 | 229 | |
|
211 | 230 | |
|
212 | 231 |
General Comments 0
You need to be logged in to leave comments.
Login now