summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTres Seaver <tseaver@palladion.com>2013-02-15 12:22:55 -0500
committerTres Seaver <tseaver@palladion.com>2013-02-15 12:22:55 -0500
commit327b8008f0ef6f66c307159d457b410130e2e300 (patch)
tree98af49f4e850bfe24d96496fb8458156b4301e60
parenta0c986776cdb5711d00dd0e3f38dd003d21ac76f (diff)
downloadzope-security-327b8008f0ef6f66c307159d457b410130e2e300.tar.gz
Fix test breakage under 4.0.0a2 due to deprecation strategy.
-rw-r--r--CHANGES.rst13
-rw-r--r--setup.cfg1
-rw-r--r--src/zope/security/untrustedpython/__init__.py8
-rw-r--r--src/zope/security/untrustedpython/builtins.py12
-rw-r--r--src/zope/security/untrustedpython/interpreter.py12
-rw-r--r--src/zope/security/untrustedpython/rcompile.py12
6 files changed, 32 insertions, 26 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index 88a7002..dbb9313 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -2,17 +2,10 @@
CHANGES
=======
-4.0.0 (unreleased)
-------------------
-
-- TODO: Add PyPy support
-
-- TODO: add pure-Python implementations of:
-
- - ``z.s._proxy.getChecker``
- - ``z.s._proxy.getObject``
- - ``z.s._proxy._Proxy``
+4.0.0a3 (unreleased)
+--------------------
+- Fix test breakage in 4.0.0a2 due to deprecation strategy.
4.0.0a2 (2013-02-15)
--------------------
diff --git a/setup.cfg b/setup.cfg
index 48d6297..6ceb809 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -4,6 +4,7 @@ cover-package=zope.security
cover-erase=1
with-doctest=0
where=src
+exclude=untrustedpython
[aliases]
dev = develop easy_install zope.security[testing]
diff --git a/src/zope/security/untrustedpython/__init__.py b/src/zope/security/untrustedpython/__init__.py
index 47c6918..88f81c0 100644
--- a/src/zope/security/untrustedpython/__init__.py
+++ b/src/zope/security/untrustedpython/__init__.py
@@ -11,7 +11,7 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-from zope.deprecation import moved
-
-moved('zope.untrustedpython', '4.1')
-del moved
+from warnings import warn
+warn('Import from zope.untrustedpython. This BBB module will'
+ 'be removed in zope.security 4.1', DeprecationWarning, 2)
+del warn
diff --git a/src/zope/security/untrustedpython/builtins.py b/src/zope/security/untrustedpython/builtins.py
index 4485831..6975cc7 100644
--- a/src/zope/security/untrustedpython/builtins.py
+++ b/src/zope/security/untrustedpython/builtins.py
@@ -11,8 +11,12 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-from zope.deprecation import moved
-moved('zope.untrustedpython.builtins', '4.1')
-del moved
+from warnings import warn
+warn('Import from zope.untrustedpython.builtins. This BBB module will'
+ 'be removed in zope.security 4.1', DeprecationWarning, 2)
+del warn
-from zope.untrustedpython.builtins import *
+try:
+ from zope.untrustedpython.builtins import *
+except ImportError:
+ pass
diff --git a/src/zope/security/untrustedpython/interpreter.py b/src/zope/security/untrustedpython/interpreter.py
index 3d07cee..5ecc36b 100644
--- a/src/zope/security/untrustedpython/interpreter.py
+++ b/src/zope/security/untrustedpython/interpreter.py
@@ -11,8 +11,12 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-from zope.deprecation import moved
-moved('zope.untrustedpython.interpreter', '4.1')
-del moved
+from warnings import warn
+warn('Import from zope.untrustedpython.interpreter. This BBB module will'
+ 'be removed in zope.security 4.1', DeprecationWarning, 2)
+del warn
-from zope.untrustedpython.interpreter import *
+try:
+ from zope.untrustedpython.interpreter import *
+except ImportError:
+ pass
diff --git a/src/zope/security/untrustedpython/rcompile.py b/src/zope/security/untrustedpython/rcompile.py
index ca88890..08eb018 100644
--- a/src/zope/security/untrustedpython/rcompile.py
+++ b/src/zope/security/untrustedpython/rcompile.py
@@ -11,8 +11,12 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-from zope.deprecation import moved
-moved('zope.untrustedpython.rcompile', '4.1')
-del moved
+from warnings import warn
+warn('Import from zope.untrustedpython.rcompile. This BBB module will'
+ 'be removed in zope.security 4.1', DeprecationWarning, 2)
+del warn
-from zope.untrustedpython.rcompile import *
+try:
+ from zope.untrustedpython.rcompile import *
+except ImportError:
+ pass