[Checkins] SVN: zope.security/trunk/ Don't define checker for deprecated sets on Python 2.6.
Dan Korostelev
nadako at gmail.com
Wed Mar 4 19:40:19 EST 2009
Log message for revision 97504:
Don't define checker for deprecated sets on Python 2.6.
Fix package's mailing list address and homepage.
Remove zpkg stuff.
Changed:
U zope.security/trunk/CHANGES.txt
U zope.security/trunk/buildout.cfg
U zope.security/trunk/setup.py
D zope.security/trunk/src/zope/security/DEPENDENCIES.cfg
D zope.security/trunk/src/zope/security/SETUP.cfg
U zope.security/trunk/src/zope/security/checker.py
U zope.security/trunk/src/zope/security/tests/test_set_checkers.py
-=-
Modified: zope.security/trunk/CHANGES.txt
===================================================================
--- zope.security/trunk/CHANGES.txt 2009-03-05 00:03:53 UTC (rev 97503)
+++ zope.security/trunk/CHANGES.txt 2009-03-05 00:40:18 UTC (rev 97504)
@@ -5,9 +5,16 @@
3.6.1 (unreleased)
------------------
-- ...
+- Don't define security checkers for deprecated set types from the
+ "sets" module on Python 2.6. It's discouraged to use them and
+ `set` and `frozenset` built-in types should be used instead.
-3.6.0 - 2009-01-31
+- Change package's mailng list address to zope-dev at zope.org as
+ zope3-dev at zope.org is now retired.
+
+- Remove old zpkg-related files.
+
+3.6.0 (2009-01-31)
------------------
- Install decorated security checker support on LocationProxy from the
@@ -25,45 +32,45 @@
to this package.
-3.5.2 - 2008-07-27
+3.5.2 (2008-07-27)
------------------
- Made C code compatible with Python 2.5 on 64bit architectures.
-3.5.1 - 2008-06-04
+3.5.1 (2008-06-04)
------------------
- Add `frozenset`, `set`, `reversed`, and `sorted` to the list of safe
builtins.
-3.5.0 - 2008-03-05
+3.5.0 (2008-03-05)
------------------
- Changed title for ``zope.security.management.system_user`` to be more
presentable.
-3.4.0 - 2007/10/02
+3.4.0 (2007-10-02)
------------------
- Updated meta-data.
-3.4.0b5 - 2007/08/15
+3.4.0b5 (2007-08-15)
--------------------
- Bug: Fixed a circular import in the C implementation.
-3.4.0b4 - 2007/08/14
+3.4.0b4 (2007-08-14)
--------------------
- Bug: ``zope.security.management.system_user`` had an ugly/brittle id.
-3.4.0b3 - 2007/08/14
+3.4.0b3 (2007-08-14)
--------------------
- ``zope.security`` now works on Python 2.5
@@ -76,7 +83,7 @@
breaking. (#98250)
-3.4.0b2 - 2007/06/15
+3.4.0b2 (2007-06-15)
--------------------
- Bug: Removed stack extraction in newInteraction. When using eggs this is an
@@ -94,7 +101,7 @@
individual package and have been documented in the Zope 3 changelog.
-3.2.0 - 2006/01/05
+3.2.0 (2006-01-05)
------------------
- Corresponds to the verison of the zope.security package shipped as part of
@@ -113,7 +120,7 @@
- Code style / documentation / test fixes.
-3.1.0 - 2005/10/03
+3.1.0 (2005-10-03)
------------------
- Added support for use of the new Python 2.4 datatypes, 'set' and
@@ -142,7 +149,7 @@
- Code style / documentation / test fixes.
-3.0.0 - 2004/11/07
+3.0.0 (2004-11-07)
------------------
- Corresponds to the version of the zope.security package shipped as part of
Modified: zope.security/trunk/buildout.cfg
===================================================================
--- zope.security/trunk/buildout.cfg 2009-03-05 00:03:53 UTC (rev 97503)
+++ zope.security/trunk/buildout.cfg 2009-03-05 00:40:18 UTC (rev 97504)
@@ -1,18 +1,12 @@
[buildout]
-develop = . ../zope.location
-parts = test py
-versions = versions
+develop = .
+parts = test python
[test]
recipe = zc.recipe.testrunner
eggs = zope.security [test]
-[py]
+[python]
recipe = zc.recipe.egg
eggs = zope.security [untrustedpython]
-interpreter = py
-
-[versions]
-zope.traversing = 3.4.0
-zope.app.publisher = 3.4.0
-
+interpreter = python
Modified: zope.security/trunk/setup.py
===================================================================
--- zope.security/trunk/setup.py 2009-03-05 00:03:53 UTC (rev 97503)
+++ zope.security/trunk/setup.py 2009-03-05 00:40:18 UTC (rev 97504)
@@ -24,7 +24,7 @@
setup(name='zope.security',
version = '3.6.1dev',
author='Zope Corporation and Contributors',
- author_email='zope3-dev at zope.org',
+ author_email='zope-dev at zope.org',
description='Zope3 Security Architecture',
long_description=(
read('README.txt')
@@ -49,7 +49,7 @@
'Operating System :: OS Independent',
'Topic :: Internet :: WWW/HTTP',
'Framework :: Zope3'],
- url='http://cheeseshop.python.org/pypi/zope.security',
+ url='http://pypi.python.org/pypi/zope.security',
license='ZPL 2.1',
packages=find_packages('src'),
package_dir = {'': 'src'},
Deleted: zope.security/trunk/src/zope/security/DEPENDENCIES.cfg
===================================================================
--- zope.security/trunk/src/zope/security/DEPENDENCIES.cfg 2009-03-05 00:03:53 UTC (rev 97503)
+++ zope.security/trunk/src/zope/security/DEPENDENCIES.cfg 2009-03-05 00:40:18 UTC (rev 97504)
@@ -1,6 +0,0 @@
-RestrictedPython
-zope.exceptions
-zope.interface
-zope.proxy
-zope.testing
-zope.thread
Deleted: zope.security/trunk/src/zope/security/SETUP.cfg
===================================================================
--- zope.security/trunk/src/zope/security/SETUP.cfg 2009-03-05 00:03:53 UTC (rev 97503)
+++ zope.security/trunk/src/zope/security/SETUP.cfg 2009-03-05 00:40:18 UTC (rev 97504)
@@ -1,9 +0,0 @@
-# Extension information for zpkg.
-
-<extension _proxy>
- source _proxy.c
-</extension>
-
-<extension _zope_security_checker>
- source _zope_security_checker.c
-</extension>
Modified: zope.security/trunk/src/zope/security/checker.py
===================================================================
--- zope.security/trunk/src/zope/security/checker.py 2009-03-05 00:03:53 UTC (rev 97503)
+++ zope.security/trunk/src/zope/security/checker.py 2009-03-05 00:40:18 UTC (rev 97504)
@@ -27,7 +27,6 @@
"""
import os
import sys
-import sets
import types
import datetime
import decimal
@@ -664,8 +663,6 @@
list: NamesChecker(['__getitem__', '__getslice__', '__len__', '__iter__',
'__contains__', 'index', 'count', '__str__',
'__add__', '__radd__', ]),
- sets.Set: _setChecker,
- sets.ImmutableSet: _setChecker,
set: _setChecker,
frozenset: _setChecker,
decimal.Decimal: NamesChecker(['__nonzero__', '__cmp__', '__eq__',
@@ -719,6 +716,12 @@
zope.interface.declarations.Declaration: _Declaration_checker,
}
+if sys.version_info[:2] < (2, 6):
+ import sets
+ _default_checkers[sets.Set] = _setChecker
+ _default_checkers[sets.ImmutableSet] = _setChecker
+
+
def _clear():
_checkers.clear()
_checkers.update(_default_checkers)
Modified: zope.security/trunk/src/zope/security/tests/test_set_checkers.py
===================================================================
--- zope.security/trunk/src/zope/security/tests/test_set_checkers.py 2009-03-05 00:03:53 UTC (rev 97503)
+++ zope.security/trunk/src/zope/security/tests/test_set_checkers.py 2009-03-05 00:40:18 UTC (rev 97504)
@@ -18,11 +18,11 @@
$Id$
"""
+import sys
import unittest
from zope.testing.doctestunit import DocTestSuite
from zope.security.checker import ProxyFactory
from zope.security.interfaces import ForbiddenAttribute
-import sets
def check_forbidden_get(object, attr):
try:
@@ -201,18 +201,22 @@
test.globs['set'] = frozenset
def setUpSet(test):
+ import sets
test.globs['set'] = sets.Set
def setUpImmutableSet(test):
+ import sets
test.globs['set'] = sets.ImmutableSet
def test_suite():
- return unittest.TestSuite((
+ doctests = [
DocTestSuite(),
DocTestSuite(setUp=setUpFrozenSet),
- DocTestSuite(setUp=setUpSet),
- DocTestSuite(setUp=setUpImmutableSet),
- ))
+ ]
+ if sys.version_info[:2] < (2, 6):
+ doctests.append(DocTestSuite(setUp=setUpSet))
+ doctests.append(DocTestSuite(setUp=setUpImmutableSet))
+ return unittest.TestSuite(doctests)
if __name__ == '__main__':
import unittest
More information about the Checkins
mailing list