zope.interface.Interface on Zope 2.12 no longer implements the deprecated...

zope.interface.Interface on Zope 2.12 no longer implements the deprecated isImplementedBy method call that got renamed already on Zope 2.8. (approved by jm)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29888 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0929aad5
......@@ -274,7 +274,7 @@ class TestPredicates(TestPredicateMixIn):
from Products.ERP5Type.interfaces import IPredicate
from Products.ERP5Type.Document.Predicate import Predicate
predicate = self.createPredicate()
self.failUnless(IPredicate.isImplementedBy(predicate))
self.failUnless(IPredicate.providedBy(predicate))
from zope.interface.verify import verifyClass
verifyClass(IPredicate, Predicate)
......
......@@ -119,7 +119,7 @@ class Transform(SimpleItem):
# check this is a valid transform
if not hasattr(transform, '__class__'):
raise TransformException('Invalid transform : transform is not a class')
if not itransform.isImplementedBy(transform):
if not itransform.providedBy(transform):
raise TransformException('Invalid transform : itransform is not implemented by %s' % transform.__class__)
if not hasattr(transform, 'inputs'):
raise TransformException('Invalid transform : missing required "inputs" attribute')
......
......@@ -183,8 +183,8 @@ class TransformTool(UniqueObject, ActionProviderBase, Folder):
transform = path[0]
result = transform.convert(orig, data, context=context, usedby=usedby, **kwargs)
assert(idatastream.isImplementedBy(result),
'result doesn\'t implemented idatastream')
assert(idatastream.providedBy(result),
'result doesn\'t is not an idatastream')
self._setMetaData(result, transform)
# set cache if possible
......@@ -254,7 +254,7 @@ class TransformTool(UniqueObject, ActionProviderBase, Folder):
def _unwrap(self, data):
"""unwrap data from an icache"""
if idatastream.isImplementedBy(data):
if idatastream.providedBy(data):
data = data.getData()
return data
......@@ -482,7 +482,7 @@ class TransformTool(UniqueObject, ActionProviderBase, Folder):
# register non zope transform
module = str(transform.__module__)
transform = Transform(transform.name(), module, transform)
if not itransform.isImplementedBy(transform):
if not itransform.providedBy(transform):
raise TransformException('%s does not implement itransform' % transform)
name = transform.name()
__traceback_info__ = (name, transform)
......
......@@ -40,7 +40,7 @@ class TransformTest(ATSiteTestCase):
input.close()
data = datastream(self.transform.name())
res_data = self.transform.convert(orig, data, filename=filename)
self.assert_(idatastream.isImplementedBy(res_data))
self.assert_(idatastream.providedBy(res_data))
got = res_data.getData()
try:
output = open(output)
......
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