##// END OF EJS Templates
Added compatibility layer for Shell/ipapi/iplib....
Brian Granger -
Show More
@@ -0,0 +1,29 b''
1 #!/usr/bin/env python
2 # encoding: utf-8
3 """
4 A backwards compatibility layer for IPython.Shell.
5
6 Previously, IPython had an IPython.Shell module. IPython.Shell has been moved
7 to IPython.core.shell and is being refactored. This new module is provided
8 for backwards compatability. We strongly encourage everyone to start using
9 the new code in IPython.core.shell.
10 """
11
12 #-----------------------------------------------------------------------------
13 # Copyright (C) 2008-2009 The IPython Development Team
14 #
15 # Distributed under the terms of the BSD License. The full license is in
16 # the file COPYING, distributed as part of this software.
17 #-----------------------------------------------------------------------------
18
19 from warnings import warn
20
21 msg = """
22 This module (IPython.Shell) has been moved to a new location
23 (IPython.core.shell) and is being refactored. Please update your code
24 to use the new IPython.core.shell module"""
25
26 warn(msg, category=DeprecationWarning, stacklevel=1)
27
28 from IPython.core.shell import *
29
@@ -0,0 +1,29 b''
1 #!/usr/bin/env python
2 # encoding: utf-8
3 """
4 A backwards compatibility layer for IPython.ipapi.
5
6 Previously, IPython had an IPython.ipapi module. IPython.ipapi has been moved
7 to IPython.core.ipapi and is being refactored. This new module is provided
8 for backwards compatability. We strongly encourage everyone to start using
9 the new code in IPython.core.ipapi.
10 """
11
12 #-----------------------------------------------------------------------------
13 # Copyright (C) 2008-2009 The IPython Development Team
14 #
15 # Distributed under the terms of the BSD License. The full license is in
16 # the file COPYING, distributed as part of this software.
17 #-----------------------------------------------------------------------------
18
19 from warnings import warn
20
21 msg = """
22 This module (IPython.ipapi) has been moved to a new location
23 (IPython.core.ipapi) and is being refactored. Please update your code
24 to use the new IPython.core.ipapi module"""
25
26 warn(msg, category=DeprecationWarning, stacklevel=1)
27
28 from IPython.core.ipapi import *
29
@@ -0,0 +1,28 b''
1 #!/usr/bin/env python
2 # encoding: utf-8
3 """
4 A backwards compatibility layer for IPython.iplib.
5
6 Previously, IPython had an IPython.iplib module. IPython.iplib has been moved
7 to IPython.core.iplib and is being refactored. This new module is provided
8 for backwards compatability. We strongly encourage everyone to start using
9 the new code in IPython.core.iplib.
10 """
11
12 #-----------------------------------------------------------------------------
13 # Copyright (C) 2008-2009 The IPython Development Team
14 #
15 # Distributed under the terms of the BSD License. The full license is in
16 # the file COPYING, distributed as part of this software.
17 #-----------------------------------------------------------------------------
18
19 from warnings import warn
20
21 msg = """
22 This module (IPython.iplib) has been moved to a new location
23 (IPython.core.iplib) and is being refactored. Please update your code
24 to use the new IPython.core.iplib module"""
25
26 warn(msg, category=DeprecationWarning, stacklevel=1)
27
28 from IPython.core.iplib import *
@@ -1,11 +1,11 b''
1 =============================
1 =============================
2 IPython module reorganization
2 IPython module reorganization
3 =============================
3 ============================='
4
4
5 Currently, IPython has many top-level modules that serve many different purposes.
5 Currently, IPython has many top-level modules that serve many different
6 The lack of organization make it very difficult for developers to work on IPython
6 purposes. The lack of organization make it very difficult for developers to
7 and understand its design. This document contains notes about how we will reorganize
7 work on IPython and understand its design. This document contains notes about
8 the modules into sub-packages.
8 how we will reorganize the modules into sub-packages.
9
9
10 .. warning::
10 .. warning::
11
11
@@ -71,7 +71,7 b' We propose to create the following new sub-packages:'
71 standards, but that we plan on keeping. To be moved out of this sub-package
71 standards, but that we plan on keeping. To be moved out of this sub-package
72 a module needs to have a maintainer, tests and documentation.
72 a module needs to have a maintainer, tests and documentation.
73
73
74 Prodecure
74 Prodedure
75 =========
75 =========
76
76
77 1. Move the file to its new location with its new name.
77 1. Move the file to its new location with its new name.
@@ -79,18 +79,30 b' Prodecure'
79 3. Run PyFlakes on each changes module.
79 3. Run PyFlakes on each changes module.
80 3. Add tests/test_imports.py to test it.
80 3. Add tests/test_imports.py to test it.
81
81
82 Need to modify iptests to properly skip modules that are no longer top
82 Status
83 level modules.
83 ======
84
85 The new subpackages have been created and the top-level modules have been
86 moved and renamed. Import tests have been created for all of the moved and
87 renamed modules. The build infrastructure (setup.py and friends) have been
88 updated and tested on Mac and Windows. Finally, a compatibility layer has been
89 added for iplib, ipapi and Shell. The follow things still need to be done::
90
91 * I need to modify iptests to properly skip modules that are no longer top
92 level modules.
84
93
85 Need to update the top level IPython/__init__.py file.
94 * I Need to update the top level IPython/__init__.py file. We need to make
95 sure that as we change how this is setup, that all modules still import.
86
96
87 Need to get installation working correctly.
97 * When running python setup.py sdist, the Sphinx API docs fail to build
98 because of something going on with IPython.core.fakemodule
88
99
89 When running python setup.py sdist, the Sphinx API docs fail to build because
100 * :file:`Extensions`. This needs to be gone through separately. Minimally,
90 of something going on with IPython.core.fakemodule
101 the package should be renamed to :file:`extensions` and the PYTHONPATH
102 setting in __init__.py needs to be updated.
91
103
92 Where things will be moved
104 Where things have been moved
93 ==========================
105 ============================
94
106
95 Top-level modules:
107 Top-level modules:
96
108
@@ -133,9 +145,6 b' Top-level modules:'
133
145
134 * :file:`twshell.py`. Move to :file:`IPython.sandbox`.
146 * :file:`twshell.py`. Move to :file:`IPython.sandbox`.
135
147
136 * :file:`Extensions`. This needs to be gone through separately. Minimally,
137 the package should be renamed to :file:`extensions`.
138
139 * :file:`history.py`. Move to :file:`IPython.core`.
148 * :file:`history.py`. Move to :file:`IPython.core`.
140
149
141 * :file:`hooks.py`. Move to :file:`IPython.core`.
150 * :file:`hooks.py`. Move to :file:`IPython.core`.
@@ -148,7 +157,7 b' Top-level modules:'
148
157
149 * :file:`ipstruct.py`. Move to :file:`IPython.python`.
158 * :file:`ipstruct.py`. Move to :file:`IPython.python`.
150
159
151 * :file:`irunner.py`. Move to :file:`IPython.scripts`. ???
160 * :file:`irunner.py`. Move to :file:`IPython.scripts`.
152
161
153 * :file:`Itpl.py`. Move to :file:`deathrow/Itpl.py`. Copy already in
162 * :file:`Itpl.py`. Move to :file:`deathrow/Itpl.py`. Copy already in
154 :file:`IPython.external`.
163 :file:`IPython.external`.
@@ -176,9 +185,8 b' Top-level modules:'
176 * :file:`Prompts.py`. Move to :file:`IPython/core/prompts.py` or
185 * :file:`Prompts.py`. Move to :file:`IPython/core/prompts.py` or
177 :file:`IPython/frontend/prompts.py`.
186 :file:`IPython/frontend/prompts.py`.
178
187
179 * :file:`PyColorize.py`. Replace with pygments? If not, move to
188 * :file:`PyColorize.py`. Move to :file:`IPython/utils/pycolorize.py`. Explore
180 :file:`IPython/core/pycolorize.py`. Maybe move to :mod:`IPython.lib` or
189 replacing with pygments.
181 :mod:`IPython.python`?
182
190
183 * :file:`Release.py`. Move to ??? or remove?
191 * :file:`Release.py`. Move to ??? or remove?
184
192
General Comments 0
You need to be logged in to leave comments. Login now