[Zope3-checkins] CVS: Zope3/src/zope/app/copypastemove -
__init__.py:1.2 interfaces.py:1.2 tests.py:1.2
Jim Fulton
jim at zope.com
Sat Mar 6 11:50:50 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/copypastemove
In directory cvs.zope.org:/tmp/cvs-serv11249/src/zope/app/copypastemove
Modified Files:
__init__.py interfaces.py tests.py
Log Message:
Converted most getAdapter calls to use interface calls instead.
=== Zope3/src/zope/app/copypastemove/__init__.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/copypastemove/__init__.py:1.1 Wed Mar 3 05:52:04 2004
+++ Zope3/src/zope/app/copypastemove/__init__.py Sat Mar 6 11:50:19 2004
@@ -179,7 +179,7 @@
# Nothing to do
return
- chooser = zapi.getAdapter(target, INameChooser)
+ chooser = INameChooser(target)
new_name = chooser.chooseName(new_name, obj)
# Can't store security proxies
@@ -368,7 +368,7 @@
checkObject(target, new_name, obj)
- chooser = zapi.getAdapter(target, INameChooser)
+ chooser = INameChooser(target)
new_name = chooser.chooseName(new_name, obj)
copy = removeAllProxies(obj)
@@ -432,7 +432,7 @@
object = container.get(oldid)
if object is None:
raise NotFoundError(container, oldid)
- mover = zapi.getAdapter(object, IObjectMover)
+ mover = IObjectMover(object)
if newid in container:
raise DuplicationError("name, %s, is already in use" % newid)
=== Zope3/src/zope/app/copypastemove/interfaces.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/copypastemove/interfaces.py:1.1 Wed Mar 3 05:52:04 2004
+++ Zope3/src/zope/app/copypastemove/interfaces.py Sat Mar 6 11:50:19 2004
@@ -19,7 +19,7 @@
from zope.interface import Interface
class IObjectMover(Interface):
- '''Use getAdapter(obj, IObjectMover) to move an object somewhere.'''
+ '''Use IObjectMover(obj) to move an object somewhere.'''
def moveTo(target, new_name=None):
'''Move this object to the target given.
=== Zope3/src/zope/app/copypastemove/tests.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/copypastemove/tests.py:1.1 Wed Mar 3 05:52:04 2004
+++ Zope3/src/zope/app/copypastemove/tests.py Sat Mar 6 11:50:19 2004
@@ -20,7 +20,6 @@
from zope.app.tests.placelesssetup import setUp, tearDown
from zope.app.tests import ztapi
-from zope.component import getAdapter
from zope.exceptions import NotFoundError, DuplicationError
from zope.app.traversing import traverse
from zope.app.services.tests.placefulsetup import PlacefulSetup
More information about the Zope3-Checkins
mailing list