]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Deprecate Bastion and rexec for 3.0.
authorBrett Cannon <bcannon@gmail.com>
Sat, 10 May 2008 02:27:04 +0000 (02:27 +0000)
committerBrett Cannon <bcannon@gmail.com>
Sat, 10 May 2008 02:27:04 +0000 (02:27 +0000)
Doc/library/bastion.rst
Doc/library/rexec.rst
Lib/Bastion.py
Lib/rexec.py
Lib/test/test_py3kwarn.py

index ac529aff3c9cad504d0aa6c66f4fce29ceb0ee2b..cfc48a5eb5998e7ecbf0be4af920b0cd824d7f46 100644 (file)
@@ -4,6 +4,11 @@
 
 .. module:: Bastion
    :synopsis: Providing restricted access to objects.
+   :deprecated:
+   
+.. deprecated:: 2.6
+   The Bastion module has been removed in Python 3.0.
+   
 .. moduleauthor:: Barry Warsaw <bwarsaw@python.org>
 
 
index c85c7ca77248bb08291cff8fcbc950986518d371..b61319f891b686a5772b2d798f73365ea092a010 100644 (file)
@@ -4,7 +4,10 @@
 
 .. module:: rexec
    :synopsis: Basic restricted execution framework.
-
+   :deprecated:
+   
+.. deprecated:: 2.6
+   The rexec module has been removed in Python 3.0.
 
 .. versionchanged:: 2.3
    Disabled module.
index 93511b0a948513f989006f6e1e0c4387ab266c1c..d0dddbfdefcac103c0e290fe844891cedac94751 100644 (file)
@@ -25,6 +25,9 @@ the repr() of the original object.  This is precomputed when the
 bastion is created.
 
 """
+from warnings import warnpy3k
+warnpy3k("the Bastion module has been removed in Python 3.0", stacklevel=2)
+del warnpy3k
 
 __all__ = ["BastionClass", "Bastion"]
 
index 8c9cb9f1e59a4c40cf5e024be2d57ab01bc0b7f9..22b1bb26228897dda6df1439cde6d8aba1e17b66 100644 (file)
@@ -16,6 +16,9 @@ XXX To do:
 - r_exec etc. with explicit globals/locals? (Use rexec("exec ... in ...")?)
 
 """
+from warnings import warnpy3k
+warnpy3k("the rexec module has been removed in Python 3.0", stacklevel=2)
+del warnpy3k
 
 
 import sys
index 48cd4e70154066c38cc4578c0b3c30de052497f0..22257e1d1e697ad8308fd501d2e50a8a44ba1bab 100644 (file)
@@ -128,7 +128,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')
+    all_platforms = ('audiodev', 'imputil', 'mutex', 'user', 'new', 'rexec',
+                        'Bastion')
     inclusive_platforms = {'irix':('pure',)}
 
     def check_removal(self, module_name, optional=False):