[Checkins] SVN: zope.security/tags/3.3.3/ Tag 3.3.3 release.

Tres Seaver tseaver at palladion.com
Fri Feb 22 20:15:53 EST 2008


Log message for revision 84163:
  Tag 3.3.3 release.

Changed:
  A   zope.security/tags/3.3.3/
  D   zope.security/tags/3.3.3/CHANGES.txt
  A   zope.security/tags/3.3.3/CHANGES.txt
  D   zope.security/tags/3.3.3/setup.py
  A   zope.security/tags/3.3.3/setup.py
  D   zope.security/tags/3.3.3/src/zope/security/management.py
  A   zope.security/tags/3.3.3/src/zope/security/management.py

-=-
Copied: zope.security/tags/3.3.3 (from rev 84161, zope.security/branches/3.3-zope2)

Deleted: zope.security/tags/3.3.3/CHANGES.txt
===================================================================
--- zope.security/branches/3.3-zope2/CHANGES.txt	2008-02-23 00:57:42 UTC (rev 84161)
+++ zope.security/tags/3.3.3/CHANGES.txt	2008-02-23 01:15:51 UTC (rev 84163)
@@ -1,107 +0,0 @@
-=======
-CHANGES
-=======
-
-
-3.4.0 - 2007/10/02
-------------------
-
-- Updated meta-data.
-
-
-3.4.0b5 - 2007/08/15
---------------------
-
-- Bug: Fixed a circular import in the C implementation.
-
-
-3.4.0b4 - 2007/08/14
---------------------
-
-- Bug: ``zope.security.management.system_user`` had an ugly/brittle id.
-
-
-3.4.0b3 - 2007/08/14
---------------------
-
-- ``zope.security`` now works on Python 2.5
-
-- Bug: ``zope.security.management.system_user`` wasn't a valid principal
-  (didn't provide IPrincipal).
-
-- Bug: Fixed inclusion of doctest to use the doctest module from
-  ``zope.testing``. Now tests can be run multiple times without
-  breaking. (#98250)
-
-
-3.4.0b2 - 2007/06/15
---------------------
-
-- Bug: Removed stack extraction in newInteraction. When using eggs this is an
-  extremly expensive function. The publisher is now more than 10 times faster
-  when using eggs and about twice as fast with a zope trunk checkout.
-
-
-3.4.0b1
--------
-
-- Temporarily fixed the hidden (and accidental) dependency on zope.testing to
-  become optional.
-
-Note: The releases between 3.2.0 and 3.4.0b1 where not tracked as an
-individual package and have been documented in the Zope 3 changelog.
-
-
-3.2.0 - 2006/01/05
-------------------
-
-- Corresponds to the verison of the zope.security package shipped as part of
-  the Zope 3.2.0 release.
-
-- Removed deprecated helper functions, 'proxy.trustedRemoveSecurityProxy' and
-  'proxy.getProxiedObject'.
-
-- Made handling of 'management.{end,restore}Interaction' more careful w.r.t.
-  edge cases.
-
-- Made behavior of 'canWrite' consistent with 'canAccess':  if 'canAccess'
-  does not raise 'ForbiddenAttribute', then neither will 'canWrite'.  See:
-  http://www.zope.org/Collectors/Zope3-dev/506
-
-- Code style / documentation / test fixes.
-
-
-3.1.0 - 2005/10/03
-------------------
-
-- Added support for use of the new Python 2.4 datatypes, 'set' and
-  'frozenset', within checked code.
-
-- C security proxy acquired a dependency on the 'proxy.h' header from the
-  'zope.proxy' package.
-
-- XXX: the spelling of the '#include' is bizarre!  It seems to be related to
-  'zpkg'-based builds, and should likely be revisited.  For the moment, I have
-  linked in the 'zope.proxy' package into our own 'include' directory.  See
-  the subversion checkin: http://svn.zope.org/Zope3/?rev=37882&view=rev
-
-- Updated checker to avoid re-proxying objects which have and explicit
-  '__Security_checker__' assigned.
-
-- Corresponds to the verison of the zope.security package shipped as part of
-  the Zope 3.1.0 release.
-
-- Clarified contract of 'IChecker' to indicate that its 'check*' methods may
-  raise only 'Forbidden' or 'Unauthorized' exceptions.
-
-- Added interfaces, ('IPrincipal', 'IGroupAwarePrincipal', 'IGroup', and
-  'IPermission') specifying contracts of components in the security framework.
-
-- Code style / documentation / test fixes.
-
-
-3.0.0 - 2004/11/07
-------------------
-
-- Corresponds to the version of the zope.security package shipped as part of
-  the Zope X3.0.0 release.

Copied: zope.security/tags/3.3.3/CHANGES.txt (from rev 84162, zope.security/branches/3.3-zope2/CHANGES.txt)
===================================================================
--- zope.security/tags/3.3.3/CHANGES.txt	                        (rev 0)
+++ zope.security/tags/3.3.3/CHANGES.txt	2008-02-23 01:15:51 UTC (rev 84163)
@@ -0,0 +1,72 @@
+=======
+CHANGES
+=======
+
+
+3.3.3 (2008-02-22)
+------------------
+
+- Bug: Removed stack extraction in newInteraction. When using eggs this is an
+  extremly expensive function. The publisher is now more than 10 times faster
+  when using eggs and about twice as fast with a zope trunk checkout.
+
+Note: The releases between 3.2.0 and 3.3.3 where not tracked as an
+individual package and have been documented in the Zope 3 changelog.
+
+This release exists purely to backport a major performance bugfix from
+the 3.4 release line, mostly FBO Zope2.
+
+
+3.2.0 - 2006/01/05
+------------------
+
+- Corresponds to the verison of the zope.security package shipped as part of
+  the Zope 3.2.0 release.
+
+- Removed deprecated helper functions, 'proxy.trustedRemoveSecurityProxy' and
+  'proxy.getProxiedObject'.
+
+- Made handling of 'management.{end,restore}Interaction' more careful w.r.t.
+  edge cases.
+
+- Made behavior of 'canWrite' consistent with 'canAccess':  if 'canAccess'
+  does not raise 'ForbiddenAttribute', then neither will 'canWrite'.  See:
+  http://www.zope.org/Collectors/Zope3-dev/506
+
+- Code style / documentation / test fixes.
+
+
+3.1.0 - 2005/10/03
+------------------
+
+- Added support for use of the new Python 2.4 datatypes, 'set' and
+  'frozenset', within checked code.
+
+- C security proxy acquired a dependency on the 'proxy.h' header from the
+  'zope.proxy' package.
+
+- XXX: the spelling of the '#include' is bizarre!  It seems to be related to
+  'zpkg'-based builds, and should likely be revisited.  For the moment, I have
+  linked in the 'zope.proxy' package into our own 'include' directory.  See
+  the subversion checkin: http://svn.zope.org/Zope3/?rev=37882&view=rev
+
+- Updated checker to avoid re-proxying objects which have and explicit
+  '__Security_checker__' assigned.
+
+- Corresponds to the verison of the zope.security package shipped as part of
+  the Zope 3.1.0 release.
+
+- Clarified contract of 'IChecker' to indicate that its 'check*' methods may
+  raise only 'Forbidden' or 'Unauthorized' exceptions.
+
+- Added interfaces, ('IPrincipal', 'IGroupAwarePrincipal', 'IGroup', and
+  'IPermission') specifying contracts of components in the security framework.
+
+- Code style / documentation / test fixes.
+
+
+3.0.0 - 2004/11/07
+------------------
+
+- Corresponds to the version of the zope.security package shipped as part of
+  the Zope X3.0.0 release.

Deleted: zope.security/tags/3.3.3/setup.py
===================================================================
--- zope.security/branches/3.3-zope2/setup.py	2008-02-23 00:57:42 UTC (rev 84161)
+++ zope.security/tags/3.3.3/setup.py	2008-02-23 01:15:51 UTC (rev 84163)
@@ -1,83 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2006 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""Setup for zope.security package
-
-$Id$
-"""
-import os
-from setuptools import setup, find_packages, Extension
-
-def read(*rnames):
-    return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
-
-setup(name='zope.security',
-      version = '3.4.0',
-      author='Zope Corporation and Contributors',
-      author_email='zope3-dev at zope.org',
-      description='Zope3 Security Architecture',
-      long_description=(
-          read('README.txt')
-          + '\n\n' +
-          'Detailed Documentation\n' +
-          '======================'
-          + '\n\n' +
-          read('src', 'zope', 'security', 'README.txt')
-          + '\n\n' +
-          read('src', 'zope', 'security', 'untrustedinterpreter.txt')
-          + '\n\n' +
-          read('CHANGES.txt')
-          ),
-      keywords = "security",
-      classifiers = [
-          'Development Status :: 5 - Production/Stable',
-          'Environment :: Web Environment',
-          'Intended Audience :: Developers',
-          'License :: OSI Approved :: Zope Public License',
-          'Programming Language :: Python',
-          'Natural Language :: English',
-          'Operating System :: OS Independent',
-          'Topic :: Internet :: WWW/HTTP',
-          'Framework :: Zope3'],
-      url='http://cheeseshop.python.org/pypi/zope.security',
-      license='ZPL 2.1',
-      packages=find_packages('src'),
-      package_dir = {'': 'src'},
-      namespace_packages=['zope'],
-      ext_modules=[Extension("zope.security._proxy",
-                             [os.path.join('src', 'zope', 'security',
-                                           "_proxy.c")
-                              ], include_dirs=['include']),
-                   Extension("zope.security._zope_security_checker",
-                             [os.path.join('src', 'zope', 'security',
-                                           "_zope_security_checker.c")
-                              ]),
-                   ],
-      install_requires=['setuptools',
-                        'pytz',
-                        'zope.component',
-                        'zope.configuration',
-                        'zope.deferredimport',
-                        'zope.exceptions',
-                        'zope.i18nmessageid',
-                        'zope.interface',
-                        'zope.location',
-                        'zope.proxy',
-                        'zope.schema',
-                        ],
-      extras_require = dict(
-          untrustedpython=["RestrictedPython"]
-          ),
-      include_package_data = True,
-      zip_safe = False,
-      )

Copied: zope.security/tags/3.3.3/setup.py (from rev 84162, zope.security/branches/3.3-zope2/setup.py)
===================================================================
--- zope.security/tags/3.3.3/setup.py	                        (rev 0)
+++ zope.security/tags/3.3.3/setup.py	2008-02-23 01:15:51 UTC (rev 84163)
@@ -0,0 +1,83 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Setup for zope.security package
+
+$Id$
+"""
+import os
+from setuptools import setup, find_packages, Extension
+
+def read(*rnames):
+    return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
+setup(name='zope.security',
+      version = '3.3.3',
+      author='Zope Corporation and Contributors',
+      author_email='zope3-dev at zope.org',
+      description='Zope3 Security Architecture',
+      long_description=(
+          read('README.txt')
+          + '\n\n' +
+          'Detailed Documentation\n' +
+          '======================'
+          + '\n\n' +
+          read('src', 'zope', 'security', 'README.txt')
+          + '\n\n' +
+          read('src', 'zope', 'security', 'untrustedinterpreter.txt')
+          + '\n\n' +
+          read('CHANGES.txt')
+          ),
+      keywords = "security",
+      classifiers = [
+          'Development Status :: 5 - Production/Stable',
+          'Environment :: Web Environment',
+          'Intended Audience :: Developers',
+          'License :: OSI Approved :: Zope Public License',
+          'Programming Language :: Python',
+          'Natural Language :: English',
+          'Operating System :: OS Independent',
+          'Topic :: Internet :: WWW/HTTP',
+          'Framework :: Zope3'],
+      url='http://cheeseshop.python.org/pypi/zope.security',
+      license='ZPL 2.1',
+      packages=find_packages('src'),
+      package_dir = {'': 'src'},
+      namespace_packages=['zope'],
+      ext_modules=[Extension("zope.security._proxy",
+                             [os.path.join('src', 'zope', 'security',
+                                           "_proxy.c")
+                              ], include_dirs=['include']),
+                   Extension("zope.security._zope_security_checker",
+                             [os.path.join('src', 'zope', 'security',
+                                           "_zope_security_checker.c")
+                              ]),
+                   ],
+      install_requires=['setuptools',
+                        'pytz',
+                        'zope.component',
+                        'zope.configuration',
+                        'zope.deferredimport',
+                        'zope.exceptions',
+                        'zope.i18nmessageid',
+                        'zope.interface',
+                        'zope.location',
+                        'zope.proxy',
+                        'zope.schema',
+                        ],
+      extras_require = dict(
+          untrustedpython=["RestrictedPython"]
+          ),
+      include_package_data = True,
+      zip_safe = False,
+      )

Deleted: zope.security/tags/3.3.3/src/zope/security/management.py
===================================================================
--- zope.security/branches/3.3-zope2/src/zope/security/management.py	2008-02-23 00:57:42 UTC (rev 84161)
+++ zope.security/tags/3.3.3/src/zope/security/management.py	2008-02-23 01:15:51 UTC (rev 84163)
@@ -1,147 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""Default 'ISecurityManagement' and 'IInteractionManagement' implementation
-
-$Id$
-"""
-# Special system user that has all permissions
-# zope.security.simplepolicies needs it
-system_user = object()
-
-import traceback
-
-from zope.interface import moduleProvides
-from zope.security.interfaces import ISecurityManagement
-from zope.security.interfaces import IInteractionManagement
-from zope.security.interfaces import NoInteraction
-from zope.testing.cleanup import addCleanUp
-import zope.thread
-
-thread_local = zope.thread.local()
-
-moduleProvides(ISecurityManagement, IInteractionManagement)
-
-
-def _clear():
-    global _defaultPolicy
-    _defaultPolicy = ParanoidSecurityPolicy
-
-addCleanUp(_clear)
-
-
-#
-#   ISecurityManagement implementation
-#
-
-def getSecurityPolicy():
-    """Get the system default security policy."""
-    return _defaultPolicy
-
-def setSecurityPolicy(aSecurityPolicy):
-    """Set the system default security policy, and return the previous
-    value.
-
-    This method should only be called by system startup code.
-    It should never, for example, be called during a web request.
-    """
-    global _defaultPolicy
-
-    last, _defaultPolicy = _defaultPolicy, aSecurityPolicy
-
-    return last
-
-
-#
-#   IInteractionManagement implementation
-#
-
-def queryInteraction():
-    return getattr(thread_local, 'interaction', None)
-
-def getInteraction():
-    """Get the current interaction."""
-    try:
-        return thread_local.interaction
-    except AttributeError:
-        raise NoInteraction
-
-def newInteraction(*participations):
-    """Start a new interaction."""
-    
-    
-    if queryInteraction() is not None:
-        stack = queryInteraction()._newInteraction_called_from
-        raise AssertionError("newInteraction called"
-                             " while another interaction is active:\n%s"
-                             % "".join(traceback.format_list(stack)))
-
-    interaction = getSecurityPolicy()(*participations)
-
-    interaction._newInteraction_called_from = traceback.extract_stack()
-    thread_local.interaction = interaction
-
-def endInteraction():
-    """End the current interaction."""
-
-    try:
-        thread_local.previous_interaction = thread_local.interaction
-    except AttributeError:
-        # if someone does a restore later, it should be restored to not having
-        # an interaction.  If there was a previous interaction from a previous
-        # call to endInteraction, it should be removed.
-        try:
-            del thread_local.previous_interaction
-        except AttributeError:
-            pass
-    else:
-        del thread_local.interaction
-
-def restoreInteraction():
-    try:
-        previous = thread_local.previous_interaction
-    except AttributeError:
-        try:
-            del thread_local.interaction
-        except AttributeError:
-            pass
-    else:
-        thread_local.interaction = previous
-
-def checkPermission(permission, object, interaction=None):
-    """Return whether security policy allows permission on object.
-
-    Arguments:
-    permission -- A permission name
-    object -- The object being accessed according to the permission
-    interaction -- An interaction, which provides access to information
-        such as authenticated principals.  If it is None, the current
-        interaction is used.
-
-    checkPermission is guaranteed to return True if permission is
-    CheckerPublic or None.
-    """
-    if permission is CheckerPublic or permission is None:
-        return True
-    if interaction is None:
-        interaction = thread_local.interaction
-    return interaction.checkPermission(permission, object)
-
-addCleanUp(endInteraction)
-
-
-# circular imports are not fun
-
-from zope.security.checker import CheckerPublic
-from zope.security.simplepolicies import ParanoidSecurityPolicy
-_defaultPolicy = ParanoidSecurityPolicy

Copied: zope.security/tags/3.3.3/src/zope/security/management.py (from rev 84162, zope.security/branches/3.3-zope2/src/zope/security/management.py)
===================================================================
--- zope.security/tags/3.3.3/src/zope/security/management.py	                        (rev 0)
+++ zope.security/tags/3.3.3/src/zope/security/management.py	2008-02-23 01:15:51 UTC (rev 84163)
@@ -0,0 +1,143 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Default 'ISecurityManagement' and 'IInteractionManagement' implementation
+
+$Id$
+"""
+# Special system user that has all permissions
+# zope.security.simplepolicies needs it
+system_user = object()
+
+import traceback
+
+from zope.interface import moduleProvides
+from zope.security.interfaces import ISecurityManagement
+from zope.security.interfaces import IInteractionManagement
+from zope.security.interfaces import NoInteraction
+from zope.testing.cleanup import addCleanUp
+import zope.thread
+
+thread_local = zope.thread.local()
+
+moduleProvides(ISecurityManagement, IInteractionManagement)
+
+
+def _clear():
+    global _defaultPolicy
+    _defaultPolicy = ParanoidSecurityPolicy
+
+addCleanUp(_clear)
+
+
+#
+#   ISecurityManagement implementation
+#
+
+def getSecurityPolicy():
+    """Get the system default security policy."""
+    return _defaultPolicy
+
+def setSecurityPolicy(aSecurityPolicy):
+    """Set the system default security policy, and return the previous
+    value.
+
+    This method should only be called by system startup code.
+    It should never, for example, be called during a web request.
+    """
+    global _defaultPolicy
+
+    last, _defaultPolicy = _defaultPolicy, aSecurityPolicy
+
+    return last
+
+
+#
+#   IInteractionManagement implementation
+#
+
+def queryInteraction():
+    return getattr(thread_local, 'interaction', None)
+
+def getInteraction():
+    """Get the current interaction."""
+    try:
+        return thread_local.interaction
+    except AttributeError:
+        raise NoInteraction
+
+def newInteraction(*participations):
+    """Start a new interaction."""
+
+    if queryInteraction() is not None:
+        raise AssertionError("newInteraction called"
+                             " while another interaction is active.")
+
+    interaction = getSecurityPolicy()(*participations)
+
+    thread_local.interaction = interaction
+
+def endInteraction():
+    """End the current interaction."""
+
+    try:
+        thread_local.previous_interaction = thread_local.interaction
+    except AttributeError:
+        # if someone does a restore later, it should be restored to not having
+        # an interaction.  If there was a previous interaction from a previous
+        # call to endInteraction, it should be removed.
+        try:
+            del thread_local.previous_interaction
+        except AttributeError:
+            pass
+    else:
+        del thread_local.interaction
+
+def restoreInteraction():
+    try:
+        previous = thread_local.previous_interaction
+    except AttributeError:
+        try:
+            del thread_local.interaction
+        except AttributeError:
+            pass
+    else:
+        thread_local.interaction = previous
+
+def checkPermission(permission, object, interaction=None):
+    """Return whether security policy allows permission on object.
+
+    Arguments:
+    permission -- A permission name
+    object -- The object being accessed according to the permission
+    interaction -- An interaction, which provides access to information
+        such as authenticated principals.  If it is None, the current
+        interaction is used.
+
+    checkPermission is guaranteed to return True if permission is
+    CheckerPublic or None.
+    """
+    if permission is CheckerPublic or permission is None:
+        return True
+    if interaction is None:
+        interaction = thread_local.interaction
+    return interaction.checkPermission(permission, object)
+
+addCleanUp(endInteraction)
+
+
+# circular imports are not fun
+
+from zope.security.checker import CheckerPublic
+from zope.security.simplepolicies import ParanoidSecurityPolicy
+_defaultPolicy = ParanoidSecurityPolicy



More information about the Checkins mailing list