Skip to content

Commit

Permalink
Provide more forward compatibility shims
Browse files Browse the repository at this point in the history
  • Loading branch information
hannosch committed Aug 8, 2010
1 parent 4422302 commit 72e68c0
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/CHANGES.rst
Expand Up @@ -16,7 +16,8 @@ Bugs Fixed
Features Added
++++++++++++++

- OFS: Added forward-compatibility shim for UserFolder.
- Added forward-compatibility shims for some frequently used modules moved in
Zope 2.13.

- Updated packages:

Expand Down
18 changes: 18 additions & 0 deletions src/DocumentTemplate/security.py
@@ -0,0 +1,18 @@
##############################################################################
#
# Copyright (c) 2002 Zope Foundation and Contributors.
#
# 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
#
##############################################################################
"""Add security system support to Document Templates
"""

# Forward compatibility with Zope 2.13
from AccessControl.DTML import DTMLSecurityAPI
from AccessControl.DTML import RestrictedDTML
21 changes: 21 additions & 0 deletions src/OFS/role.py
@@ -0,0 +1,21 @@
##############################################################################
#
# Copyright (c) 2002 Zope Foundation and Contributors.
#
# 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
#
##############################################################################
"""Role manager
"""

# Forward compatibility with Zope 2.13
from AccessControl.Role import RoleManager as BaseRoleManager

class RoleManager(BaseRoleManager):
"""Forward compatibility shim.
"""
23 changes: 23 additions & 0 deletions src/Testing/testbrowser.py
@@ -0,0 +1,23 @@
##############################################################################
#
# Copyright (c) 2006 Zope Foundation 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.
#
##############################################################################
"""Support for using zope.testbrowser from Zope2.
Mostly just copy and paste from zope.testbrowser.testing.
"""

# Forward compatibility with Zope 2.13
from Products.Five.testbrowser import Browser
from Products.Five.testbrowser import PublisherConnection
from Products.Five.testbrowser import PublisherHTTPHandler
from Products.Five.testbrowser import PublisherMechanizeBrowser
16 changes: 16 additions & 0 deletions src/Zope2/App/schema.py
@@ -0,0 +1,16 @@
##############################################################################
#
# Copyright (c) 2004, 2005 Zope Foundation 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.
#
##############################################################################

# Forward compatibility with Zope 2.13
from Products.Five.schema import Zope2VocabularyRegistry
23 changes: 23 additions & 0 deletions src/Zope2/App/zcml.py
@@ -0,0 +1,23 @@
##############################################################################
#
# Copyright (c) 2004, 2005 Zope Foundation 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.
#
##############################################################################
"""ZCML machinery
"""

# Forward compatibility with Zope 2.13
# _context and _initialized are module level variables and are frequently
# overridden directly in code
from Products.Five.zcml import cleanUp
from Products.Five.zcml import load_config
from Products.Five.zcml import load_site
from Products.Five.zcml import load_string

0 comments on commit 72e68c0

Please sign in to comment.