diff options
author | Brett Cannon <bcannon@gmail.com> | 2008-05-10 22:45:07 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2008-05-10 22:45:07 (GMT) |
commit | 27508d4eb98fba5e092a742fc241760b5f796985 (patch) | |
tree | bf66a8d90d8120ce18999e4fdb6bd40c70b4f3f7 | |
parent | 2bca21223900bb8cc24177ad593611e8b317d2bf (diff) | |
download | cpython-27508d4eb98fba5e092a742fc241760b5f796985.zip cpython-27508d4eb98fba5e092a742fc241760b5f796985.tar.gz cpython-27508d4eb98fba5e092a742fc241760b5f796985.tar.bz2 |
Deprecate ihooks for removal in 3.0.
-rw-r--r-- | Doc/library/undoc.rst | 2 | ||||
-rw-r--r-- | Lib/ihooks.py | 4 | ||||
-rw-r--r-- | Lib/test/test_py3kwarn.py | 3 | ||||
-rw-r--r-- | Misc/NEWS | 2 |
4 files changed, 9 insertions, 2 deletions
diff --git a/Doc/library/undoc.rst b/Doc/library/undoc.rst index 856cf86..deff5e2 100644 --- a/Doc/library/undoc.rst +++ b/Doc/library/undoc.rst @@ -21,6 +21,8 @@ Some of these are very old and/or not very robust; marked with "hmm." :mod:`ihooks` --- Import hook support (for :mod:`rexec`; may become obsolete). + + .. warning:: The ihooks module has been removed in Python 3.0. Platform specific modules diff --git a/Lib/ihooks.py b/Lib/ihooks.py index f5b93ab..86b0f65 100644 --- a/Lib/ihooks.py +++ b/Lib/ihooks.py @@ -49,7 +49,9 @@ by the way the __import__ hook is used by the Python interpreter.) It would also do wise to install a different version of reload(). """ - +from warnings import warnpy3k +warnpy3k("the ihooks module has been removed in Python 3.0", stacklevel=2) +del warnpy3k import __builtin__ import imp diff --git a/Lib/test/test_py3kwarn.py b/Lib/test/test_py3kwarn.py index 8c3c857..3371697 100644 --- a/Lib/test/test_py3kwarn.py +++ b/Lib/test/test_py3kwarn.py @@ -129,7 +129,8 @@ class TestStdlibRemovals(unittest.TestCase): # test.testall not tested as it executes all unit tests as an # import side-effect. all_platforms = ('audiodev', 'imputil', 'mutex', 'user', 'new', 'rexec', - 'Bastion', 'compiler', 'dircache', 'fpformat') + 'Bastion', 'compiler', 'dircache', 'fpformat', + 'ihooks') inclusive_platforms = {'irix':('pure',)} # XXX Don't know if lib-tk is only installed if _tkinter is built. optional_modules = ('bsddb185', 'Canvas', 'dl') @@ -23,6 +23,8 @@ Extension Modules Library ------- +- The ihooks module has been deprecated for removal in Python 3.0. + - The fpformat module has been deprecated for removal in Python 3.0. - The dl module has been deprecated for removal in Python 3.0. |