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