Commit 362cb476 authored by Hanno Schlichting's avatar Hanno Schlichting

Remove last references to Zope 3

parent d45ac7a3
...@@ -220,7 +220,7 @@ def test_checkPermission(): ...@@ -220,7 +220,7 @@ def test_checkPermission():
>>> from zope.component.testing import setUp, tearDown >>> from zope.component.testing import setUp, tearDown
>>> setUp() >>> setUp()
Zope 3 has a function zope.security.checkPermission which provides zope.security has a function zope.security.checkPermission which provides
an easy way of checking whether the currently authenticated user an easy way of checking whether the currently authenticated user
has the permission to access an object. The function delegates to has the permission to access an object. The function delegates to
the security policy's checkPermission() method. the security policy's checkPermission() method.
......
...@@ -241,7 +241,7 @@ class Item(Base, ...@@ -241,7 +241,7 @@ class Item(Base,
# Can we re-raise the exception with a rendered-to-HTML # Can we re-raise the exception with a rendered-to-HTML
# exception value? To be able to do so, the exception # exception value? To be able to do so, the exception
# constructor needs to be able to take more than two # constructor needs to be able to take more than two
# arguments (some Zope 3 exceptions can't). # arguments (some Zope exceptions can't).
can_raise = False can_raise = False
ctor = getattr(error_type, '__init__', None) ctor = getattr(error_type, '__init__', None)
if inspect.ismethoddescriptor(ctor): if inspect.ismethoddescriptor(ctor):
......
...@@ -112,13 +112,3 @@ Visit a BTreeFolder2 instance through the web as a manager. Add ...@@ -112,13 +112,3 @@ Visit a BTreeFolder2 instance through the web as a manager. Add
"manage_cleanup" to the end of the URL and request that URL. It may "manage_cleanup" to the end of the URL and request that URL. It may
take some time to load and fix the entire structure. If problems are take some time to load and fix the entire structure. If problems are
detected, information will be added to the event log. detected, information will be added to the event log.
Future
======
BTreeFolder2 will be maintained for Zope 2. Zope 3, however, is not
likely to require BTreeFolder, since the intention is to make Zope 3
folders gracefully expand to support many items.
...@@ -32,8 +32,7 @@ Example ...@@ -32,8 +32,7 @@ Example
from zope.tales.expressions import DeferWrapper, DeferExpr from zope.tales.expressions import DeferWrapper, DeferExpr
_marker = object() _marker = object()
# TODO These should really be integrated into the Zope 3 ZPT # TODO These should really be integrated into the zope.tales implementation
# implementation (zope.tales)
class LazyWrapper(DeferWrapper): class LazyWrapper(DeferWrapper):
"""Wrapper for lazy: expression """Wrapper for lazy: expression
......
...@@ -53,16 +53,16 @@ SecureModuleImporter = ZRPythonExpr._SecureModuleImporter() ...@@ -53,16 +53,16 @@ SecureModuleImporter = ZRPythonExpr._SecureModuleImporter()
LOG = logging.getLogger('Expressions') LOG = logging.getLogger('Expressions')
# In Zope 2 traversal semantics, NotFound or Unauthorized (the Zope 2 # In Zope 2 traversal semantics, NotFound or Unauthorized (the Zope 2
# versions) indicate that traversal has failed. By default, Zope 3's # versions) indicate that traversal has failed. By default, zope.tales'
# TALES engine doesn't recognize them as such which is why we extend # engine doesn't recognize them as such which is why we extend its
# Zope 3's list here and make sure our implementation of the TALES # list here and make sure our implementation of the TALES
# Path Expression uses them # Path Expression uses them
ZopeUndefs = Undefs + (NotFound, Unauthorized) ZopeUndefs = Undefs + (NotFound, Unauthorized)
def boboAwareZopeTraverse(object, path_items, econtext): def boboAwareZopeTraverse(object, path_items, econtext):
"""Traverses a sequence of names, first trying attributes then items. """Traverses a sequence of names, first trying attributes then items.
This uses Zope 3 path traversal where possible and interacts This uses zope.traversing path traversal where possible and interacts
correctly with objects providing OFS.interface.ITraversable when correctly with objects providing OFS.interface.ITraversable when
necessary (bobo-awareness). necessary (bobo-awareness).
""" """
...@@ -82,7 +82,7 @@ def boboAwareZopeTraverse(object, path_items, econtext): ...@@ -82,7 +82,7 @@ def boboAwareZopeTraverse(object, path_items, econtext):
def trustedBoboAwareZopeTraverse(object, path_items, econtext): def trustedBoboAwareZopeTraverse(object, path_items, econtext):
"""Traverses a sequence of names, first trying attributes then items. """Traverses a sequence of names, first trying attributes then items.
This uses Zope 3 path traversal where possible and interacts This uses zope.traversing path traversal where possible and interacts
correctly with objects providing OFS.interface.ITraversable when correctly with objects providing OFS.interface.ITraversable when
necessary (bobo-awareness). necessary (bobo-awareness).
""" """
...@@ -205,7 +205,7 @@ class ZopeContext(Context): ...@@ -205,7 +205,7 @@ class ZopeContext(Context):
def evaluateBoolean(self, expr): def evaluateBoolean(self, expr):
value = self.evaluate(expr) value = self.evaluate(expr)
# here we override the normal Zope 3 behaviour. Zope 3 # here we override the normal zope.tales behaviour. zope.tales
# doesn't care about the default in a boolean expression, # doesn't care about the default in a boolean expression,
# while we do (Zope 2 legacy, see the # while we do (Zope 2 legacy, see the
# BooleanAttributesAndDefault.html test case) # BooleanAttributesAndDefault.html test case)
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
# FOR A PARTICULAR PURPOSE # FOR A PARTICULAR PURPOSE
# #
############################################################################## ##############################################################################
"""Zope Page Template module (wrapper for the Zope 3 ZPT implementation) """Zope Page Template module (wrapper for the zope.pagetemplate implementation)
$Id$ $Id$
""" """
......
...@@ -711,8 +711,7 @@ def old_validation(groups, request, auth, ...@@ -711,8 +711,7 @@ def old_validation(groups, request, auth,
# types during publishing, we ensure the same publishing rules in # types during publishing, we ensure the same publishing rules in
# both versions. The downside is that this needs to be extended as # both versions. The downside is that this needs to be extended as
# new built-in types are added and future Python versions are # new built-in types are added and future Python versions are
# supported. That happens rarely enough that hopefully we'll be on # supported.
# Zope 3 by then :)
import types import types
......
...@@ -1579,7 +1579,7 @@ class ZopeFieldStorage(FieldStorage): ...@@ -1579,7 +1579,7 @@ class ZopeFieldStorage(FieldStorage):
return tempfile.NamedTemporaryFile("w+b") return tempfile.NamedTemporaryFile("w+b")
# Zope 3 version: zope.publisher.browser.FileUpload # Original version: zope.publisher.browser.FileUpload
class FileUpload: class FileUpload:
'''File upload objects '''File upload objects
......
## This script requires: ## This script requires:
## - python >= 2.4 ## - python >= 2.4
## - Zope 3's zope.testbrowser package: ## - zope.testbrowser
## http://www.zope.org/Members/benji_york/ZopeTestbrowser-0.9.0.tgz
## ##
## The just run: ## The just run:
## $python generate_conflicts.py ## $python generate_conflicts.py
......
...@@ -205,7 +205,7 @@ class ZPublisherExceptionHook: ...@@ -205,7 +205,7 @@ class ZPublisherExceptionHook:
# raise the rendered value as the exception value # raise the rendered value as the exception value
# (basically the same that 'raise_standardErrorMessage' # (basically the same that 'raise_standardErrorMessage'
# does. The view is named 'index.html' because that's what # does. The view is named 'index.html' because that's what
# Zope 3 uses as well. # zope.publisher uses as well.
view = queryMultiAdapter((v, REQUEST), name=u'index.html') view = queryMultiAdapter((v, REQUEST), name=u'index.html')
if view is not None: if view is not None:
v = view() v = view()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment