Show More
@@ -17,8 +17,8 b' 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 | 19 | * :class:`IPython.utils.traitlets.HasTraitlets`. |
|
20 |
* :class:`IPython.co |
|
|
21 |
* :class:`IPython.co |
|
|
20 | * :class:`IPython.config.configurable.Configurable`. | |
|
21 | * :class:`IPython.config.application.Application`. | |
|
22 | 22 | * :class:`IPython.config.loader.ConfigLoader`. |
|
23 | 23 | * :class:`IPython.config.loader.Config` |
|
24 | 24 | |
@@ -27,6 +27,15 b' 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 | The biggest user-visible change is likely the move to using the config system to | |
|
31 | determine the command-line arguments for IPython applications. The benefit of | |
|
32 | this is that *all* configurable values in IPython are exposed on the | |
|
33 | command-line, but the syntax for specifying values has changed. The gist is that | |
|
34 | assigning values is pure Python assignment, so there is always an '=', and never | |
|
35 | a leading '-', nor a space separating key from value. Flags exist, to set | |
|
36 | multiple values or boolean flags, and these are always prefixed with '--', and | |
|
37 | never take arguments. | |
|
38 | ||
|
30 | 39 | ZMQ architecture |
|
31 | 40 | ---------------- |
|
32 | 41 | |
@@ -43,6 +52,25 b' new :mod:`IPython.parallel` module.' | |||
|
43 | 52 | New features |
|
44 | 53 | ------------ |
|
45 | 54 | |
|
55 | * Added ``Bytes`` traitlet, removing ``Str``. All 'string' traitlets should | |
|
56 | either be ``Unicode`` if a real string, or ``Bytes`` if a C-string. This | |
|
57 | removes ambiguity and helps the Python 3 transition. | |
|
58 | ||
|
59 | * New magic ``%loadpy`` loads a python file from disk or web URL into | |
|
60 | the current input buffer. | |
|
61 | ||
|
62 | * New magic ``%pastebin`` for sharing code via the 'Lodge it' pastebin. | |
|
63 | ||
|
64 | * New magic ``%precision`` for controlling float and numpy pretty printing. | |
|
65 | ||
|
66 | * IPython applications initiate logging, so any object can gain access to | |
|
67 | a the logger of the currently running Application with: | |
|
68 | ||
|
69 | .. sourcecode:: python | |
|
70 | ||
|
71 | from IPython.config.application import Application | |
|
72 | logger = Application.instance().log | |
|
73 | ||
|
46 | 74 | * You can now get help on an object halfway through typing a command. For |
|
47 | 75 | instance, typing ``a = zip?`` shows the details of :func:`zip`. It also |
|
48 | 76 | leaves the command at the next prompt so you can carry on with it. |
@@ -59,13 +87,13 b' New features' | |||
|
59 | 87 | * The configuration system and configuration files are brand new. See the |
|
60 | 88 | configuration system :ref:`documentation <config_index>` for more details. |
|
61 | 89 | |
|
62 |
* The :class:`~IPython.core.i |
|
|
63 |
:class:`~IPython.co |
|
|
90 | * The :class:`~IPython.core.interactiveshell.InteractiveShell` class is now a | |
|
91 | :class:`~IPython.config.configurable.Configurable` subclass and has traitlets that | |
|
64 | 92 | determine the defaults and runtime environment. The ``__init__`` method has |
|
65 | 93 | also been refactored so this class can be instantiated and run without the |
|
66 | 94 | old :mod:`ipmaker` module. |
|
67 | 95 | |
|
68 |
* The methods of :class:`~IPython.core.i |
|
|
96 | * The methods of :class:`~IPython.core.interactiveshell.InteractiveShell` have | |
|
69 | 97 | been organized into sections to make it easier to turn more sections |
|
70 | 98 | of functionality into components. |
|
71 | 99 | |
@@ -74,7 +102,7 b' New features' | |||
|
74 | 102 | embedding logic has been taken out of the base class and put into the |
|
75 | 103 | embedded subclass. |
|
76 | 104 | |
|
77 |
* |
|
|
105 | * Added methods of :class:`~IPython.core.interactiveshell.InteractiveShell` to | |
|
78 | 106 | help it cleanup after itself. The :meth:`cleanup` method controls this. We |
|
79 | 107 | couldn't do this in :meth:`__del__` because we have cycles in our object |
|
80 | 108 | graph that prevent it from being called. |
@@ -83,7 +111,7 b' New features' | |||
|
83 | 111 | strings like ``foo.bar.Bar`` to the actual class. |
|
84 | 112 | |
|
85 | 113 | * Completely refactored the :mod:`IPython.core.prefilter` module into |
|
86 |
:class:`~IPython.co |
|
|
114 | :class:`~IPython.config.configurable.Configurable` subclasses. Added a new layer | |
|
87 | 115 | into the prefilter system, called "transformations" that all new prefilter |
|
88 | 116 | logic should use (rather than the older "checker/handler" approach). |
|
89 | 117 | |
@@ -93,19 +121,19 b' New features' | |||
|
93 | 121 | :mod:`~IPython.external.argparse` to parse command line options for |
|
94 | 122 | :command:`ipython`. |
|
95 | 123 | |
|
96 |
* New top level :func:`~IPython.frontend.terminal.embed.embed` function that can |
|
|
97 |
to embed IPython at any place in user's code. One the first call it |
|
|
98 |
create an :class:`~IPython.frontend.terminal.embed.InteractiveShellEmbed` |
|
|
99 | call it. In later calls, it just calls the previously created | |
|
124 | * New top level :func:`~IPython.frontend.terminal.embed.embed` function that can | |
|
125 | be called to embed IPython at any place in user's code. One the first call it | |
|
126 | will create an :class:`~IPython.frontend.terminal.embed.InteractiveShellEmbed` | |
|
127 | instance and call it. In later calls, it just calls the previously created | |
|
100 | 128 | :class:`~IPython.frontend.terminal.embed.InteractiveShellEmbed`. |
|
101 | 129 | |
|
102 |
* Created a co |
|
|
103 |
:mod:`IPython.utils.traitlets`. Co |
|
|
104 | containment tree (not inheritance) that i) automatically propagates | |
|
105 |
configuration information and ii) allows |
|
|
106 |
|
|
|
107 |
subclasses of :class:`~IPython.co |
|
|
108 |
developers should become familiar with the co |
|
|
130 | * Created a configuration system (:mod:`IPython.config.configurable`) that is | |
|
131 | based on :mod:`IPython.utils.traitlets`. Configurables are arranged into a | |
|
132 | runtime containment tree (not inheritance) that i) automatically propagates | |
|
133 | configuration information and ii) allows singletons to discover each other in | |
|
134 | a loosely coupled manner. In the future all parts of IPython will be | |
|
135 | subclasses of :class:`~IPython.config.configurable.Configurable`. All IPython | |
|
136 | developers should become familiar with the config system. | |
|
109 | 137 | |
|
110 | 138 | * Created a new :class:`~IPython.config.loader.Config` for holding |
|
111 | 139 | configuration information. This is a dict like class with a few extras: i) |
@@ -122,11 +150,13 b' New features' | |||
|
122 | 150 | |
|
123 | 151 | * Created a top-level :class:`Application` class in |
|
124 | 152 | :mod:`IPython.core.application` that is designed to encapsulate the starting |
|
125 |
of any |
|
|
126 |
configuration objects, constructs the main application |
|
|
127 | instances and then starts the application running. The default | |
|
128 | :class:`Application` class has built-in logic for handling the IPython | |
|
129 | directory as well as profiles. | |
|
153 | of any basic Python program. An application loads and merges all the | |
|
154 | configuration objects, constructs the main application, configures and | |
|
155 | initiates logging, and creates and configures any :class:`Configurable` | |
|
156 | instances and then starts the application running. An extended | |
|
157 | :class:`BaseIPythonApplication` class adds logic for handling the | |
|
158 | IPython directory as well as profiles, and all IPython entry points | |
|
159 | extend it. | |
|
130 | 160 | |
|
131 | 161 | * The :class:`Type` and :class:`Instance` traitlets now handle classes given |
|
132 | 162 | as strings, like ``foo.bar.Bar``. This is needed for forward declarations. |
@@ -152,10 +182,6 b' New features' | |||
|
152 | 182 | :command:`%gui` magic command. Type ``%gui?`` at an IPython prompt for |
|
153 | 183 | documentation. |
|
154 | 184 | |
|
155 | * The command line options ``-wthread``, ``-qthread`` and | |
|
156 | ``-gthread`` just call the appropriate :mod:`IPython.lib.inputhook` | |
|
157 | functions. | |
|
158 | ||
|
159 | 185 | * For developers :mod:`IPython.lib.inputhook` provides a simple interface |
|
160 | 186 | for managing the event loops in their interactive GUI applications. |
|
161 | 187 | Examples can be found in our :file:`docs/examples/lib` directory. |
@@ -163,30 +189,48 b' New features' | |||
|
163 | 189 | Backwards incompatible changes |
|
164 | 190 | ------------------------------ |
|
165 | 191 | |
|
192 | * The Twisted-based :mod:`IPython.kernel` has been removed, and completely | |
|
193 | rewritten as :mod:`IPython.parallel`, using ZeroMQ. | |
|
194 | ||
|
195 | * Profiles are now directories. Instead of a profile being a single config file, | |
|
196 | profiles are now self-contained directories. By default, profiles get their | |
|
197 | own IPython history, log files, and everything. To create a new profile, do | |
|
198 | ``ipython profile create <name>``. | |
|
199 | ||
|
200 | * All IPython applications have been rewritten to use | |
|
201 | :class:`~IPython.config.loader.KeyValueConfigLoader`. This means that | |
|
202 | command-line options have changed. Now, all configurable values are accessible | |
|
203 | from the command-line with the same syntax as in a configuration file. | |
|
204 | ||
|
205 | * The command line options ``-wthread``, ``-qthread`` and | |
|
206 | ``-gthread`` have been removed. Use ``gui=wx``, ``gui=qt``, ``gui=gtk`` | |
|
207 | instead. | |
|
208 | ||
|
166 | 209 | * The extension loading functions have been renamed to |
|
167 | 210 | :func:`load_ipython_extension` and :func:`unload_ipython_extension`. |
|
168 | 211 | |
|
169 |
* :class:`~IPython.core.i |
|
|
212 | * :class:`~IPython.core.interactiveshell.InteractiveShell` no longer takes an | |
|
170 | 213 | ``embedded`` argument. Instead just use the |
|
171 |
:class:`~IPython.core.i |
|
|
214 | :class:`~IPython.core.interactiveshell.InteractiveShellEmbed` class. | |
|
172 | 215 | |
|
173 | 216 | * ``__IPYTHON__`` is no longer injected into ``__builtin__``. |
|
174 | 217 | |
|
175 | 218 | * :meth:`Struct.__init__` no longer takes `None` as its first argument. It |
|
176 | 219 | must be a :class:`dict` or :class:`Struct`. |
|
177 | 220 | |
|
178 |
* :meth:`~IPython.core.i |
|
|
179 |
:meth:`~IPython.core.i |
|
|
221 | * :meth:`~IPython.core.interactiveshell.InteractiveShell.ipmagic` has been | |
|
222 | renamed :meth:`~IPython.core.interactiveshell.InteractiveShell.magic.` | |
|
180 | 223 | |
|
181 | 224 | * The functions :func:`ipmagic` and :func:`ipalias` have been removed from |
|
182 | 225 | :mod:`__builtins__`. |
|
183 | 226 | |
|
184 | * The references to the global :class:`~IPython.core.iplib.InteractiveShell` | |
|
185 | instance (``_ip``, and ``__IP``) have been removed from the user's | |
|
186 | namespace. They are replaced by a new function called :func:`get_ipython` | |
|
187 | that returns the current :class:`~IPython.core.iplib.InteractiveShell` | |
|
188 | instance. This function is injected into the user's namespace and is now the | |
|
189 | main way of accessing IPython's API. | |
|
227 | * The references to the global | |
|
228 | :class:`~IPython.core.interactivehell.InteractiveShell` instance (``_ip``, and | |
|
229 | ``__IP``) have been removed from the user's namespace. They are replaced by a | |
|
230 | new function called :func:`get_ipython` that returns the current | |
|
231 | :class:`~IPython.core.interactiveshell.InteractiveShell` instance. This | |
|
232 | function is injected into the user's namespace and is now the main way of | |
|
233 | accessing the running IPython. | |
|
190 | 234 | |
|
191 | 235 | * Old style configuration files :file:`ipythonrc` and :file:`ipy_user_conf.py` |
|
192 | 236 | are no longer supported. Users should migrate there configuration files to |
@@ -197,7 +241,7 b' Backwards incompatible changes' | |||
|
197 | 241 | completely removed. The new extension API is described :ref:`here |
|
198 | 242 | <configuring_ipython>`. |
|
199 | 243 | |
|
200 |
* Support for ``qt3`` has been dropped. User |
|
|
244 | * Support for ``qt3`` has been dropped. Users who need this should use | |
|
201 | 245 | previous versions of IPython. |
|
202 | 246 | |
|
203 | 247 | * Removed :mod:`shellglobals` as it was obsolete. |
@@ -206,10 +250,6 b' Backwards incompatible changes' | |||
|
206 | 250 | longer needed because of the new capabilities in |
|
207 | 251 | :mod:`IPython.lib.inputhook`. |
|
208 | 252 | |
|
209 | * The ``-pylab`` command line flag has been disabled until matplotlib adds | |
|
210 | support for the new :mod:`IPython.lib.inputhook` approach. The new stuff | |
|
211 | does work with matplotlib, but you have to set everything up by hand. | |
|
212 | ||
|
213 | 253 | * New top-level sub-packages have been created: :mod:`IPython.core`, |
|
214 | 254 | :mod:`IPython.lib`, :mod:`IPython.utils`, :mod:`IPython.deathrow`, |
|
215 | 255 | :mod:`IPython.quarantine`. All existing top-level modules have been |
@@ -218,9 +258,9 b' Backwards incompatible changes' | |||
|
218 | 258 | and friends) have been updated. See :ref:`this section <module_reorg>` of the |
|
219 | 259 | documentation for descriptions of these new sub-packages. |
|
220 | 260 | |
|
221 | * Compatability modules have been created for :mod:`IPython.Shell`, | |
|
222 |
:mod:`IPython. |
|
|
223 | and then load the actual implementation from :mod:`IPython.core`. | |
|
261 | * :mod:`IPython.ipapi` has been moved to :mod:`IPython.core.ipapi`. | |
|
262 | :mod:`IPython.Shell` and :mod:`IPython.iplib` have been split and removed as | |
|
263 | part of the refactor. | |
|
224 | 264 | |
|
225 | 265 | * :mod:`Extensions` has been moved to :mod:`extensions` and all existing |
|
226 | 266 | extensions have been moved to either :mod:`IPython.quarantine` or |
@@ -230,10 +270,8 b' Backwards incompatible changes' | |||
|
230 | 270 | party libraries. More details about this can be found :ref:`here |
|
231 | 271 | <module_reorg>`. |
|
232 | 272 | |
|
233 |
* |
|
|
234 | broken because of the refactoring in the core. With proper updates, these | |
|
235 | should still work. We probably want to get these so they are not using | |
|
236 | :mod:`IPython.kernel.core` (which is being phased out). | |
|
237 | ||
|
273 | * Previous IPython GUIs in :mod:`IPython.frontend` and :mod:`IPython.gui` are | |
|
274 | likely broken, and have been removed to :mod:`IPython.deathrow` because of the | |
|
275 | refactoring in the core. With proper updates, these should still work. | |
|
238 | 276 | |
|
239 | 277 |
General Comments 0
You need to be logged in to leave comments.
Login now