Get rid of our custom ProviderExpression class, just alias the name to the

implementation from Zope 3.
parent 8dfd7442
...@@ -13,14 +13,10 @@ ...@@ -13,14 +13,10 @@
############################################################################## ##############################################################################
"""Provider expression. """Provider expression.
$Id$ This module solely exists for backwards-compatibility. Please import
TALESProviderExpression from zope.contentprovider.tales.
""" """
from zope.contentprovider import interfaces as cp_interfaces
from zope.contentprovider.tales import TALESProviderExpression
from zope.interface import implements
class Z2ProviderExpression(TALESProviderExpression): # BBB
"""This legacy provider was needed before to add acquisition wrappers to from zope.contentprovider.tales import TALESProviderExpression \
the providers in order for security to work.""" as Z2ProviderExpression
implements(cp_interfaces.ITALESProviderExpression)
...@@ -30,6 +30,7 @@ from zope.tales.pythonexpr import PythonExpr ...@@ -30,6 +30,7 @@ from zope.tales.pythonexpr import PythonExpr
from zope.traversing.interfaces import ITraversable from zope.traversing.interfaces import ITraversable
from zope.traversing.adapters import traversePathElement from zope.traversing.adapters import traversePathElement
from zope.proxy import removeAllProxies from zope.proxy import removeAllProxies
from zope.contentprovider.tales import TALESProviderExpression
import zope.app.pagetemplate.engine import zope.app.pagetemplate.engine
import OFS.interfaces import OFS.interfaces
...@@ -37,7 +38,6 @@ from MultiMapping import MultiMapping ...@@ -37,7 +38,6 @@ from MultiMapping import MultiMapping
from Acquisition import aq_base from Acquisition import aq_base
from zExceptions import NotFound, Unauthorized from zExceptions import NotFound, Unauthorized
from Products.Five.browser.providerexpression import Z2ProviderExpression
from Products.PageTemplates import ZRPythonExpr from Products.PageTemplates import ZRPythonExpr
from Products.PageTemplates.DeferExpr import LazyExpr from Products.PageTemplates.DeferExpr import LazyExpr
from Products.PageTemplates.GlobalTranslationService import getGlobalTranslationService from Products.PageTemplates.GlobalTranslationService import getGlobalTranslationService
...@@ -345,7 +345,7 @@ def createZopeEngine(): ...@@ -345,7 +345,7 @@ def createZopeEngine():
e.registerType('not', NotExpr) e.registerType('not', NotExpr)
e.registerType('defer', DeferExpr) e.registerType('defer', DeferExpr)
e.registerType('lazy', LazyExpr) e.registerType('lazy', LazyExpr)
e.registerType('provider', Z2ProviderExpression) e.registerType('provider', TALESProviderExpression)
e.registerBaseName('modules', SecureModuleImporter) e.registerBaseName('modules', SecureModuleImporter)
return e return e
......
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