]> granicus.if.org Git - python/commitdiff
Deprecate ihooks for removal in 3.0.
authorBrett Cannon <bcannon@gmail.com>
Sat, 10 May 2008 22:45:07 +0000 (22:45 +0000)
committerBrett Cannon <bcannon@gmail.com>
Sat, 10 May 2008 22:45:07 +0000 (22:45 +0000)
Doc/library/undoc.rst
Lib/ihooks.py
Lib/test/test_py3kwarn.py
Misc/NEWS

index 856cf860632ac24e46220f6d4c0747369b8cac7e..deff5e2a166fb5e3e432f930ed222f2771bf0559 100644 (file)
@@ -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
index f5b93ab9cf3647bd32ce6ccf09a27418a1eec09d..86b0f65b63fb34ec6ef9327623ac190cd7b11036 100644 (file)
@@ -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
index 8c3c857fddfee03b59ce3ac36444fa358f315d81..3371697a00c9018697d94416dce46ab872289b26 100644 (file)
@@ -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')
index c1a30385f960c583a701af1b6d8bb436198d6e59..12adf3d426301eda4ca90b337b75d265133079d2 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -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.