summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2008-05-10 02:27:04 +0000
committerBrett Cannon <bcannon@gmail.com>2008-05-10 02:27:04 +0000
commit4c1f881f1366ca2fcb55071f3a1b779867fe07d4 (patch)
treee08c0c30b67b6c169f3261abc07d3d24ea2dfcc2
parentccdf9081b73e57b0a1c351635ac3935955a144fc (diff)
downloadcpython-git-4c1f881f1366ca2fcb55071f3a1b779867fe07d4.tar.gz
Deprecate Bastion and rexec for 3.0.
-rw-r--r--Doc/library/bastion.rst5
-rw-r--r--Doc/library/rexec.rst5
-rw-r--r--Lib/Bastion.py3
-rw-r--r--Lib/rexec.py3
-rw-r--r--Lib/test/test_py3kwarn.py3
5 files changed, 17 insertions, 2 deletions
diff --git a/Doc/library/bastion.rst b/Doc/library/bastion.rst
index ac529aff3c..cfc48a5eb5 100644
--- a/Doc/library/bastion.rst
+++ b/Doc/library/bastion.rst
@@ -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>
diff --git a/Doc/library/rexec.rst b/Doc/library/rexec.rst
index c85c7ca772..b61319f891 100644
--- a/Doc/library/rexec.rst
+++ b/Doc/library/rexec.rst
@@ -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.
diff --git a/Lib/Bastion.py b/Lib/Bastion.py
index 93511b0a94..d0dddbfdef 100644
--- a/Lib/Bastion.py
+++ b/Lib/Bastion.py
@@ -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"]
diff --git a/Lib/rexec.py b/Lib/rexec.py
index 8c9cb9f1e5..22b1bb2622 100644
--- a/Lib/rexec.py
+++ b/Lib/rexec.py
@@ -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
diff --git a/Lib/test/test_py3kwarn.py b/Lib/test/test_py3kwarn.py
index 48cd4e7015..22257e1d1e 100644
--- a/Lib/test/test_py3kwarn.py
+++ b/Lib/test/test_py3kwarn.py
@@ -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):