[Checkins] SVN: zope.security/trunk/ Removed the dependency on the zope.exceptions package: zope.security.checker
Fabio Tranchitella
kobold at kobold.it
Wed Jan 6 13:10:43 EST 2010
Log message for revision 107750:
Removed the dependency on the zope.exceptions package: zope.security.checker
now imports ``DuplicationError`` from zope.exceptions if available, otherwise
it defines a package-specific ``DuplicationError`` class which inherits from
Exception.
Changed:
U zope.security/trunk/CHANGES.txt
U zope.security/trunk/setup.py
U zope.security/trunk/src/zope/security/checker.py
-=-
Modified: zope.security/trunk/CHANGES.txt
===================================================================
--- zope.security/trunk/CHANGES.txt 2010-01-06 17:52:24 UTC (rev 107749)
+++ zope.security/trunk/CHANGES.txt 2010-01-06 18:10:43 UTC (rev 107750)
@@ -9,6 +9,11 @@
Python code, even if it's unnecessary because IVocabularyFactory is provided
in zcml.
+- Removed the dependency on the zope.exceptions package: zope.security.checker
+ now imports ``DuplicationError`` from zope.exceptions if available, otherwise
+ it defines a package-specific ``DuplicationError`` class which inherits from
+ Exception.
+
3.7.2 (2009-11-10)
------------------
Modified: zope.security/trunk/setup.py
===================================================================
--- zope.security/trunk/setup.py 2010-01-06 17:52:24 UTC (rev 107749)
+++ zope.security/trunk/setup.py 2010-01-06 18:10:43 UTC (rev 107750)
@@ -68,7 +68,6 @@
install_requires=['setuptools',
'zope.component',
'zope.configuration',
- 'zope.exceptions',
'zope.i18nmessageid',
'zope.interface',
'zope.location',
Modified: zope.security/trunk/src/zope/security/checker.py
===================================================================
--- zope.security/trunk/src/zope/security/checker.py 2010-01-06 17:52:24 UTC (rev 107749)
+++ zope.security/trunk/src/zope/security/checker.py 2010-01-06 18:10:43 UTC (rev 107750)
@@ -32,7 +32,6 @@
import decimal
import weakref
-from zope.exceptions import DuplicationError
import zope.interface.interface
import zope.interface.interfaces
import zope.interface.declarations
@@ -46,6 +45,12 @@
from zope.security._definitions import thread_local
from zope.security._proxy import _Proxy as Proxy, getChecker
+try:
+ from zope.exceptions import DuplicationError
+except ImportError:
+ class DuplicationError(Exception):
+ """A duplicate registration was attempted"""
+
if os.environ.get('ZOPE_WATCH_CHECKERS'):
try:
WATCH_CHECKERS = int(os.environ.get('ZOPE_WATCH_CHECKERS'))
More information about the checkins
mailing list