[Zope-Checkins]
SVN: Zope/trunk/lib/python/Products/PageTemplates/Expressions.py
Removed even more deprecated stuff
Hanno Schlichting
plone at hannosch.info
Sat Apr 26 16:43:00 EDT 2008
Log message for revision 85777:
Removed even more deprecated stuff
Changed:
U Zope/trunk/lib/python/Products/PageTemplates/Expressions.py
-=-
Modified: Zope/trunk/lib/python/Products/PageTemplates/Expressions.py
===================================================================
--- Zope/trunk/lib/python/Products/PageTemplates/Expressions.py 2008-04-26 20:39:56 UTC (rev 85776)
+++ Zope/trunk/lib/python/Products/PageTemplates/Expressions.py 2008-04-26 20:42:59 UTC (rev 85777)
@@ -20,12 +20,11 @@
import logging
-from zope.component import getUtility
-from zope.component.interfaces import ComponentLookupError
+from zope.component import queryUtility
from zope.interface import implements
from zope.tales.tales import Context, Iterator
from zope.tales.expressions import PathExpr, StringExpr, NotExpr
-from zope.tales.expressions import DeferExpr, SubPathExpr, Undefs
+from zope.tales.expressions import DeferExpr, Undefs
from zope.tales.pythonexpr import PythonExpr
from zope.traversing.interfaces import ITraversable
from zope.traversing.adapters import traversePathElement
@@ -47,15 +46,6 @@
LOG = logging.getLogger('Expressions')
-# BBB 2005/05/01 -- remove after 12 months
-import zope.deprecation
-from zope.deprecation import deprecate
-zope.deprecation.deprecated(
- ("StringExpr", "NotExpr", "PathExpr", "SubPathExpr", "Undefs"),
- "Zope 2 uses the Zope 3 ZPT engine now. Expression types can be "
- "imported from zope.tales.expressions."
- )
-
# In Zope 2 traversal semantics, NotFound or Unauthorized (the Zope 2
# versions) indicate that traversal has failed. By default, Zope 3's
# TALES engine doesn't recognize them as such which is why we extend
@@ -223,9 +213,8 @@
# This should not be a problem since it won't change the old
# default behavior
- try:
- resolver = getUtility(IUnicodeEncodingConflictResolver)
- except ComponentLookupError:
+ resolver = queryUtility(IUnicodeEncodingConflictResolver)
+ if resolver is None:
return unicode(text)
try:
More information about the Zope-Checkins
mailing list