[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/app/ Fix
up zope.app for new location of zope.traversing.
Philipp von Weitershausen
philikon at philikon.de
Wed Apr 5 07:59:45 EDT 2006
Log message for revision 66518:
Fix up zope.app for new location of zope.traversing.
(also sneaked in some minor cosmetics regarding zapi/ztapi)
Changed:
U Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/class_.py
U Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/introspector.py
U Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/introspector.zcml
U Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/tests.py
U Zope3/branches/jim-adapter/src/zope/app/apidoc/configure.zcml
U Zope3/branches/jim-adapter/src/zope/app/apidoc/ifacemodule/browser.txt
U Zope3/branches/jim-adapter/src/zope/app/apidoc/tests.py
U Zope3/branches/jim-adapter/src/zope/app/apidoc/utilitymodule/tests.py
U Zope3/branches/jim-adapter/src/zope/app/apidoc/zcmlmodule/tests.py
U Zope3/branches/jim-adapter/src/zope/app/applicationcontrol/applicationcontrol.py
U Zope3/branches/jim-adapter/src/zope/app/applicationcontrol/browser/configure.zcml
U Zope3/branches/jim-adapter/src/zope/app/appsetup/bootstrap.py
U Zope3/branches/jim-adapter/src/zope/app/appsetup/tests.py
U Zope3/branches/jim-adapter/src/zope/app/authentication/session.py
U Zope3/branches/jim-adapter/src/zope/app/basicskin/tests/sampleinterfaces.py
U Zope3/branches/jim-adapter/src/zope/app/browser.zcml
U Zope3/branches/jim-adapter/src/zope/app/cache/tests/test_ramcache.py
U Zope3/branches/jim-adapter/src/zope/app/component/back35.py
U Zope3/branches/jim-adapter/src/zope/app/component/browser/__init__.py
U Zope3/branches/jim-adapter/src/zope/app/component/browser/tests/test_editregistration.py
U Zope3/branches/jim-adapter/src/zope/app/component/browser/tests/test_registrationview.py
U Zope3/branches/jim-adapter/src/zope/app/component/configure.zcml
U Zope3/branches/jim-adapter/src/zope/app/component/site.py
U Zope3/branches/jim-adapter/src/zope/app/configure.zcml
U Zope3/branches/jim-adapter/src/zope/app/container/browser/contents.py
U Zope3/branches/jim-adapter/src/zope/app/container/browser/find.py
U Zope3/branches/jim-adapter/src/zope/app/container/browser/tests/test_adding.py
U Zope3/branches/jim-adapter/src/zope/app/container/browser/tests/test_contents.py
U Zope3/branches/jim-adapter/src/zope/app/container/configure.zcml
U Zope3/branches/jim-adapter/src/zope/app/container/tests/test_containertraversable.py
U Zope3/branches/jim-adapter/src/zope/app/container/tests/test_objectcopier.py
U Zope3/branches/jim-adapter/src/zope/app/container/tests/test_objectmover.py
U Zope3/branches/jim-adapter/src/zope/app/container/traversal.py
U Zope3/branches/jim-adapter/src/zope/app/dav/ftests/test_propfind.py
U Zope3/branches/jim-adapter/src/zope/app/dav/ftests/test_proppatch.py
U Zope3/branches/jim-adapter/src/zope/app/dav/tests/test_adapter.py
U Zope3/branches/jim-adapter/src/zope/app/dav/tests/test_mkcol.py
U Zope3/branches/jim-adapter/src/zope/app/dav/tests/test_propfind.py
U Zope3/branches/jim-adapter/src/zope/app/dav/tests/test_proppatch.py
U Zope3/branches/jim-adapter/src/zope/app/dependable/__init__.py
U Zope3/branches/jim-adapter/src/zope/app/dtmlpage/tests/test_dtmlpage.py
U Zope3/branches/jim-adapter/src/zope/app/folder/interfaces.py
U Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_booleanradiowidget.py
U Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_checkboxwidget.py
U Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_datetimewidget.py
U Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_editview.py
U Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_filewidget.py
U Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_floatwidget.py
U Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_intwidget.py
U Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_textareawidget.py
U Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_textwidget.py
U Zope3/branches/jim-adapter/src/zope/app/form/browser/tests/test_directives.py
U Zope3/branches/jim-adapter/src/zope/app/fssync/browser/__init__.py
U Zope3/branches/jim-adapter/src/zope/app/fssync/committer.py
U Zope3/branches/jim-adapter/src/zope/app/fssync/fspickle.py
U Zope3/branches/jim-adapter/src/zope/app/fssync/syncer.py
U Zope3/branches/jim-adapter/src/zope/app/fssync/tests/test_committer.py
U Zope3/branches/jim-adapter/src/zope/app/fssync/tests/test_fspickle.py
U Zope3/branches/jim-adapter/src/zope/app/homefolder/README.txt
U Zope3/branches/jim-adapter/src/zope/app/homefolder/browser.py
U Zope3/branches/jim-adapter/src/zope/app/homefolder/configure.zcml
U Zope3/branches/jim-adapter/src/zope/app/homefolder/tests.py
U Zope3/branches/jim-adapter/src/zope/app/location/configure.zcml
U Zope3/branches/jim-adapter/src/zope/app/location/pickling.py
U Zope3/branches/jim-adapter/src/zope/app/location/tests.py
U Zope3/branches/jim-adapter/src/zope/app/location/traversing.py
U Zope3/branches/jim-adapter/src/zope/app/locking/README.txt
U Zope3/branches/jim-adapter/src/zope/app/locking/adapter.py
U Zope3/branches/jim-adapter/src/zope/app/locking/tests.py
U Zope3/branches/jim-adapter/src/zope/app/onlinehelp/configure.zcml
U Zope3/branches/jim-adapter/src/zope/app/onlinehelp/onlinehelp.py
U Zope3/branches/jim-adapter/src/zope/app/onlinehelp/tests/test_helpdirectives.py
U Zope3/branches/jim-adapter/src/zope/app/onlinehelp/tests/test_onlinehelp.py
U Zope3/branches/jim-adapter/src/zope/app/pagetemplate/configure.zcml
U Zope3/branches/jim-adapter/src/zope/app/pagetemplate/engine.py
U Zope3/branches/jim-adapter/src/zope/app/pagetemplate/tests/test_directives.py
U Zope3/branches/jim-adapter/src/zope/app/pagetemplate/tests/test_talesapi.py
U Zope3/branches/jim-adapter/src/zope/app/pagetemplate/urlquote.py
U Zope3/branches/jim-adapter/src/zope/app/pluggableauth/__init__.py
U Zope3/branches/jim-adapter/src/zope/app/preference/README.txt
U Zope3/branches/jim-adapter/src/zope/app/preference/configure.zcml
U Zope3/branches/jim-adapter/src/zope/app/preference/default.py
U Zope3/branches/jim-adapter/src/zope/app/preference/preference.py
U Zope3/branches/jim-adapter/src/zope/app/publication/publicationtraverse.py
U Zope3/branches/jim-adapter/src/zope/app/publication/tests/test_zopepublication.py
U Zope3/branches/jim-adapter/src/zope/app/publication/zopepublication.py
U Zope3/branches/jim-adapter/src/zope/app/publisher/browser/icon.py
U Zope3/branches/jim-adapter/src/zope/app/publisher/browser/resource.py
U Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/support.py
U Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/test_directives.py
U Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/test_icondirective.py
U Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/test_pagetemplateresource.py
U Zope3/branches/jim-adapter/src/zope/app/pythonpage/tests.py
U Zope3/branches/jim-adapter/src/zope/app/recorder/tests.py
U Zope3/branches/jim-adapter/src/zope/app/rotterdam/tests/test_xmlnavigationviews.py
U Zope3/branches/jim-adapter/src/zope/app/rotterdam/xmlobject.py
U Zope3/branches/jim-adapter/src/zope/app/schema/browser/configure.zcml
U Zope3/branches/jim-adapter/src/zope/app/schema/browser/traversal.py
U Zope3/branches/jim-adapter/src/zope/app/schema/tests/test_interfaceutility.py
U Zope3/branches/jim-adapter/src/zope/app/session/configure.zcml
U Zope3/branches/jim-adapter/src/zope/app/sqlscript/tests/test_sqlscript.py
U Zope3/branches/jim-adapter/src/zope/app/testing/placelesssetup.py
U Zope3/branches/jim-adapter/src/zope/app/testing/setup.py
U Zope3/branches/jim-adapter/src/zope/app/testing/ztapi.py
U Zope3/branches/jim-adapter/src/zope/app/tree/browser/cookie.py
U Zope3/branches/jim-adapter/src/zope/app/tree/tests/test_adapters.py
U Zope3/branches/jim-adapter/src/zope/app/undo/__init__.py
U Zope3/branches/jim-adapter/src/zope/app/undo/tests/test_zodbundomanager.py
U Zope3/branches/jim-adapter/src/zope/app/versioncontrol/README.txt
U Zope3/branches/jim-adapter/src/zope/app/versioncontrol/tests.py
U Zope3/branches/jim-adapter/src/zope/app/workflow/browser/definition.py
U Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/instance.py
U Zope3/branches/jim-adapter/src/zope/app/zapi/__init__.py
U Zope3/branches/jim-adapter/src/zope/app/zapi/interfaces.py
U Zope3/branches/jim-adapter/src/zope/app/zptpage/tests/test_zptpage.py
-=-
Modified: Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/class_.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/class_.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/class_.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -21,13 +21,13 @@
import types
from zope.proxy import removeAllProxies
from zope.security.proxy import removeSecurityProxy
+from zope.traversing.interfaces import TraversalError
from zope.app import zapi
from zope.app.apidoc.interfaces import IDocumentationModule
from zope.app.apidoc.utilities import getPythonPath, getPermissionIds
from zope.app.apidoc.utilities import renderText, getFunctionSignature
from zope.app.apidoc.utilities import isReferencable
-from zope.app.traversing.interfaces import TraversalError
def getTypeLink(type):
Modified: Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/introspector.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/introspector.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/introspector.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -23,11 +23,10 @@
import zope.interface
import zope.security.proxy
from zope.interface import directlyProvidedBy, directlyProvides
+from zope.traversing.interfaces import IPhysicallyLocatable, IContainmentRoot
from zope.app import zapi, apidoc, annotation
from zope.app.location import location
from zope.app.publisher.browser import BrowserView
-from zope.app.traversing.interfaces import IPhysicallyLocatable
-from zope.app.traversing.interfaces import IContainmentRoot
def getTypeLink(type):
Modified: Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/introspector.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/introspector.zcml 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/introspector.zcml 2006-04-05 11:59:36 UTC (rev 66518)
@@ -6,25 +6,25 @@
<!-- ++annotations++ Namespace -->
<zope:view
name="annotations" type="*"
- provides="zope.app.traversing.interfaces.ITraversable" for="*"
+ provides="zope.traversing.interfaces.ITraversable" for="*"
factory=".introspector.annotationsNamespace"
/>
<zope:adapter
name="annotations"
- provides="zope.app.traversing.interfaces.ITraversable" for="*"
+ provides="zope.traversing.interfaces.ITraversable" for="*"
factory=".introspector.annotationsNamespace"
/>
<!-- ISequence ++items++ Namespace -->
<zope:view
name="items" type="*"
- provides="zope.app.traversing.interfaces.ITraversable"
+ provides="zope.traversing.interfaces.ITraversable"
for="zope.interface.common.sequence.IMinimalSequence"
factory=".introspector.sequenceItemsNamespace"
/>
<zope:adapter
name="items"
- provides="zope.app.traversing.interfaces.ITraversable"
+ provides="zope.traversing.interfaces.ITraversable"
for="zope.interface.common.sequence.IMinimalSequence"
factory=".introspector.sequenceItemsNamespace"
/>
@@ -32,13 +32,13 @@
<!-- IMapping ++items++ Namespace -->
<zope:view
name="items" type="*"
- provides="zope.app.traversing.interfaces.ITraversable"
+ provides="zope.traversing.interfaces.ITraversable"
for="zope.interface.common.mapping.IItemMapping"
factory=".introspector.mappingItemsNamespace"
/>
<zope:adapter
name="items"
- provides="zope.app.traversing.interfaces.ITraversable"
+ provides="zope.traversing.interfaces.ITraversable"
for="zope.interface.common.mapping.IItemMapping"
factory=".introspector.mappingItemsNamespace"
/>
Modified: Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/tests.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/tests.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/apidoc/codemodule/browser/tests.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -21,6 +21,7 @@
from zope.configuration import xmlconfig
from zope.interface import directlyProvides, implements
from zope.testing import doctest, doctestunit
+from zope.traversing.interfaces import IContainmentRoot
import zope.app
import zope.app.appsetup.appsetup
@@ -28,7 +29,6 @@
from zope.app.renderer.rest import IReStructuredTextSource
from zope.app.renderer.rest import ReStructuredTextToHTMLRenderer
from zope.app.testing import placelesssetup, setup, ztapi
-from zope.app.traversing.interfaces import IContainmentRoot
from zope.app.apidoc.interfaces import IDocumentationModule
from zope.app.apidoc.codemodule.interfaces import IAPIDocRootModule
@@ -85,13 +85,13 @@
# Register ++apidoc++ namespace
from zope.app.apidoc.apidoc import apidocNamespace
- from zope.app.traversing.interfaces import ITraversable
+ from zope.traversing.interfaces import ITraversable
ztapi.provideAdapter(None, ITraversable, apidocNamespace, name="apidoc")
ztapi.provideView(None, None, ITraversable, "apidoc", apidocNamespace)
# Register ++apidoc++ namespace
- from zope.app.traversing.namespace import view
- from zope.app.traversing.interfaces import ITraversable
+ from zope.traversing.namespace import view
+ from zope.traversing.interfaces import ITraversable
ztapi.provideAdapter(None, ITraversable, view, name="view")
ztapi.provideView(None, None, ITraversable, "view", view)
Modified: Zope3/branches/jim-adapter/src/zope/app/apidoc/configure.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/apidoc/configure.zcml 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/apidoc/configure.zcml 2006-04-05 11:59:36 UTC (rev 66518)
@@ -19,12 +19,12 @@
<view
name="apidoc" type="*"
- provides="zope.app.traversing.interfaces.ITraversable" for="*"
+ provides="zope.traversing.interfaces.ITraversable" for="*"
factory=".apidoc.apidocNamespace"
/>
<adapter
name="apidoc"
- provides="zope.app.traversing.interfaces.ITraversable" for="*"
+ provides="zope.traversing.interfaces.ITraversable" for="*"
factory=".apidoc.apidocNamespace"
/>
Modified: Zope3/branches/jim-adapter/src/zope/app/apidoc/ifacemodule/browser.txt
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/apidoc/ifacemodule/browser.txt 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/apidoc/ifacemodule/browser.txt 2006-04-05 11:59:36 UTC (rev 66518)
@@ -314,43 +314,43 @@
'factory': 'zope.app.location.traversing.LocationPhysicallyLocatable',
'factory_url': 'zope/app/location/traversing/LocationPhysicallyLocatable',
'name': '',
- 'provided': {'module': 'zope.app.traversing.interfaces',
+ 'provided': {'module': 'zope.traversing.interfaces',
'name': 'IPhysicallyLocatable'},
'required': [{'module': 'zope.interface',
'name': 'Interface'}],
'zcml': None},
{'doc': u'',
- 'factory': 'zope.app.traversing.adapters.DefaultTraversable',
- 'factory_url': 'zope/app/traversing/adapters/DefaultTraversable',
+ 'factory': 'zope.traversing.adapters.DefaultTraversable',
+ 'factory_url': 'zope/traversing/adapters/DefaultTraversable',
'name': '',
- 'provided': {'module': 'zope.app.traversing.interfaces',
+ 'provided': {'module': 'zope.traversing.interfaces',
'name': 'ITraversable'},
'required': [{'module': 'zope.interface',
'name': 'Interface'}],
'zcml': None},
{'doc': u'',
- 'factory': 'zope.app.traversing.adapters.Traverser',
- 'factory_url': 'zope/app/traversing/adapters/Traverser',
+ 'factory': 'zope.traversing.adapters.Traverser',
+ 'factory_url': 'zope/traversing/adapters/Traverser',
'name': '',
- 'provided': {'module': 'zope.app.traversing.interfaces',
+ 'provided': {'module': 'zope.traversing.interfaces',
'name': 'ITraverser'},
'required': [{'module': 'zope.interface',
'name': 'Interface'}],
'zcml': None},
{'doc': u'',
- 'factory': 'zope.app.traversing.namespace.etc',
- 'factory_url': 'zope/app/traversing/namespace/etc',
+ 'factory': 'zope.traversing.namespace.etc',
+ 'factory_url': 'zope/traversing/namespace/etc',
'name': 'etc',
- 'provided': {'module': 'zope.app.traversing.interfaces',
+ 'provided': {'module': 'zope.traversing.interfaces',
'name': 'ITraversable'},
'required': [{'module': 'zope.interface',
'name': 'Interface'}],
'zcml': None},
{'doc': u'',
- 'factory': 'zope.app.traversing.namespace.etc',
- 'factory_url': 'zope/app/traversing/namespace/etc',
+ 'factory': 'zope.traversing.namespace.etc',
+ 'factory_url': 'zope/traversing/namespace/etc',
'name': 'etc',
- 'provided': {'module': 'zope.app.traversing.interfaces',
+ 'provided': {'module': 'zope.traversing.interfaces',
'name': 'ITraversable'},
'required': [{'module': 'zope.interface',
'name': 'Interface'},
@@ -358,10 +358,10 @@
'name': 'Interface'}],
'zcml': None},
{'doc': u'',
- 'factory': 'zope.app.traversing.namespace.etc',
- 'factory_url': 'zope/app/traversing/namespace/etc',
+ 'factory': 'zope.traversing.namespace.etc',
+ 'factory_url': 'zope/traversing/namespace/etc',
'name': 'etc',
- 'provided': {'module': 'zope.app.traversing.interfaces',
+ 'provided': {'module': 'zope.traversing.interfaces',
'name': 'ITraversable'},
'required': [{'module': 'zope.interface',
'name': 'Interface'},
@@ -369,10 +369,10 @@
'name': 'Interface'}],
'zcml': None},
{'doc': u'',
- 'factory': 'zope.app.traversing.namespace.etc',
- 'factory_url': 'zope/app/traversing/namespace/etc',
+ 'factory': 'zope.traversing.namespace.etc',
+ 'factory_url': 'zope/traversing/namespace/etc',
'name': 'etc',
- 'provided': {'module': 'zope.app.traversing.interfaces',
+ 'provided': {'module': 'zope.traversing.interfaces',
'name': 'ITraversable'},
'required': [{'module': 'zope.interface',
'name': 'Interface'},
@@ -380,10 +380,10 @@
'name': 'Interface'}],
'zcml': None},
{'doc': u'',
- 'factory': 'zope.app.traversing.namespace.etc',
- 'factory_url': 'zope/app/traversing/namespace/etc',
+ 'factory': 'zope.traversing.namespace.etc',
+ 'factory_url': 'zope/traversing/namespace/etc',
'name': 'etc',
- 'provided': {'module': 'zope.app.traversing.interfaces',
+ 'provided': {'module': 'zope.traversing.interfaces',
'name': 'ITraversable'},
'required': [{'module': 'zope.interface',
'name': 'Interface'},
Modified: Zope3/branches/jim-adapter/src/zope/app/apidoc/tests.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/apidoc/tests.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/apidoc/tests.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -23,8 +23,8 @@
from zope.component.interfaces import IFactory
from zope.interface import implements
from zope.testing import doctest, doctestunit
+from zope.traversing.interfaces import IContainmentRoot
-from zope.app.traversing.interfaces import IContainmentRoot
from zope.app.location import LocationProxy
from zope.app.testing import placelesssetup, ztapi, setup
Modified: Zope3/branches/jim-adapter/src/zope/app/apidoc/utilitymodule/tests.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/apidoc/utilitymodule/tests.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/apidoc/utilitymodule/tests.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -17,14 +17,13 @@
"""
import unittest
from zope.testing import doctest, doctestunit
+from zope.traversing.interfaces import IPhysicallyLocatable
from zope.app.location.traversing import LocationPhysicallyLocatable
from zope.app.testing import placelesssetup, ztapi
-from zope.app.traversing.interfaces import IPhysicallyLocatable
from zope.app.tree.interfaces import IUniqueId
from zope.app.tree.adapters import LocationUniqueId
-
def setUp(test):
placelesssetup.setUp()
Modified: Zope3/branches/jim-adapter/src/zope/app/apidoc/zcmlmodule/tests.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/apidoc/zcmlmodule/tests.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/apidoc/zcmlmodule/tests.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -19,15 +19,15 @@
import unittest
from zope.configuration import xmlconfig
from zope.testing import doctest, doctestunit
-from zope.app.testing import placelesssetup, ztapi
-from zope.app.apidoc.tests import Root
+from zope.traversing.interfaces import IPhysicallyLocatable
import zope.app.appsetup.appsetup
from zope.app.location.traversing import LocationPhysicallyLocatable
-from zope.app.traversing.interfaces import IPhysicallyLocatable
from zope.app.tree.interfaces import IUniqueId
from zope.app.tree.adapters import LocationUniqueId
+from zope.app.testing import placelesssetup, ztapi
+from zope.app.apidoc.tests import Root
from zope.app.apidoc.zcmlmodule import Namespace, Directive
from zope.app.apidoc.zcmlmodule import ZCMLModule
from zope.app.apidoc.tests import Root
Modified: Zope3/branches/jim-adapter/src/zope/app/applicationcontrol/applicationcontrol.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/applicationcontrol/applicationcontrol.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/applicationcontrol/applicationcontrol.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -21,7 +21,7 @@
from zope.security.checker import ProxyFactory, NamesChecker
import time
import zope.interface
-import zope.app.traversing.interfaces
+import zope.traversing.interfaces
class ApplicationControl(Location):
@@ -37,7 +37,7 @@
applicationControllerRoot = Location()
zope.interface.directlyProvides(
applicationControllerRoot,
- zope.app.traversing.interfaces.IContainmentRoot,
+ zope.traversing.interfaces.IContainmentRoot,
)
applicationControllerRoot = ProxyFactory(applicationControllerRoot,
NamesChecker("__class__"))
Modified: Zope3/branches/jim-adapter/src/zope/app/applicationcontrol/browser/configure.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/applicationcontrol/browser/configure.zcml 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/applicationcontrol/browser/configure.zcml 2006-04-05 11:59:36 UTC (rev 66518)
@@ -49,7 +49,7 @@
<!-- add a action tab to the root folder for navigation -->
<menuItem
menu="zmi_actions"
- for="zope.app.traversing.interfaces.IContainmentRoot"
+ for="zope.traversing.interfaces.IContainmentRoot"
title="Manage Process"
action="++etc++process/index.html" />
Modified: Zope3/branches/jim-adapter/src/zope/app/appsetup/bootstrap.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/appsetup/bootstrap.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/appsetup/bootstrap.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -26,13 +26,13 @@
import zope.event
from zope.security.management import getSecurityPolicy
from zope.security.simplepolicies import ParanoidSecurityPolicy
+from zope.traversing.api import traverse
from zope.app.component.interfaces import ISite
from zope.app.component import site
from zope.app.container.interfaces import INameChooser
from zope.app.folder import rootFolder
from zope.app.publication.zopepublication import ZopePublication
-from zope.app.traversing.api import traverse
from zope.app.appsetup import interfaces
def ensureObject(root_folder, object_name, object_type, object_factory, asObject=False):
Modified: Zope3/branches/jim-adapter/src/zope/app/appsetup/tests.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/appsetup/tests.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/appsetup/tests.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -17,9 +17,10 @@
"""
import unittest
import transaction
-from zope.testing import doctest
from ZODB.tests.util import DB
+from zope.testing import doctest
+from zope.traversing.api import traverse
from zope.app import zapi
from zope.app.component import hooks
@@ -30,7 +31,6 @@
from zope.app.folder.interfaces import IRootFolder
from zope.app.publication.zopepublication import ZopePublication
from zope.app.component.site import LocalSiteManager
-from zope.app.traversing.api import traverse
from zope.app.appsetup.bootstrap import bootStrapSubscriber
from zope.app.appsetup.bootstrap import getInformationFromEvent, \
Modified: Zope3/branches/jim-adapter/src/zope/app/authentication/session.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/authentication/session.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/authentication/session.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -23,15 +23,13 @@
from zope.interface import implements, Interface
from zope.schema import TextLine
from zope.publisher.interfaces.http import IHTTPRequest
+from zope.traversing.browser.absoluteurl import absoluteURL
from zope.app.component import hooks
from zope.app.container.contained import Contained
from zope.app.session.interfaces import ISession
-from zope.app.traversing.browser.absoluteurl import absoluteURL
-
from zope.app.authentication.interfaces import ICredentialsPlugin
-
class ISessionCredentials(Interface):
""" Interface for storing and accessing credentials in a session.
Modified: Zope3/branches/jim-adapter/src/zope/app/basicskin/tests/sampleinterfaces.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/basicskin/tests/sampleinterfaces.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/basicskin/tests/sampleinterfaces.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -16,9 +16,8 @@
$Id$
"""
from zope.interface import Interface, implements
+from zope.traversing.interfaces import ITraverser
-from zope.app.traversing.interfaces import ITraverser
-
class FakeTraverser(object):
implements(ITraverser)
Modified: Zope3/branches/jim-adapter/src/zope/app/browser.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/browser.zcml 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/browser.zcml 2006-04-05 11:59:36 UTC (rev 66518)
@@ -6,7 +6,7 @@
<browser:defaultSkin name="Rotterdam" />
<include package="zope.app.exception.browser" />
- <include package="zope.app.traversing.browser" />
+ <include package="zope.traversing.browser" />
<include package="zope.app.security.browser" />
<include package="zope.app.container.browser" />
Modified: Zope3/branches/jim-adapter/src/zope/app/cache/tests/test_ramcache.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/cache/tests/test_ramcache.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/cache/tests/test_ramcache.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -20,12 +20,12 @@
from zope.interface.verify import verifyClass, verifyObject
from zope.interface import implements
+from zope.traversing.interfaces import IPhysicallyLocatable
from zope.app.cache.ram import RAMCache
from zope.app.cache.tests.test_icache import BaseICacheTest
from zope.app.cache.interfaces import ICache
from zope.app.cache.interfaces.ram import IRAMCache
-from zope.app.traversing.interfaces import IPhysicallyLocatable
from zope.app.testing.placelesssetup import PlacelessSetup
class Locatable(object):
Modified: Zope3/branches/jim-adapter/src/zope/app/component/back35.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/back35.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/component/back35.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -15,35 +15,31 @@
$Id$
"""
-
from persistent import Persistent
import zope.event
-
-from zope import interface, schema
import zope.interface.adapter
import zope.component.interfaces
import zope.deprecation
-import zope.app.component.interfaces.registration
import zope.schema.vocabulary
-from zope.app.i18n import ZopeMessageFactory as _
-import zope.app.container.interfaces
-import zope.app.container.constraints
+from zope import interface, schema
+from zope.traversing.interfaces import TraversalError
from zope.interface import implements
from zope.security.checker import InterfaceChecker, CheckerPublic
from zope.security.proxy import Proxy, removeSecurityProxy
+
+import zope.app.component.registration
+import zope.app.component.interfaces.registration
+import zope.app.container.interfaces
+import zope.app.container.constraints
from zope.app import zapi
+from zope.app.i18n import ZopeMessageFactory as _
from zope.app.component.interfaces import registration as interfaces
from zope.app.container.btree import BTreeContainer
from zope.app.container.contained import Contained
from zope.app.event import objectevent
-from zope.app.traversing.interfaces import TraversalError
from zope.app.i18n import ZopeMessageFactory as _
-import zope.app.component.registration
-from zope.app import zapi
-
-
InactiveStatus = _('Inactive')
ActiveStatus = _('Active')
Modified: Zope3/branches/jim-adapter/src/zope/app/component/browser/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/browser/__init__.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/component/browser/__init__.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -116,7 +116,7 @@
def addSiteManager(self):
"""Convert a possible site to a site
- >>> from zope.app.traversing.interfaces import IContainmentRoot
+ >>> from zope.traversing.interfaces import IContainmentRoot
>>> from zope.interface import implements
>>> class PossibleSite(object):
Modified: Zope3/branches/jim-adapter/src/zope/app/component/browser/tests/test_editregistration.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/browser/tests/test_editregistration.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/component/browser/tests/test_editregistration.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -15,17 +15,19 @@
$Id$
"""
+from unittest import TestCase, TestSuite, main, makeSuite
+
+from zope.traversing.interfaces import IContainmentRoot
+from zope.interface import Interface, implements
+from zope.publisher.browser import TestRequest
+
from zope.app.testing import ztapi
-from unittest import TestCase, TestSuite, main, makeSuite
from zope.app.component.browser.registration import EditRegistration
from zope.app.container.interfaces import IContainer
from zope.app.container.interfaces import IObjectRemovedEvent
from zope.app.component.interfaces.registration import ActiveStatus
-from zope.app.traversing.interfaces import IContainmentRoot
from zope.app.site.tests.placefulsetup import PlacefulSetup
-from zope.interface import Interface, implements
from zope.app.publisher.browser import BrowserView
-from zope.publisher.browser import TestRequest
from zope.app.container.contained import Contained
class Container(dict):
Modified: Zope3/branches/jim-adapter/src/zope/app/component/browser/tests/test_registrationview.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/browser/tests/test_registrationview.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/component/browser/tests/test_registrationview.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -20,9 +20,9 @@
from zope.interface import implements
from zope.publisher.browser import TestRequest
from zope.testing import doctest, doctestunit
+from zope.traversing.interfaces import IContainmentRoot
+
from zope.app.testing import setup
-from zope.app.traversing.interfaces import IContainmentRoot
-
from zope.app.component.interfaces.registration import IRegistered
from zope.app.component.interfaces.registration import InactiveStatus
from zope.app.component.interfaces.registration import ActiveStatus
Modified: Zope3/branches/jim-adapter/src/zope/app/component/configure.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/configure.zcml 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/component/configure.zcml 2006-04-05 11:59:36 UTC (rev 66518)
@@ -25,13 +25,13 @@
<view
name="registrations" type="*"
for=".interfaces.registration.IRegisterableContainer"
- provides="zope.app.traversing.interfaces.ITraversable"
+ provides="zope.traversing.interfaces.ITraversable"
factory=".registration.RegistrationManagerNamespace"
/>
<adapter
name="registrations"
for=".interfaces.registration.IRegisterableContainer"
- provides="zope.app.traversing.interfaces.ITraversable"
+ provides="zope.traversing.interfaces.ITraversable"
factory=".registration.RegistrationManagerNamespace"
/>
Modified: Zope3/branches/jim-adapter/src/zope/app/component/site.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/site.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/component/site.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -27,26 +27,28 @@
import zope.event
import zope.interface
+import zope.component
import zope.component.registry
import zope.component.persistentregistry
+import zope.component.interfaces
+import zope.traversing.api
import zope.deprecation
import zope.deferredimport
from zope.component.interfaces import ComponentLookupError
-import zope.component.interfaces
+from zope.traversing.interfaces import IContainmentRoot
from zope.security.proxy import removeSecurityProxy
+import zope.app.location
+import zope.app.component.back35
from zope.app import zapi
from zope.app.component import interfaces
from zope.app.component import registration
from zope.app.component.hooks import setSite
from zope.app.container.btree import BTreeContainer
from zope.app.container.contained import Contained
-import zope.app.location
from zope.app.event import objectevent
from zope.app.filerepresentation.interfaces import IDirectoryFactory
-from zope.app.traversing.interfaces import IContainmentRoot
-import zope.app.component.back35
##############################################################################
# from zope.app.module import resolve
@@ -126,7 +128,7 @@
return None
try:
- site = zapi.getParent(site)
+ site = zope.traversing.api.getParent(site)
except TypeError:
# there was not enough context; probably run from a test
return None
@@ -182,7 +184,7 @@
next = _findNextSiteManager(site)
if next is None:
- next = zapi.getGlobalSiteManager()
+ next = zope.component.getGlobalSiteManager()
self.__bases__ = (next, )
# Setup default site management folder
@@ -387,7 +389,7 @@
if current is None:
# It is not a location or has no parent, so we return the global
# site manager
- return zapi.getGlobalSiteManager()
+ return zope.component.getGlobalSiteManager()
def changeSiteConfigurationAfterMove(site, event):
"""After a site is moved, its site manager links have to be updated."""
Modified: Zope3/branches/jim-adapter/src/zope/app/configure.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/configure.zcml 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/configure.zcml 2006-04-05 11:59:36 UTC (rev 66518)
@@ -35,7 +35,7 @@
<include package="zope.app.publication" />
- <include package="zope.app.traversing" />
+ <include package="zope.traversing" />
<include package="zope.app.pagetemplate" />
<include package=".generations" />
<include package=".zapi" />
Modified: Zope3/branches/jim-adapter/src/zope/app/container/browser/contents.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/container/browser/contents.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/container/browser/contents.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -23,9 +23,9 @@
from zope.security.interfaces import Unauthorized
from zope.security import canWrite
from zope.size.interfaces import ISized
+from zope.traversing.interfaces import TraversalError
from zope.app import zapi
-from zope.app.traversing.interfaces import TraversalError
from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
from zope.app.publisher.browser import BrowserView
from zope.app.i18n import ZopeMessageFactory as _
Modified: Zope3/branches/jim-adapter/src/zope/app/container/browser/find.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/container/browser/find.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/container/browser/find.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -17,10 +17,11 @@
"""
__docformat__ = 'restructuredtext'
-from zope.app import zapi
+from zope.traversing.api import getName
+from zope.traversing.browser.absoluteurl import absoluteURL
+
from zope.app.container.find import SimpleIdFindFilter
from zope.app.container.interfaces import IFind
-from zope.app.traversing.api import getName
from zope.app.publisher.browser import BrowserView
# Very simple implementation right now
@@ -36,6 +37,6 @@
request = self.request
result = []
for object in finder.find([SimpleIdFindFilter(ids)]):
- url = zapi.absoluteURL(object, request)
+ url = absoluteURL(object, request)
result.append({ 'id': getName(object), 'url': url})
return result
Modified: Zope3/branches/jim-adapter/src/zope/app/container/browser/tests/test_adding.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/container/browser/tests/test_adding.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/container/browser/tests/test_adding.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -27,13 +27,13 @@
from zope.security.interfaces import ForbiddenAttribute
from zope.testing.doctestunit import DocTestSuite
from zope.exceptions.interfaces import UserError
+from zope.traversing.browser import AbsoluteURL
+from zope.traversing.browser.interfaces import IAbsoluteURL
+from zope.traversing.interfaces import IContainmentRoot
from zope.app import zapi
from zope.app.testing import ztapi
from zope.app.testing.placelesssetup import PlacelessSetup, setUp, tearDown
-from zope.app.traversing.browser import AbsoluteURL
-from zope.app.traversing.browser.interfaces import IAbsoluteURL
-from zope.app.traversing.interfaces import IContainmentRoot
from zope.app.publisher.browser import BrowserView
from zope.app.publisher.interfaces.browser import AddMenu
from zope.app.publisher.interfaces.browser import IMenuItemType, IBrowserMenu
Modified: Zope3/branches/jim-adapter/src/zope/app/container/browser/tests/test_contents.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/container/browser/tests/test_contents.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/container/browser/tests/test_contents.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -19,6 +19,7 @@
from zope.interface import Interface, implements
from zope.security import checker
+from zope.traversing.api import traverse
from zope.app.annotation.interfaces import IAnnotations
from zope.app.component.testing import PlacefulSetup
@@ -32,7 +33,6 @@
from zope.app.principalannotation import PrincipalAnnotationUtility
from zope.app.principalannotation.interfaces import IPrincipalAnnotationUtility
from zope.app.testing import ztapi
-from zope.app.traversing.api import traverse
from zope.app.container.interfaces import IContainer, IContained
Modified: Zope3/branches/jim-adapter/src/zope/app/container/configure.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/container/configure.zcml 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/container/configure.zcml 2006-04-05 11:59:36 UTC (rev 66518)
@@ -26,7 +26,7 @@
<adapter
factory="zope.app.container.traversal.ContainerTraversable"
- provides="zope.app.traversing.interfaces.ITraversable"
+ provides="zope.traversing.interfaces.ITraversable"
for="zope.app.container.interfaces.IReadContainer"
/>
Modified: Zope3/branches/jim-adapter/src/zope/app/container/tests/test_containertraversable.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/container/tests/test_containertraversable.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/container/tests/test_containertraversable.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -16,12 +16,12 @@
$Id$
"""
import unittest
-from zope.app.container.traversal import ContainerTraversable
-from zope.app.traversing.interfaces import TraversalError
-from zope.app.container.interfaces import IContainer
from zope.testing.cleanup import CleanUp
from zope.interface import implements
+from zope.traversing.interfaces import TraversalError
+from zope.app.container.traversal import ContainerTraversable
+from zope.app.container.interfaces import IContainer
class Container(object):
Modified: Zope3/branches/jim-adapter/src/zope/app/container/tests/test_objectcopier.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/container/tests/test_objectcopier.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/container/tests/test_objectcopier.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -17,6 +17,7 @@
"""
from unittest import TestCase, TestSuite, main, makeSuite
from zope.testing import doctest
+from zope.traversing.api import traverse
from zope.app.event.tests.placelesssetup import getEvents
from zope.app.event.tests.placelesssetup import clearEvents
@@ -25,7 +26,6 @@
from zope.app.copypastemove.interfaces import IObjectCopier
from zope.app.testing import ztapi
from zope.app.testing import setup
-from zope.app.traversing.api import traverse
from zope.app.folder import Folder
class File(object):
Modified: Zope3/branches/jim-adapter/src/zope/app/container/tests/test_objectmover.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/container/tests/test_objectmover.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/container/tests/test_objectmover.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -17,6 +17,7 @@
"""
from unittest import TestCase, TestSuite, main, makeSuite
from zope.testing import doctest
+from zope.traversing.api import traverse
from zope.app.event.tests.placelesssetup import getEvents
from zope.app.event.tests.placelesssetup import clearEvents
@@ -25,7 +26,6 @@
from zope.app.copypastemove.interfaces import IObjectMover
from zope.app.testing import ztapi
from zope.app.testing import setup
-from zope.app.traversing.api import traverse
from zope.app.folder import Folder
class File(object):
Modified: Zope3/branches/jim-adapter/src/zope/app/container/traversal.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/container/traversal.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/container/traversal.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -18,7 +18,8 @@
__docformat__ = 'restructuredtext'
from zope.interface import implements
-from zope.app.traversing.interfaces import TraversalError
+from zope.component import queryMultiAdapter
+from zope.traversing.interfaces import TraversalError, ITraversable
from zope.publisher.interfaces.browser import IBrowserPublisher
from zope.publisher.interfaces.xmlrpc import IXMLRPCPublisher
from zope.publisher.interfaces import NotFound
@@ -26,7 +27,6 @@
from zope.app import zapi
from zope.app.container.interfaces import ISimpleReadContainer, IItemContainer
from zope.app.container.interfaces import IReadContainer
-from zope.app.traversing.interfaces import ITraversable
# Note that the next two classes are included here because they
# can be used for multiple view types.
@@ -45,7 +45,7 @@
"""See zope.publisher.interfaces.IPublishTraverse"""
subob = self.context.get(name, None)
if subob is None:
- view = zapi.queryMultiAdapter((self.context, request), name=name)
+ view = queryMultiAdapter((self.context, request), name=name)
if view is not None:
return view
@@ -71,7 +71,7 @@
try:
return self.context[name]
except KeyError:
- view = zapi.queryMultiAdapter((self.context, request), name=name)
+ view = queryMultiAdapter((self.context, request), name=name)
if view is not None:
return view
Modified: Zope3/branches/jim-adapter/src/zope/app/dav/ftests/test_propfind.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/dav/ftests/test_propfind.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/dav/ftests/test_propfind.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -16,14 +16,14 @@
$Id$
"""
import unittest
+import transaction
from datetime import datetime
-import transaction
from zope.pagetemplate.tests.util import normalize_xml
+from zope.traversing.api import traverse
+from zope.app.dublincore.interfaces import IZopeDublinCore
from zope.app.dav.ftests.dav import DAVTestCase
-from zope.app.dublincore.interfaces import IZopeDublinCore
from zope.app.dav.opaquenamespaces import IDAVOpaqueNamespaces
-from zope.app.traversing.api import traverse
class TestPROPFIND(DAVTestCase):
Modified: Zope3/branches/jim-adapter/src/zope/app/dav/ftests/test_proppatch.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/dav/ftests/test_proppatch.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/dav/ftests/test_proppatch.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -19,11 +19,11 @@
import transaction
from zope.pagetemplate.tests.util import normalize_xml
from zope.publisher.http import status_reasons
+from zope.traversing.api import traverse
+from zope.app.dublincore.interfaces import IZopeDublinCore
from zope.app.dav.ftests.dav import DAVTestCase
-from zope.app.dublincore.interfaces import IZopeDublinCore
from zope.app.dav.opaquenamespaces import IDAVOpaqueNamespaces
-from zope.app.traversing.api import traverse
class TestPROPPATCH(DAVTestCase):
Modified: Zope3/branches/jim-adapter/src/zope/app/dav/tests/test_adapter.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/dav/tests/test_adapter.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/dav/tests/test_adapter.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -16,10 +16,11 @@
$Id$
"""
import unittest
-from zope.testing.doctestunit import DocTestSuite
+from zope.testing.doctestunit import DocTestSuite
from zope.interface import Interface, implements
from zope.size.interfaces import ISized
+from zope.traversing.interfaces import IPhysicallyLocatable
from zope.app.testing import ztapi
from zope.app.testing.placelesssetup import setUp, tearDown
@@ -27,16 +28,14 @@
from zope.app.i18n import ZopeMessageFactory as _
import zope.app.location
-from zope.app.dublincore.interfaces import IWriteZopeDublinCore
+from zope.app.location.interfaces import ILocation
+from zope.app.location.traversing import LocationPhysicallyLocatable
from zope.app.annotation.interfaces import IAnnotatable, IAttributeAnnotatable
from zope.app.annotation.interfaces import IAnnotations
from zope.app.annotation.attribute import AttributeAnnotations
+from zope.app.dublincore.interfaces import IWriteZopeDublinCore
from zope.app.dublincore.annotatableadapter import ZDCAnnotatableAdapter
-from zope.app.location.interfaces import ILocation
-from zope.app.traversing.interfaces import IPhysicallyLocatable
-from zope.app.location.traversing import LocationPhysicallyLocatable
-
class IRobot(Interface):
pass
Modified: Zope3/branches/jim-adapter/src/zope/app/dav/tests/test_mkcol.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/dav/tests/test_mkcol.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/dav/tests/test_mkcol.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -16,8 +16,8 @@
$Id$
"""
from unittest import TestCase, TestSuite, main, makeSuite
+from zope.traversing.api import traverse
from zope.app.testing import ztapi
-from zope.app.traversing.api import traverse
from zope.app.component.testing import PlacefulSetup
from zope.app.container.interfaces import IWriteContainer
Modified: Zope3/branches/jim-adapter/src/zope/app/dav/tests/test_propfind.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/dav/tests/test_propfind.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/dav/tests/test_propfind.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -27,15 +27,15 @@
from zope.schema import getFieldNamesInOrder
from zope.schema.interfaces import IText, ITextLine, IDatetime, ISequence
from zope.size.interfaces import ISized
+from zope.traversing.api import traverse
+from zope.traversing.browser import AbsoluteURL
+from zope.publisher.browser import TestRequest
from zope.app import zapi
from zope.app.testing import ztapi
-from zope.app.traversing.api import traverse
from zope.app.container.interfaces import IReadContainer
-from zope.publisher.browser import TestRequest
from zope.app.component.testing import PlacefulSetup
-from zope.app.traversing.browser import AbsoluteURL
from zope.app.dublincore.interfaces import IZopeDublinCore
from zope.app.dublincore.annotatableadapter import ZDCAnnotatableAdapter
from zope.app.annotation.interfaces import IAnnotatable, IAnnotations
Modified: Zope3/branches/jim-adapter/src/zope/app/dav/tests/test_proppatch.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/dav/tests/test_proppatch.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/dav/tests/test_proppatch.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -21,35 +21,32 @@
from StringIO import StringIO
import transaction
+from ZODB.tests.util import DB
from zope.interface import Interface, implements, directlyProvides
from zope.schema import Text
+from zope.schema.interfaces import IText, ISequence
from zope.publisher.interfaces.http import IHTTPRequest
from zope.publisher.http import status_reasons
+from zope.publisher.browser import TestRequest
from zope.pagetemplate.tests.util import normalize_xml
-from ZODB.tests.util import DB
+from zope.traversing.api import traverse
+from zope.traversing.browser import AbsoluteURL
from zope.app import zapi
from zope.app.testing import ztapi
-from zope.app.traversing.api import traverse
-from zope.publisher.browser import TestRequest
from zope.app.component.testing import PlacefulSetup
-from zope.app.traversing.browser import AbsoluteURL
from zope.app.dublincore.interfaces import IZopeDublinCore
from zope.app.dublincore.annotatableadapter import ZDCAnnotatableAdapter
from zope.app.dublincore.zopedublincore import ScalarProperty
from zope.app.annotation.interfaces import IAnnotatable, IAnnotations
from zope.app.annotation.attribute import AttributeAnnotations
-from zope.schema.interfaces import IText, ISequence
import zope.app.dav.tests
from zope.app.dav.tests.unitfixtures import File, Folder, FooZPT
-
from zope.app.dav import proppatch
-from zope.app.dav.interfaces import IDAVSchema
-from zope.app.dav.interfaces import IDAVNamespace
-from zope.app.dav.interfaces import IDAVWidget
+from zope.app.dav.interfaces import IDAVSchema, IDAVNamespace, IDAVWidget
from zope.app.dav.widget import TextDAVWidget, SequenceDAVWidget
from zope.app.dav.opaquenamespaces import DAVOpaqueNamespacesAdapter
from zope.app.dav.opaquenamespaces import IDAVOpaqueNamespaces
Modified: Zope3/branches/jim-adapter/src/zope/app/dependable/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/dependable/__init__.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/dependable/__init__.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -17,11 +17,11 @@
"""
__docformat__ = 'restructuredtext'
-from interfaces import IDependable
-from zope.app.annotation.interfaces import IAnnotations
-from zope.app.traversing.api import getParent, canonicalPath, getPath
from zope.interface import implements
+from zope.traversing.api import getParent, canonicalPath, getPath
+from zope.app.dependable.interfaces import IDependable
+from zope.app.annotation.interfaces import IAnnotations
class PathSetAnnotation(object):
"""Abstract base class for annotations that are sets of paths.
Modified: Zope3/branches/jim-adapter/src/zope/app/dtmlpage/tests/test_dtmlpage.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/dtmlpage/tests/test_dtmlpage.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/dtmlpage/tests/test_dtmlpage.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -18,10 +18,10 @@
import unittest
from zope.security.checker import NamesChecker, defineChecker
+from zope.traversing.adapters import Traverser, DefaultTraversable
+from zope.traversing.interfaces import ITraverser, ITraversable
from zope.app.testing.placelesssetup import PlacelessSetup
-from zope.app.traversing.adapters import Traverser, DefaultTraversable
-from zope.app.traversing.interfaces import ITraverser, ITraversable
from zope.app.testing import ztapi
from zope.app.container.contained import contained
from zope.app.dtmlpage.dtmlpage import DTMLPage
Modified: Zope3/branches/jim-adapter/src/zope/app/folder/interfaces.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/folder/interfaces.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/folder/interfaces.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -17,8 +17,8 @@
"""
__docformat__ = 'restructuredtext'
+from zope.traversing.interfaces import IContainmentRoot
from zope.app.container.interfaces import IContainer
-from zope.app.traversing.interfaces import IContainmentRoot
from zope.app.component.interfaces import IPossibleSite
from zope.app.annotation.interfaces import IAttributeAnnotatable
Modified: Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_booleanradiowidget.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_booleanradiowidget.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_booleanradiowidget.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -16,22 +16,17 @@
$Id: $
"""
import unittest
-from persistent import Persistent
import transaction
+from persistent import Persistent
-from support import *
-
-from zope.interface import Interface
-from zope.interface import implements
-
-from zope.schema import Bool
import zope.security.checker
+from zope.interface import Interface, implements
+from zope.schema import Bool
+from zope.traversing.api import traverse
-from zope.app.traversing.api import traverse
-
+from zope.app.form.browser.ftests.support import *
from zope.app.testing.functional import BrowserTestCase
-
class IFoo(Interface):
bar = Bool(title=u'Bar')
Modified: Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_checkboxwidget.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_checkboxwidget.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_checkboxwidget.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -16,22 +16,18 @@
$Id$
"""
import unittest
-from persistent import Persistent
import transaction
+from persistent import Persistent
-from zope.interface import Interface
-from zope.interface import implements
-
-from zope.schema import Bool
import zope.security.checker
-from zope.app.form.browser import CheckBoxWidget
+from zope.interface import Interface, implements
+from zope.schema import Bool
+from zope.traversing.api import traverse
-from support import *
-from zope.app.traversing.api import traverse
-
+from zope.app.form.browser import CheckBoxWidget
+from zope.app.form.browser.ftests.support import *
from zope.app.testing.functional import BrowserTestCase
-
class IBoolTest(Interface):
b1 = Bool(
Modified: Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_datetimewidget.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_datetimewidget.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_datetimewidget.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -17,22 +17,19 @@
"""
import unittest
import re
-
import transaction
-import zope.security.checker
from persistent import Persistent
from datetime import datetime
+
+import zope.security.checker
from zope.datetime import parseDatetimetz, tzinfo
-from zope.interface import Interface
-from zope.interface import implements
+from zope.interface import Interface, implements
from zope.schema import Datetime, Choice
+from zope.traversing.api import traverse
-from support import *
-from zope.app.traversing.api import traverse
-
+from zope.app.form.browser.ftests.support import *
from zope.app.testing.functional import BrowserTestCase
-
class IDatetimeTest(Interface):
d2 = Datetime(
Modified: Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_editview.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_editview.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_editview.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -16,21 +16,17 @@
$Id: test_checkboxwidget.py 26267 2004-07-08 23:06:19Z garrett $
"""
import unittest
-from persistent import Persistent
import transaction
+from persistent import Persistent
-from zope.interface import Interface
-from zope.interface import implements
-
-from zope.schema import TextLine
import zope.security.checker
+from zope.interface import Interface, implements
+from zope.schema import TextLine
+from zope.traversing.api import traverse
-from support import *
-from zope.app.traversing.api import traverse
-
+from zope.app.form.browser.ftests.support import *
from zope.app.testing.functional import BrowserTestCase
-
class IFoo(Interface):
optional_text = TextLine(required=False)
Modified: Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_filewidget.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_filewidget.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_filewidget.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -16,22 +16,18 @@
$Id$
"""
import unittest
+import transaction
from StringIO import StringIO
from persistent import Persistent
-import transaction
-from zope.interface import Interface
-from zope.interface import implements
-
+import zope.security.checker
+from zope.interface import Interface, implements
from zope.schema.interfaces import IField
from zope.schema import Field
-import zope.security.checker
+from zope.traversing.api import traverse
from zope.app.form.browser.textwidgets import FileWidget
-
-from support import *
-from zope.app.traversing.api import traverse
-
+from zope.app.form.browser.ftests.support import *
from zope.app.testing.functional import BrowserTestCase
from zope.app.form.interfaces import IInputWidget
Modified: Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_floatwidget.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_floatwidget.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_floatwidget.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -16,22 +16,17 @@
$Id$
"""
import unittest
-from persistent import Persistent
import transaction
+from persistent import Persistent
-from support import *
-
-from zope.interface import Interface
-from zope.interface import implements
-
-from zope.schema import Float, Choice
import zope.security.checker
+from zope.interface import Interface, implements
+from zope.traversing.api import traverse
-from zope.app.traversing.api import traverse
-
+from zope.schema import Float, Choice
+from zope.app.form.browser.ftests.support import *
from zope.app.testing.functional import BrowserTestCase
-
class IFloatTest(Interface):
f1 = Float(
Modified: Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_intwidget.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_intwidget.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_intwidget.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -16,22 +16,17 @@
$Id$
"""
import unittest
-from persistent import Persistent
import transaction
+from persistent import Persistent
-from support import *
-
-from zope.interface import Interface
-from zope.interface import implements
-
-from zope.schema import Int, Choice
import zope.security.checker
+from zope.interface import Interface, implements
+from zope.schema import Int, Choice
+from zope.traversing.api import traverse
-from zope.app.traversing.api import traverse
-
from zope.app.testing.functional import BrowserTestCase
+from zope.app.form.browser.ftests.support import *
-
class IIntTest(Interface):
i2 = Int(
Modified: Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_textareawidget.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_textareawidget.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_textareawidget.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -16,21 +16,17 @@
$Id$
"""
import unittest
-from persistent import Persistent
import transaction
+from persistent import Persistent
-from zope.interface import Interface
-from zope.interface import implements
-
-from zope.schema import Text
import zope.security.checker
+from zope.interface import Interface, implements
+from zope.schema import Text
+from zope.traversing.api import traverse
-from support import *
-from zope.app.traversing.api import traverse
-
+from zope.app.form.browser.ftests.support import *
from zope.app.testing.functional import BrowserTestCase
-
class ITextTest(Interface):
s2 = Text(
Modified: Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_textwidget.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_textwidget.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/form/browser/ftests/test_textwidget.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -16,19 +16,17 @@
$Id$
"""
import unittest
-from persistent import Persistent
import transaction
+from persistent import Persistent
+import zope.security.checker
from zope.interface import Interface, implements
from zope.schema import TextLine, Choice
-import zope.security.checker
+from zope.traversing.api import traverse
-from support import *
-from zope.app.traversing.api import traverse
-
+from zope.app.form.browser.ftests.support import *
from zope.app.testing.functional import BrowserTestCase
-
class ITextLineTest(Interface):
s2 = TextLine(
Modified: Zope3/branches/jim-adapter/src/zope/app/form/browser/tests/test_directives.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/form/browser/tests/test_directives.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/form/browser/tests/test_directives.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -19,15 +19,15 @@
import unittest
from cStringIO import StringIO
+from zope import component
from zope.component.interfaces import ComponentLookupError
from zope.configuration.xmlconfig import xmlconfig, XMLConfig
-from zope.app.traversing.interfaces import TraversalError
+from zope.traversing.interfaces import TraversalError
from zope.interface import Interface, implements
from zope.publisher.browser import TestRequest
from zope.schema import TextLine, Int
from zope.security.proxy import ProxyFactory
-from zope.app import zapi
import zope.app.component
import zope.app.form.browser
import zope.app.publisher.browser
@@ -83,15 +83,14 @@
XMLConfig('meta.zcml', zope.app.publisher.browser)()
from zope.app.testing import ztapi
- from zope.app.traversing.adapters import DefaultTraversable
- from zope.app.traversing.interfaces import ITraversable
+ from zope.traversing.adapters import DefaultTraversable
+ from zope.traversing.interfaces import ITraversable
- ztapi.provideAdapter(None, ITraversable, DefaultTraversable)
-
+ component.provideAdapter(DefaultTraversable, (None,), ITraversable)
def testAddForm(self):
self.assertEqual(
- zapi.queryMultiAdapter((ob, request), name='add.html'),
+ component.queryMultiAdapter((ob, request), name='add.html'),
None)
xmlconfig(StringIO(template % ("""
<view
@@ -111,13 +110,13 @@
permission="zope.Public" />
""")))
- v = zapi.getMultiAdapter((ob, request), name='add.html')
+ v = component.getMultiAdapter((ob, request), name='add.html')
# expect to fail as standard macros are not configured
self.assertRaises(TraversalError, v)
def testEditForm(self):
self.assertEqual(
- zapi.queryMultiAdapter((ob, request), name='edit.html'),
+ component.queryMultiAdapter((ob, request), name='edit.html'),
None)
xmlconfig(StringIO(template % ("""
<view
@@ -137,13 +136,13 @@
permission="zope.Public" />
""")))
- v = zapi.getMultiAdapter((ob, request), name='edit.html')
+ v = component.getMultiAdapter((ob, request), name='edit.html')
# expect to fail as standard macros are not configured
self.assertRaises(TraversalError, v)
def testEditFormWithMenu(self):
self.assertEqual(
- zapi.queryMultiAdapter((ob, request), name='edit.html'),
+ component.queryMultiAdapter((ob, request), name='edit.html'),
None)
xmlconfig(StringIO(template % ('''
<browser:menu id="test_menu" title="Test menu"/>
@@ -166,13 +165,13 @@
/>
''')))
- v = zapi.queryMultiAdapter((ob, request), name='edit.html')
+ v = component.queryMultiAdapter((ob, request), name='edit.html')
# expect to fail as standard macros are not configured
self.assertRaises(TraversalError, v)
def testSchemaDisplay(self):
self.assertEqual(
- zapi.queryMultiAdapter((ob, request), name='view.html'),
+ component.queryMultiAdapter((ob, request), name='view.html'),
None)
xmlconfig(StringIO(template % ('''
<view
@@ -192,13 +191,13 @@
permission="zope.Public" />
''')))
- v = zapi.queryMultiAdapter((ob, request), name='view.html')
+ v = component.queryMultiAdapter((ob, request), name='view.html')
# expect to fail as standard macros are not configured
self.assertRaises(TraversalError, v)
def testAddFormWithWidget(self):
self.assertEqual(
- zapi.queryMultiAdapter((ob, request), name='add.html'),
+ component.queryMultiAdapter((ob, request), name='add.html'),
None)
xmlconfig(StringIO(template % ('''
<view
@@ -227,7 +226,7 @@
</browser:addform>
''')), )
- view = zapi.queryMultiAdapter((ob, request), name='add.html')
+ view = component.queryMultiAdapter((ob, request), name='add.html')
self.assert_(hasattr(view, 'text_widget'))
self.assert_(isinstance(view.text_widget, SomeWidget))
self.assertEqual(view.text_widget.extra, u'foo')
@@ -236,7 +235,7 @@
def testEditFormWithWidget(self):
self.assertEqual(
- zapi.queryMultiAdapter((ob, request), name='edit.html'),
+ component.queryMultiAdapter((ob, request), name='edit.html'),
None)
xmlconfig(StringIO(template % ('''
<view
@@ -265,7 +264,7 @@
</browser:editform>
''')), )
- view = zapi.queryMultiAdapter((ob, request), name='edit.html')
+ view = component.queryMultiAdapter((ob, request), name='edit.html')
self.assert_(hasattr(view, 'text_widget'))
self.assert_(isinstance(view.text_widget, SomeWidget))
self.assertEqual(view.text_widget.extra, u'foo')
@@ -273,7 +272,7 @@
def testSchemaDisplayWithWidget(self):
self.assertEqual(
- zapi.queryMultiAdapter((ob, request), name='view.html'),
+ component.queryMultiAdapter((ob, request), name='view.html'),
None)
xmlconfig(StringIO(template % ('''
<view
@@ -301,7 +300,7 @@
</browser:schemadisplay>
''')))
- view = zapi.queryMultiAdapter((ob, request), name='view.html')
+ view = component.queryMultiAdapter((ob, request), name='view.html')
self.assert_(hasattr(view, 'text_widget'))
self.assert_(isinstance(view.text_widget, SomeWidget))
self.assertEqual(view.text_widget.extra, u'foo')
Modified: Zope3/branches/jim-adapter/src/zope/app/fssync/browser/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/fssync/browser/__init__.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/fssync/browser/__init__.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -23,14 +23,13 @@
import tempfile
import transaction
+from zope.traversing.api import getName, getParent, getRoot
+from zope.fssync.snarf import Snarfer, Unsnarfer
+from zope.fssync.metadata import Metadata
from zope.app.publisher.browser import BrowserView
-from zope.app.traversing.api import getName, getParent, getRoot
-from zope.fssync.snarf import Snarfer, Unsnarfer
from zope.app.fssync import syncer
from zope.app.fssync.committer import Committer, Checker
-from zope.fssync.metadata import Metadata
-
from zope.app.i18n import ZopeMessageFactory as _
def snarf_dir(response, dirname):
Modified: Zope3/branches/jim-adapter/src/zope/app/fssync/committer.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/fssync/committer.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/fssync/committer.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -19,21 +19,20 @@
import os
+import zope.component
+from zope.event import notify
from zope.configuration.name import resolve
from zope.fssync import fsutil
from zope.fssync.metadata import Metadata
from zope.fssync.server.interfaces import IObjectDirectory, IObjectFile
from zope.proxy import removeAllProxies
from zope.xmlpickle import fromxml
+from zope.traversing.api import traverseName, getName
-from zope.app import zapi
from zope.app.fssync import fspickle
from zope.app.container.interfaces import IContainer
-from zope.app.container.interfaces import IContainer
-from zope.app.traversing.api import traverseName, getName
from zope.app.filerepresentation.interfaces import IFileFactory
from zope.app.filerepresentation.interfaces import IDirectoryFactory
-from zope.event import notify
from zope.app.event.objectevent import ObjectCreatedEvent
from zope.app.event.objectevent import ObjectModifiedEvent
from zope.app.container.contained import contained
@@ -395,7 +394,7 @@
else:
iface = IFileFactory
- factory = zapi.queryAdapter(location, iface, suffix)
+ factory = zope.component.queryAdapter(location, iface, suffix)
if factory is None:
factory = iface(location, None)
Modified: Zope3/branches/jim-adapter/src/zope/app/fssync/fspickle.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/fssync/fspickle.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/fssync/fspickle.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -64,20 +64,17 @@
__docformat__ = 'restructuredtext'
import cPickle
-
from cStringIO import StringIO
import zope.interface
+from zope.traversing.interfaces import IContainmentRoot
+from zope.traversing.interfaces import ITraverser
from zope.app import location
-from zope.app import zapi
from zope.app.location.interfaces import ILocation
from zope.app.location.traversing import LocationPhysicallyLocatable
from zope.app.location.tests import TLocation
-from zope.app.traversing.interfaces import IContainmentRoot
-from zope.app.traversing.interfaces import ITraverser
-
PARENT_MARKER = ".."
# We're not ready to use protocol 2 yet; this can be changed when
Modified: Zope3/branches/jim-adapter/src/zope/app/fssync/syncer.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/fssync/syncer.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/fssync/syncer.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -19,12 +19,11 @@
from zope.app import zapi
from zope.fssync.server.syncer import Syncer
+from zope.traversing.api import getPath
from zope.app.annotation.interfaces import IAnnotations
-from zope.app.traversing.api import getPath
+from zope.app.fssync.interfaces import IGlobalFSSyncUtility
-from interfaces import IGlobalFSSyncUtility
-
def getObjectId(obj):
return str(getPath(obj))
Modified: Zope3/branches/jim-adapter/src/zope/app/fssync/tests/test_committer.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/fssync/tests/test_committer.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/fssync/tests/test_committer.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -20,23 +20,22 @@
import tempfile
import unittest
-from zope.app import zapi
-from zope.app.testing import ztapi
-from zope.app.traversing.interfaces import TraversalError
+import zope.component
from zope.interface import implements
-
+from zope.traversing.interfaces import TraversalError, IContainmentRoot
+from zope.traversing.interfaces import ITraversable, ITraverser
from zope.xmlpickle import loads, dumps
+
from zope.fssync import fsutil
from zope.fssync.server.entryadapter import DefaultFileAdpater
from zope.fssync.tests.mockmetadata import MockMetadata
from zope.fssync.tests.tempfiles import TempFiles
-
from zope.fssync.server.entryadapter import DirectoryAdapter
+
+from zope.app.testing import ztapi
from zope.app.container.interfaces import IContainer
from zope.app.filerepresentation.interfaces import IFileFactory
from zope.app.filerepresentation.interfaces import IDirectoryFactory
-from zope.app.traversing.interfaces import IContainmentRoot
-from zope.app.traversing.interfaces import ITraversable, ITraverser
from zope.app.location import Location
from zope.app.testing.placelesssetup import PlacelessSetup
@@ -122,7 +121,7 @@
super(TestBase, self).setUp()
# Set up FSRegistryUtility
- gsm = zapi.getGlobalSiteManager()
+ gsm = zope.component.getGlobalSiteManager()
gsm.provideUtility(IGlobalFSSyncUtility, fsRegistry)
provideSynchronizer(None, DefaultFileAdpater)
Modified: Zope3/branches/jim-adapter/src/zope/app/fssync/tests/test_fspickle.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/fssync/tests/test_fspickle.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/fssync/tests/test_fspickle.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -16,15 +16,13 @@
$Id$
"""
import unittest
+from zope.testing.doctestunit import DocTestSuite
+from zope.interface import directlyProvides
+from zope.traversing.interfaces import IContainmentRoot
-from zope.app.traversing.interfaces import IContainmentRoot
from zope.app.location.tests import TLocation
from zope.app.fssync import fspickle
-from zope.interface import directlyProvides
-from zope.testing.doctestunit import DocTestSuite
-
-
class PersistentLoaderTestCase(unittest.TestCase):
def setUp(self):
Modified: Zope3/branches/jim-adapter/src/zope/app/homefolder/README.txt
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/homefolder/README.txt 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/homefolder/README.txt 2006-04-05 11:59:36 UTC (rev 66518)
@@ -201,10 +201,10 @@
(2) Or alternatively via the path adapter:
- >>> from zope.app.traversing.interfaces import IPathAdapter
- >>> from zope.app import zapi
- >>> zapi.getAdapter(principal, IPathAdapter,
- ... "homefolder") is baseFolder['stephan']
+ >>> import zope.component
+ >>> from zope.traversing.interfaces import IPathAdapter
+ >>> zope.component.getAdapter(principal, IPathAdapter,
+ ... "homefolder") is baseFolder['stephan']
True
As you can see, the path adapter just returns the homefolder. This way we can
Modified: Zope3/branches/jim-adapter/src/zope/app/homefolder/browser.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/homefolder/browser.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/homefolder/browser.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -13,12 +13,14 @@
##############################################################################
"""Home Folder related views.
-$Id:$
+$Id$
"""
__docformat__ = "reStructuredText"
import zope.schema
from zope.schema.vocabulary import SimpleVocabulary
from zope.security.proxy import removeSecurityProxy
+from zope.traversing.interfaces import TraversalError
+from zope.dottedname.resolve import resolve
from zope.app import zapi
from zope.app.form.browser import TextWidget, MultiSelectWidget
@@ -27,11 +29,7 @@
from zope.app.form.interfaces import ConversionError
from zope.app.security.vocabulary import PrincipalSource
-from zope.app.traversing.interfaces import TraversalError
-from zope.dottedname.resolve import resolve
-
-
class PathWidget(TextWidget):
def _toFieldValue(self, input):
Modified: Zope3/branches/jim-adapter/src/zope/app/homefolder/configure.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/homefolder/configure.zcml 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/homefolder/configure.zcml 2006-04-05 11:59:36 UTC (rev 66518)
@@ -12,7 +12,7 @@
<adapter
for="zope.security.interfaces.IPrincipal"
- provides="zope.app.traversing.interfaces.IPathAdapter"
+ provides="zope.traversing.interfaces.IPathAdapter"
factory=".homefolder.getHomeFolder"
name="homefolder" />
Modified: Zope3/branches/jim-adapter/src/zope/app/homefolder/tests.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/homefolder/tests.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/homefolder/tests.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -20,15 +20,15 @@
import unittest
from zope.interface import classImplements
from zope.security.interfaces import IPrincipal
+from zope.traversing.interfaces import IPathAdapter
from zope.testing import doctest
+
from zope.app.testing import placelesssetup, setup, ztapi
-
from zope.app.annotation.interfaces import IAnnotatable
from zope.app.annotation.interfaces import IAttributeAnnotatable
from zope.app.file import File
from zope.app.securitypolicy.interfaces import IPrincipalRoleManager
from zope.app.securitypolicy.principalrole import AnnotationPrincipalRoleManager
-from zope.app.traversing.interfaces import IPathAdapter
from zope.app.homefolder.homefolder import HomeFolder, getHomeFolder
from zope.app.homefolder.interfaces import IHomeFolder
Modified: Zope3/branches/jim-adapter/src/zope/app/location/configure.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/location/configure.zcml 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/location/configure.zcml 2006-04-05 11:59:36 UTC (rev 66518)
@@ -5,7 +5,7 @@
<adapter
for="zope.app.location.interfaces.ILocation"
- provides="zope.app.traversing.interfaces.IPhysicallyLocatable"
+ provides="zope.traversing.interfaces.IPhysicallyLocatable"
factory="zope.app.location.traversing.LocationPhysicallyLocatable"
/>
Modified: Zope3/branches/jim-adapter/src/zope/app/location/pickling.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/location/pickling.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/location/pickling.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -17,15 +17,16 @@
"""
__docformat__ = 'restructuredtext'
-from zope.app.location.interfaces import ILocation
-from zope.app.location.location import Location, inside
-from zope.app.location.traversing import LocationPhysicallyLocatable
-from zope.app.traversing.interfaces import IContainmentRoot
-from zope.app.traversing.interfaces import ITraverser
import cPickle
import tempfile
import zope.interface
+from zope.traversing.interfaces import IContainmentRoot
+from zope.traversing.interfaces import ITraverser
+from zope.app.location.interfaces import ILocation
+from zope.app.location.location import Location, inside
+from zope.app.location.traversing import LocationPhysicallyLocatable
+
def locationCopy(loc):
r"""Return a copy of an object, and anything in it
Modified: Zope3/branches/jim-adapter/src/zope/app/location/tests.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/location/tests.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/location/tests.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -16,10 +16,10 @@
$Id$
"""
import unittest
+import zope.interface
+from zope.traversing.interfaces import ITraverser
from zope.testing.doctestunit import DocTestSuite
from zope.app.location.location import Location
-import zope.interface
-from zope.app.traversing.interfaces import ITraverser
class TLocation(Location):
"""Simple traversable location used in examples."""
Modified: Zope3/branches/jim-adapter/src/zope/app/location/traversing.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/location/traversing.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/location/traversing.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -16,11 +16,11 @@
$Id$
"""
import zope.interface
-from zope.app.traversing.interfaces import IPhysicallyLocatable
-from zope.app.traversing.interfaces import IContainmentRoot
-from zope.app.traversing.interfaces import ITraverser
+from zope.traversing.interfaces import IPhysicallyLocatable
+from zope.traversing.interfaces import IContainmentRoot
+from zope.traversing.interfaces import ITraverser
+from zope.traversing.api import getParents
from zope.app.component.interfaces import ISite
-from zope.app.traversing.api import getParents
from zope.app.location.location import Location
Modified: Zope3/branches/jim-adapter/src/zope/app/locking/README.txt
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/locking/README.txt 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/locking/README.txt 2006-04-05 11:59:36 UTC (rev 66518)
@@ -376,9 +376,8 @@
that makes sense::
>>> from zope.component import getAdapter
+ >>> from zope.traversing.interfaces import IPathAdapter
- >>> from zope.app.traversing.interfaces import IPathAdapter
-
>>> ns = getAdapter(42, IPathAdapter, "locking")
>>> ns.lockable
False
Modified: Zope3/branches/jim-adapter/src/zope/app/locking/adapter.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/locking/adapter.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/locking/adapter.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -124,10 +124,8 @@
return '<Locking adapter for %s>' % repr(self.context)
class LockingPathAdapter(object):
+ interface.implements(zope.traversing.interfaces.IPathAdapter)
- interface.implements(
- zope.app.traversing.interfaces.IPathAdapter)
-
def __init__(self, target):
self._locking = LockingAdapterFactory(target)
self.lockable = self._locking is not None
Modified: Zope3/branches/jim-adapter/src/zope/app/locking/tests.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/locking/tests.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/locking/tests.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -16,7 +16,6 @@
$Id:$
"""
-
import sys, unittest, time
from zope.component.testing import PlacelessSetup
import zope.event
@@ -24,6 +23,9 @@
from transaction import abort
from zope.interface import Interface
+from zope.traversing.interfaces import IPathAdapter
+from zope.security.testing import Principal, Participation
+
from zope.app.testing import ztapi
from zope.app.file.file import File
from zope.app.folder.folder import Folder
@@ -31,11 +33,8 @@
from zope.app.locking.adapter import LockingAdapterFactory
from zope.app.locking.adapter import LockingPathAdapter
from zope.app.locking.storage import ILockStorage, PersistentLockStorage
-from zope.app.traversing.interfaces import IPathAdapter
from zope.app.keyreference.interfaces import IKeyReference
-from zope.security.testing import Principal, Participation
-
class FakeModule:
def __init__(self, dict):
self.__dict = dict
Modified: Zope3/branches/jim-adapter/src/zope/app/onlinehelp/configure.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/onlinehelp/configure.zcml 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/onlinehelp/configure.zcml 2006-04-05 11:59:36 UTC (rev 66518)
@@ -66,14 +66,14 @@
<view
name="help"
type="*"
- provides="zope.app.traversing.interfaces.ITraversable"
+ provides="zope.traversing.interfaces.ITraversable"
for="*"
factory=".helpNamespace"
/>
<adapter
name="help"
- provides="zope.app.traversing.interfaces.ITraversable"
+ provides="zope.traversing.interfaces.ITraversable"
for="*"
factory=".helpNamespace"
/>
Modified: Zope3/branches/jim-adapter/src/zope/app/onlinehelp/onlinehelp.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/onlinehelp/onlinehelp.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/onlinehelp/onlinehelp.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -24,9 +24,9 @@
from zope.interface import implements
from zope.configuration.exceptions import ConfigurationError
+from zope.traversing.interfaces import IContainmentRoot
from zope.app import zapi
-from zope.app.traversing.interfaces import IContainmentRoot
from zope.app.onlinehelp.interfaces import IOnlineHelp, IOnlineHelpTopic
from zope.app.onlinehelp.onlinehelptopic import OnlineHelpTopic
@@ -47,7 +47,7 @@
First do the interface verifying tests.
>>> from zope.interface.verify import verifyObject
- >>> from zope.app.traversing.interfaces import IContainmentRoot
+ >>> from zope.traversing.interfaces import IContainmentRoot
>>> verifyObject(IOnlineHelp, onlinehelp)
True
>>> verifyObject(IContainmentRoot, onlinehelp)
Modified: Zope3/branches/jim-adapter/src/zope/app/onlinehelp/tests/test_helpdirectives.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/onlinehelp/tests/test_helpdirectives.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/onlinehelp/tests/test_helpdirectives.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -17,17 +17,18 @@
"""
import unittest
-import zope.app.component
-import zope.app.security
-import zope.app.onlinehelp
-
from zope.interface import Interface
from zope.configuration import xmlconfig
from zope.configuration.xmlconfig import XMLConfig
from zope.component.interfaces import IFactory
from zope.component.factory import Factory
-from zope.app.traversing.interfaces import IPhysicallyLocatable
-from zope.app.traversing.interfaces import ITraverser, ITraversable
+from zope.traversing.interfaces import IPhysicallyLocatable
+from zope.traversing.interfaces import ITraverser, ITraversable
+from zope.traversing.adapters import Traverser, DefaultTraversable
+
+import zope.app.component
+import zope.app.security
+import zope.app.onlinehelp
from zope.app.onlinehelp import tests
from zope.app.onlinehelp import globalhelp
from zope.app.onlinehelp.onlinehelptopic import OnlineHelpTopic
@@ -37,7 +38,6 @@
from zope.app.security.interfaces import IPermission
from zope.app.security.permission import Permission
from zope.app.location.traversing import LocationPhysicallyLocatable
-from zope.app.traversing.adapters import Traverser, DefaultTraversable
from zope.app.testing import ztapi, placelesssetup
Modified: Zope3/branches/jim-adapter/src/zope/app/onlinehelp/tests/test_onlinehelp.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/onlinehelp/tests/test_onlinehelp.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/onlinehelp/tests/test_onlinehelp.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -20,10 +20,11 @@
from zope.interface import Interface, implements
from zope.testing.doctestunit import DocTestSuite
+from zope.traversing.interfaces import ITraversable, ITraverser
+from zope.traversing.interfaces import IPhysicallyLocatable
+from zope.traversing.adapters import Traverser, DefaultTraversable
+
from zope.app.testing import ztapi, placelesssetup
-from zope.app.traversing.interfaces import ITraversable, IPhysicallyLocatable,\
- ITraverser
-from zope.app.traversing.adapters import Traverser, DefaultTraversable
from zope.app.location.traversing import LocationPhysicallyLocatable
class I1(Interface):
Modified: Zope3/branches/jim-adapter/src/zope/app/pagetemplate/configure.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/pagetemplate/configure.zcml 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/pagetemplate/configure.zcml 2006-04-05 11:59:36 UTC (rev 66518)
@@ -6,14 +6,14 @@
<adapter
for="*"
- provides="zope.app.traversing.interfaces.IPathAdapter"
+ provides="zope.traversing.interfaces.IPathAdapter"
factory=".talesapi.ZopeTalesAPI"
name="zope"
/>
<adapter
for="*"
- provides="zope.app.traversing.interfaces.IPathAdapter"
+ provides="zope.traversing.interfaces.IPathAdapter"
factory=".urlquote.URLQuote"
name="url"/>
Modified: Zope3/branches/jim-adapter/src/zope/app/pagetemplate/engine.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/pagetemplate/engine.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/pagetemplate/engine.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -21,24 +21,23 @@
import sys
+from zope import component
from zope.interface import implements
-
-from zope.tales.expressions import PathExpr, StringExpr, NotExpr, DeferExpr
-from zope.tales.expressions import SimpleModuleImporter
-from zope.tales.pythonexpr import PythonExpr
-from zope.tales.tales import ExpressionEngine, Context
-
from zope.component.interfaces import ComponentLookupError
-from zope.app.traversing.interfaces import TraversalError
+from zope.traversing.interfaces import IPathAdapter, ITraversable
+from zope.traversing.interfaces import TraversalError
+from zope.traversing.adapters import Traverser, traversePathElement
from zope.security.untrustedpython import rcompile
from zope.security.proxy import ProxyFactory
from zope.security.untrustedpython.builtins import SafeBuiltins
from zope.i18n import translate
-from zope.app import zapi
+from zope.tales.expressions import PathExpr, StringExpr, NotExpr, DeferExpr
+from zope.tales.expressions import SimpleModuleImporter
+from zope.tales.pythonexpr import PythonExpr
+from zope.tales.tales import ExpressionEngine, Context
+
from zope.app.i18n import ZopeMessageFactory as _
-from zope.app.traversing.adapters import Traverser, traversePathElement
-from zope.app.traversing.interfaces import IPathAdapter, ITraversable
class InlineCodeError(Exception):
pass
@@ -126,7 +125,7 @@
# TODO This is only needed when self.evaluateInlineCode is true,
# so should only be needed for zope.app.pythonpage.
from zope.app.interpreter.interfaces import IInterpreter
- interpreter = zapi.queryUtility(IInterpreter, lang)
+ interpreter = component.queryUtility(IInterpreter, lang)
if interpreter is None:
error = _('No interpreter named "${lang_name}" was found.',
mapping={'lang_name': lang})
@@ -196,7 +195,7 @@
if namespace is None:
def namespace(object):
try:
- return zapi.getAdapter(object, IPathAdapter, name)
+ return component.getAdapter(object, IPathAdapter, name)
except ComponentLookupError:
raise KeyError(name)
Modified: Zope3/branches/jim-adapter/src/zope/app/pagetemplate/tests/test_directives.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/pagetemplate/tests/test_directives.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/pagetemplate/tests/test_directives.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -20,14 +20,13 @@
from zope.configuration.xmlconfig import xmlconfig, XMLConfig
from zope.interface import Interface, implements
-from zope.app.testing import ztapi
+from zope.traversing.interfaces import ITraversable
import zope.app.pagetemplate
+from zope.app.testing import ztapi
+from zope.app.testing.placelesssetup import PlacelessSetup
from zope.app.pagetemplate.engine import Engine
-from zope.app.traversing.interfaces import ITraversable
-from zope.app.testing.placelesssetup import PlacelessSetup
-
template = """<configure
xmlns='http://namespaces.zope.org/zope'
xmlns:tales='http://namespaces.zope.org/tales'>
Modified: Zope3/branches/jim-adapter/src/zope/app/pagetemplate/tests/test_talesapi.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/pagetemplate/tests/test_talesapi.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/pagetemplate/tests/test_talesapi.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -19,9 +19,9 @@
from zope.testing.doctestunit import DocTestSuite
from zope.interface import implements
from zope.size.interfaces import ISized
+from zope.traversing.interfaces import IPhysicallyLocatable
from zope.app.dublincore.interfaces import IZopeDublinCore
-from zope.app.traversing.interfaces import IPhysicallyLocatable
from zope.app.pagetemplate.talesapi import ZopeTalesAPI
class TestObject(object):
Modified: Zope3/branches/jim-adapter/src/zope/app/pagetemplate/urlquote.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/pagetemplate/urlquote.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/pagetemplate/urlquote.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -19,7 +19,7 @@
import urllib
from zope.interface import implements
-from zope.app.traversing.interfaces import IPathAdapter
+from zope.traversing.interfaces import IPathAdapter
class URLQuote(object):
r"""An adapter for URL quoting.
Modified: Zope3/branches/jim-adapter/src/zope/app/pluggableauth/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/pluggableauth/__init__.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/pluggableauth/__init__.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -45,7 +45,7 @@
from zope.app.location import locate
from zope.app.security.interfaces import ILoginPassword, IAuthentication
from zope.app.security.interfaces import PrincipalLookupError
-from zope.app.traversing.api import getPath
+from zope.traversing.api import getPath
from interfaces import IUserSchemafied, IPluggableAuthentication
from interfaces import IPrincipalSource, ILoginPasswordPrincipalSource
@@ -203,7 +203,7 @@
Define a stub for `PluggableAuthentication`
- >>> from zope.app.traversing.interfaces import IPhysicallyLocatable
+ >>> from zope.traversing.interfaces import IPhysicallyLocatable
>>> class PluggableAuthStub(object):
... implements(IPhysicallyLocatable)
... def __init__(self, earmark=None):
Modified: Zope3/branches/jim-adapter/src/zope/app/preference/README.txt
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/preference/README.txt 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/preference/README.txt 2006-04-05 11:59:36 UTC (rev 66518)
@@ -425,9 +425,9 @@
register all necessary traversal components and the special `preferences`
namespace:
- >>> import zope.app.traversing.interfaces
+ >>> import zope.traversing.interfaces
>>> ztapi.provideAdapter(None,
- ... zope.app.traversing.interfaces.ITraversable,
+ ... zope.traversing.interfaces.ITraversable,
... preference.preferencesNamespace,
... 'preferences')
Modified: Zope3/branches/jim-adapter/src/zope/app/preference/configure.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/preference/configure.zcml 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/preference/configure.zcml 2006-04-05 11:59:36 UTC (rev 66518)
@@ -9,14 +9,14 @@
name="preferences"
for="*"
type="*"
- provides="zope.app.traversing.interfaces.ITraversable"
+ provides="zope.traversing.interfaces.ITraversable"
factory=".preference.preferencesNamespace"
/>
<adapter
name="preferences"
for="*"
- provides="zope.app.traversing.interfaces.ITraversable"
+ provides="zope.traversing.interfaces.ITraversable"
factory=".preference.preferencesNamespace"
/>
Modified: Zope3/branches/jim-adapter/src/zope/app/preference/default.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/preference/default.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/preference/default.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -20,17 +20,15 @@
from BTrees.OOBTree import OOBTree
import zope.interface
+import zope.component
from zope.security.checker import defineChecker
+from zope.traversing.interfaces import IContainmentRoot
-from zope.app import component
-from zope.app import zapi
+import zope.app.component
from zope.app.container.contained import Contained
from zope.app.location import locate
-from zope.app.traversing.interfaces import IContainmentRoot
-
from zope.app.preference import preference, interfaces
-
class DefaultPreferenceProvider(persistent.Persistent, Contained):
zope.interface.implements(interfaces.IDefaultPreferenceProvider)
@@ -38,7 +36,7 @@
self.data = OOBTree()
def getDefaultPreferenceGroup(self, id=''):
- group = zapi.getUtility(interfaces.IPreferenceGroup, name=id)
+ group = zope.component.getUtility(interfaces.IPreferenceGroup, name=id)
group = group.__bind__(self)
default = DefaultPreferenceGroup(group, self)
zope.interface.alsoProvides(default, IContainmentRoot)
@@ -92,7 +90,7 @@
# There is currently no local entry, so let's go to the next
# provider and lookup the group and value there.
- nextProvider = component.queryNextUtility(
+ nextProvider = zope.app.component.queryNextUtility(
self.provider, interfaces.IDefaultPreferenceProvider)
# No more providers found, so return the schema's default
Modified: Zope3/branches/jim-adapter/src/zope/app/preference/preference.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/preference/preference.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/preference/preference.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -22,6 +22,7 @@
from zope.schema import getFields
from zope.security.checker import CheckerPublic, Checker, defineChecker
from zope.security.management import getInteraction
+from zope.traversing.interfaces import IContainmentRoot
import zope.app.component.hooks
from zope.app import zapi
@@ -29,7 +30,6 @@
from zope.app.container.interfaces import IReadContainer
from zope.app.location import LocationProxy, locate, Location
from zope.app.principalannotation.interfaces import IPrincipalAnnotationUtility
-from zope.app.traversing.interfaces import IContainmentRoot
from zope.app.preference.interfaces import IPreferenceGroup
from zope.app.preference.interfaces import IPreferenceCategory
Modified: Zope3/branches/jim-adapter/src/zope/app/publication/publicationtraverse.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publication/publicationtraverse.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/publication/publicationtraverse.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -18,13 +18,12 @@
__docformat__ = 'restructuredtext'
from types import StringTypes
+from zope.component import queryMultiAdapter
from zope.publisher.interfaces import NotFound
from zope.security.checker import ProxyFactory
-
-from zope.app import zapi
-from zope.app.traversing.namespace import namespaceLookup
-from zope.app.traversing.namespace import nsParse
-from zope.app.traversing.interfaces import TraversalError
+from zope.traversing.namespace import namespaceLookup
+from zope.traversing.namespace import nsParse
+from zope.traversing.interfaces import TraversalError
from zope.publisher.interfaces import IPublishTraverse
class DuplicateNamespaces(Exception):
@@ -56,8 +55,8 @@
ob2 = ob.publishTraverse(request, nm)
else:
# self is marker
- adapter = zapi.queryMultiAdapter((ob, request), IPublishTraverse,
- default=self)
+ adapter = queryMultiAdapter((ob, request), IPublishTraverse,
+ default=self)
if adapter is not self:
ob2 = adapter.publishTraverse(request, nm)
else:
Modified: Zope3/branches/jim-adapter/src/zope/app/publication/tests/test_zopepublication.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publication/tests/test_zopepublication.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/publication/tests/test_zopepublication.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -34,6 +34,7 @@
from zope.security import simplepolicies
from zope.security.management import setSecurityPolicy, queryInteraction
from zope.security.management import endInteraction
+from zope.traversing.interfaces import IPhysicallyLocatable
from zope.app import zapi
from zope.app.testing.placelesssetup import PlacelessSetup
@@ -41,7 +42,6 @@
from zope.app.error.interfaces import IErrorReportingUtility
from zope.app.location.interfaces import ILocation
-from zope.app.traversing.interfaces import IPhysicallyLocatable
from zope.app.security.principalregistry import principalRegistry
from zope.app.security.interfaces import IUnauthenticatedPrincipal, IPrincipal
from zope.app.publication.zopepublication import ZopePublication
@@ -125,7 +125,7 @@
connection.close()
self.app = app
- from zope.app.traversing.namespace import view, resource, etc
+ from zope.traversing.namespace import view, resource, etc
ztapi.provideNamespaceHandler('view', view)
ztapi.provideNamespaceHandler('resource', resource)
ztapi.provideNamespaceHandler('etc', etc)
@@ -469,8 +469,8 @@
from zope.interface import directlyProvides
from zope.app.location.traversing import LocationPhysicallyLocatable
from zope.app.location.interfaces import ILocation
- from zope.app.traversing.interfaces import IPhysicallyLocatable
- from zope.app.traversing.interfaces import IContainmentRoot
+ from zope.traversing.interfaces import IPhysicallyLocatable
+ from zope.traversing.interfaces import IContainmentRoot
ztapi.provideAdapter(ILocation, IPhysicallyLocatable,
LocationPhysicallyLocatable)
Modified: Zope3/branches/jim-adapter/src/zope/app/publication/zopepublication.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publication/zopepublication.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/publication/zopepublication.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -33,6 +33,7 @@
from zope.security.management import newInteraction, endInteraction
from zope.security.checker import ProxyFactory
from zope.security.proxy import removeSecurityProxy
+from zope.traversing.interfaces import IPhysicallyLocatable
from zope.app import zapi
from zope.app.applicationcontrol.applicationcontrol \
@@ -47,7 +48,6 @@
from zope.app.security.interfaces import IUnauthenticatedPrincipal
from zope.app.security.interfaces import IAuthentication
from zope.app.component.interfaces import ISite
-from zope.app.traversing.interfaces import IPhysicallyLocatable
class Cleanup(object):
Modified: Zope3/branches/jim-adapter/src/zope/app/publisher/browser/icon.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publisher/browser/icon.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/publisher/browser/icon.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -21,12 +21,11 @@
from zope.interface import Interface
from zope.publisher.interfaces.browser import IDefaultBrowserLayer
from zope.configuration.exceptions import ConfigurationError
+from zope.traversing.namespace import getResource
-from zope.app import zapi
from zope.app.component.interface import provideInterface
from zope.app.component.metaconfigure import handler
from zope.app.publisher.browser import metaconfigure
-from zope.app.traversing.namespace import getResource
IName = re.compile('I[A-Z][a-z]')
Modified: Zope3/branches/jim-adapter/src/zope/app/publisher/browser/resource.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publisher/browser/resource.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/publisher/browser/resource.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -15,15 +15,14 @@
$Id$
"""
+from zope.component import getMultiAdapter
from zope.component.interfaces import IResource
from zope.interface import implements
+from zope.traversing.browser.interfaces import IAbsoluteURL
-from zope.app import zapi
from zope.app.component.hooks import getSite
from zope.app.location import Location
-from zope.app.traversing.browser.interfaces import IAbsoluteURL
-
class Resource(Location):
implements(IResource)
@@ -36,5 +35,5 @@
name = name[12:]
site = getSite()
- url = str(zapi.getMultiAdapter((site, self.request), IAbsoluteURL))
+ url = str(getMultiAdapter((site, self.request), IAbsoluteURL))
return "%s/@@/%s" % (url, name)
Modified: Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/support.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/support.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/support.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -15,19 +15,18 @@
$Id$
"""
+import zope.component
from zope.interface import implements
+from zope.traversing.interfaces import IContainmentRoot
-from zope.app import zapi
from zope.app.component.hooks import setSite
from zope.app.component.interfaces import ISite
-from zope.app.traversing.interfaces import IContainmentRoot
-
class Site:
implements(ISite, IContainmentRoot)
def getSiteManager(self):
- return zapi.getGlobalSiteManager()
+ return zope.component.getGlobalSiteManager()
site = Site()
Modified: Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/test_directives.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/test_directives.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/test_directives.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -31,6 +31,8 @@
from zope.publisher.interfaces.browser import IBrowserSkinType, IDefaultSkin
from zope.security.proxy import removeSecurityProxy, ProxyFactory
from zope.testing.doctestunit import DocTestSuite
+from zope.traversing.adapters import DefaultTraversable
+from zope.traversing.interfaces import ITraversable
import zope.app.publisher.browser
from zope.app import zapi
@@ -42,10 +44,7 @@
from zope.app.security.permission import Permission
from zope.app.security.interfaces import IPermission
from zope.app.testing import placelesssetup, ztapi
-from zope.app.traversing.adapters import DefaultTraversable
-from zope.app.traversing.interfaces import ITraversable
-
tests_path = os.path.join(
os.path.dirname(zope.app.publisher.browser.__file__),
'tests')
Modified: Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/test_icondirective.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/test_icondirective.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/test_icondirective.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -26,6 +26,7 @@
from zope.security.checker import ProxyFactory, CheckerPublic
from zope.security.interfaces import Forbidden
from zope.security.proxy import removeSecurityProxy
+from zope.traversing.interfaces import IContainmentRoot
import zope.app.publisher.browser
from zope.app import zapi
@@ -33,7 +34,6 @@
from zope.app.component.interfaces import ISite
from zope.app.publisher.browser.tests import support
from zope.app.testing.placelesssetup import PlacelessSetup
-from zope.app.traversing.interfaces import IContainmentRoot
template = """<configure
Modified: Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/test_pagetemplateresource.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/test_pagetemplateresource.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/publisher/browser/tests/test_pagetemplateresource.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -18,16 +18,16 @@
import os
from unittest import TestCase, main, makeSuite
+import zope.component
from zope.publisher.interfaces import NotFound
-from zope.app.testing import ztapi
from zope.security.checker import NamesChecker
from zope.publisher.browser import TestRequest
+from zope.traversing.interfaces import ITraversable
+from zope.traversing.adapters import DefaultTraversable
from zope.app.testing.placelesssetup import PlacelessSetup
from zope.app.publisher.browser.pagetemplateresource import \
PageTemplateResourceFactory
-from zope.app.traversing.interfaces import ITraversable
-from zope.app.traversing.adapters import DefaultTraversable
import zope.app.publisher.browser.tests as p
test_directory = os.path.dirname(p.__file__)
@@ -40,7 +40,7 @@
def setUp(self):
super(Test, self).setUp()
- ztapi.provideAdapter(None, ITraversable, DefaultTraversable)
+ zope.component.provideAdapter(DefaultTraversable, (None,), ITraversable)
def testNoTraversal(self):
path = os.path.join(test_directory, 'testfiles', 'test.pt')
Modified: Zope3/branches/jim-adapter/src/zope/app/pythonpage/tests.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/pythonpage/tests.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/pythonpage/tests.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -16,19 +16,20 @@
$Id$
"""
import unittest
-from zope.app import zapi
+
+import zope.component
+from zope.interface import implements
+from zope.testing.doctestunit import DocTestSuite
+from zope.traversing.interfaces import IContainmentRoot
+from zope.traversing.interfaces import IPhysicallyLocatable
+from zope.traversing.adapters import RootPhysicallyLocatable
+
from zope.app.container.contained import Contained
-from zope.app.traversing.interfaces import IContainmentRoot
-from zope.app.traversing.interfaces import IPhysicallyLocatable
from zope.app.interpreter.interfaces import IInterpreter
from zope.app.interpreter.python import PythonInterpreter
from zope.app.location.traversing import LocationPhysicallyLocatable
from zope.app.testing import placelesssetup, ztapi
-from zope.app.traversing.adapters import RootPhysicallyLocatable
-from zope.interface import implements
-from zope.testing.doctestunit import DocTestSuite
-
class Root(Contained):
implements(IContainmentRoot)
@@ -37,7 +38,7 @@
def setUp(test):
placelesssetup.setUp()
- sm = zapi.getGlobalSiteManager()
+ sm = zope.component.getGlobalSiteManager()
sm.registerUtility(PythonInterpreter, IInterpreter, 'text/server-python')
ztapi.provideAdapter(None, IPhysicallyLocatable,
Modified: Zope3/branches/jim-adapter/src/zope/app/recorder/tests.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/recorder/tests.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/recorder/tests.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -614,10 +614,10 @@
ztapi.browserViewProviding(IText, TextAreaWidget, IInputWidget)
# ++view++ namespace
- from zope.app.traversing.interfaces import ITraversable
- import zope.app.traversing.namespace
+ from zope.traversing.interfaces import ITraversable
+ import zope.traversing.namespace
ztapi.provideView(None, None, ITraversable, 'view',
- zope.app.traversing.namespace.view)
+ zope.traversing.namespace.view)
# Macros
from zope.app.basicskin.standardmacros import StandardMacros
Modified: Zope3/branches/jim-adapter/src/zope/app/rotterdam/tests/test_xmlnavigationviews.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/rotterdam/tests/test_xmlnavigationviews.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/rotterdam/tests/test_xmlnavigationviews.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -23,9 +23,9 @@
from zope.publisher.browser import TestRequest
from zope.publisher.interfaces.browser import IBrowserPublisher
from zope.publisher.interfaces import NotFound
+from zope.traversing.api import traverse
from zope.app.testing import ztapi
-from zope.app.traversing.api import traverse
from zope.app.container.interfaces import IReadContainer
from zope.app.component.site import LocalSiteManager
from zope.app.component.testing import PlacefulSetup
Modified: Zope3/branches/jim-adapter/src/zope/app/rotterdam/xmlobject.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/rotterdam/xmlobject.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/rotterdam/xmlobject.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -22,15 +22,13 @@
from zope.proxy import sameProxiedObjects
from zope.security.interfaces import Unauthorized, Forbidden
from zope.i18n import translate
+from zope.traversing.api import getParents, getParent, traverse
from zope.app import zapi
from zope.app.publisher.browser import BrowserView
from zope.app.container.interfaces import IReadContainer
-from zope.app.traversing.api import getParents, getParent, traverse
-
from zope.app.i18n import ZopeMessageFactory as _
-
titleTemplate = _('Contains $${num} item(s)')
loadingMsg = _('Loading...')
Modified: Zope3/branches/jim-adapter/src/zope/app/schema/browser/configure.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/schema/browser/configure.zcml 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/schema/browser/configure.zcml 2006-04-05 11:59:36 UTC (rev 66518)
@@ -57,7 +57,7 @@
<zope:adapter
factory=".traversal.SchemaFieldTraversable"
- provides="zope.app.traversing.interfaces.ITraversable"
+ provides="zope.traversing.interfaces.ITraversable"
for="zope.app.schema.interfaces.IMutableSchema" />
</zope:configure>
Modified: Zope3/branches/jim-adapter/src/zope/app/schema/browser/traversal.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/schema/browser/traversal.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/schema/browser/traversal.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -16,12 +16,12 @@
from zope.interface import implements
from zope.publisher.interfaces.browser import IBrowserPublisher
from zope.publisher.interfaces import NotFound
+from zope.traversing.interfaces import TraversalError, ITraversable
+from zope.traversing.namespace import UnexpectedParameters
from zope.app import zapi
from zope.app.location.interfaces import ILocation
from zope.app.schema.interfaces import IMutableSchema
-from zope.app.traversing.interfaces import TraversalError, ITraversable
-from zope.app.traversing.namespace import UnexpectedParameters
_marker = object()
Modified: Zope3/branches/jim-adapter/src/zope/app/schema/tests/test_interfaceutility.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/schema/tests/test_interfaceutility.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/schema/tests/test_interfaceutility.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -16,12 +16,13 @@
$Id$
"""
import unittest
+import zope.component
from zope.interface import Interface, implements
from zope.interface.interface import InterfaceClass
from zope.interface.interfaces import IInterface
from zope.component.interfaces import ComponentLookupError
+from zope.traversing.api import traverse
-from zope.app import zapi
from zope.app.component.interfaces import ILocalUtility
from zope.app.component.testing import PlacefulSetup
from zope.app.component.interface import getInterface, searchInterface
@@ -31,7 +32,6 @@
from zope.app.container.contained import Contained
from zope.app.dependable.interfaces import IDependable
from zope.app.testing import setup
-from zope.app.traversing.api import traverse
class IBaz(Interface): pass
@@ -88,7 +88,7 @@
sm = PlacefulSetup.setUp(self, site=True)
def test_getLocalInterface_delegates_to_globalUtility(self):
- gsm = zapi.getGlobalSiteManager()
+ gsm = zope.component.getGlobalSiteManager()
gsm.registerUtility(Bar("blob"), IInterface, name="blob")
gsm.registerUtility(Baz("global baz"), IBaz)
gsm.registerUtility(Foo("global bob"), IInterface, name="bob")
@@ -101,7 +101,7 @@
baz = Baz("global baz")
foo = Foo("global bob")
- gsm = zapi.getGlobalSiteManager()
+ gsm = zope.component.getGlobalSiteManager()
gsm.registerUtility(foo, IInterface, name="bob")
gsm.registerUtility(bar, IInterface)
gsm.registerUtility(baz, IBaz)
@@ -125,7 +125,7 @@
bar = Bar("global")
baz = Baz("global baz")
foo = Foo("global bob")
- gsm = zapi.getGlobalSiteManager()
+ gsm = zope.component.getGlobalSiteManager()
gsm.registerUtility(foo, IInterface, name="bob")
gsm.registerUtility(bar, ILocalUtility)
@@ -144,7 +144,7 @@
self.assertEqual(ifaces, [(baz)])
def test_getLocalInterface_raisesComponentLookupError(self):
- gsm = zapi.getGlobalSiteManager()
+ gsm = zope.component.getGlobalSiteManager()
gsm.registerUtility(Foo("global"), Interface)
gsm.registerUtility(Baz("global baz"), IBaz)
gsm.registerUtility(Foo("global bob"), IInterface, name="bob")
@@ -156,7 +156,7 @@
foo = Foo("global bob")
bar = Bar("global")
baz = Baz("global baz")
- gsm = zapi.getGlobalSiteManager()
+ gsm = zope.component.getGlobalSiteManager()
gsm.registerUtility(foo, IInterface, name="bob")
gsm.registerUtility(bar, IInterface)
gsm.registerUtility(baz, IBaz)
@@ -169,7 +169,7 @@
foo = Foo("global bob")
bar = Bar("global")
baz = Baz("global baz")
- gsm = zapi.getGlobalSiteManager()
+ gsm = zope.component.getGlobalSiteManager()
gsm.registerUtility(foo, IInterface, name="bob")
gsm.registerUtility(bar, IInterface)
gsm.registerUtility(baz, IBaz)
@@ -178,11 +178,11 @@
[foo])
def test_query_get_Utility_delegates_to_global(self):
- gsm = zapi.getGlobalSiteManager()
+ gsm = zope.component.getGlobalSiteManager()
gsm.provideUtility(IInterface, Foo("global"))
gsm.provideUtility(IInterface, Foo("global bob"), name="bob")
- sm = zapi.getSiteManager(self.rootFolder)
+ sm = zope.component.getSiteManager(self.rootFolder)
self.assert_(gsm != sm)
# If queryUtility works on the site manager, getUtility in zapi must
@@ -192,11 +192,11 @@
"foo global bob")
def test_local_utilities(self):
- gsm = zapi.getGlobalSiteManager()
+ gsm = zope.component.getGlobalSiteManager()
gsm.registerUtility(Foo("global"), IInterface)
gsm.registerUtility(Foo("global bob"), IInterface, name="bob")
- sm = zapi.getSiteManager(self.rootFolder)
+ sm = zope.component.getSiteManager(self.rootFolder)
default = traverse(self.rootFolder, "++etc++site/default")
default['foo'] = Foo("local")
foo = default['foo']
Modified: Zope3/branches/jim-adapter/src/zope/app/session/configure.zcml
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/session/configure.zcml 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/session/configure.zcml 2006-04-05 11:59:36 UTC (rev 66518)
@@ -20,7 +20,7 @@
<adapter
for="zope.publisher.interfaces.IRequest"
- provides="zope.app.traversing.interfaces.IPathAdapter"
+ provides="zope.traversing.interfaces.IPathAdapter"
factory=".session.Session"
name="session"
permission="zope.Public"
@@ -28,7 +28,7 @@
<class class=".session.Session">
<allow interface=".interfaces.ISession" />
- <implements interface="zope.app.traversing.interfaces.IPathAdapter" />
+ <implements interface="zope.traversing.interfaces.IPathAdapter" />
</class>
<class class=".http.CookieClientIdManager">
Modified: Zope3/branches/jim-adapter/src/zope/app/sqlscript/tests/test_sqlscript.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/sqlscript/tests/test_sqlscript.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/sqlscript/tests/test_sqlscript.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -16,21 +16,18 @@
"""
import unittest
from zope.interface import implements, classImplements
+from zope.traversing.interfaces import IPhysicallyLocatable
from zope.app.testing import ztapi
from zope.app.rdb.interfaces import IZopeDatabaseAdapter
-from zope.app.rdb.interfaces import IZopeConnection
-from zope.app.rdb.interfaces import IZopeCursor
+from zope.app.rdb.interfaces import IZopeConnection, IZopeCursor
from zope.app.testing.placelesssetup import PlacelessSetup
-
from zope.app.annotation.interfaces import IAnnotatable, IAnnotations
from zope.app.annotation.interfaces import IAttributeAnnotatable
from zope.app.annotation.attribute import AttributeAnnotations
-
from zope.app.cache.interfaces import ICacheable, ICache
from zope.app.cache.annotationcacheable import AnnotationCacheable
from zope.app.cache.caching import getCacheForObject
-from zope.app.traversing.interfaces import IPhysicallyLocatable
from zope.app.sqlscript.sqlscript import SQLScript, Arguments
from zope.app.sqlscript.interfaces import ISQLScript
Modified: Zope3/branches/jim-adapter/src/zope/app/testing/placelesssetup.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/testing/placelesssetup.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/testing/placelesssetup.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -15,9 +15,12 @@
$Id$
"""
-from zope.app.testing import ztapi
from zope.schema.vocabulary import setVocabularyRegistry
from zope.component.testing import PlacelessSetup as CAPlacelessSetup
+from zope.traversing.browser.interfaces import IAbsoluteURL
+from zope.traversing.browser.absoluteurl import AbsoluteURL
+
+from zope.app.testing import ztapi
from zope.app.event.tests.placelesssetup \
import PlacelessSetup as EventPlacelessSetup
from zope.app.i18n.tests.placelesssetup \
@@ -27,8 +30,6 @@
from zope.app.authentication.placelesssetup \
import PlacelessSetup as AuthenticationPlacelessSetup
from zope.app.security._protections import protect
-from zope.app.traversing.browser.interfaces import IAbsoluteURL
-from zope.app.traversing.browser.absoluteurl import AbsoluteURL
class PlacelessSetup(CAPlacelessSetup,
EventPlacelessSetup,
Modified: Zope3/branches/jim-adapter/src/zope/app/testing/setup.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/testing/setup.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/testing/setup.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -17,12 +17,11 @@
"""
import zope.component
import zope.interface
-from zope.app import zapi
-from zope.app.testing import ztapi
+import zope.traversing.api
from zope.interface import classImplements
+from zope.app.testing import ztapi
import zope.deferredimport
-
zope.deferredimport.deprecatedFrom(
"Goes away in Zope 3.5",
"zope.app.testing.back35",
@@ -48,19 +47,19 @@
#------------------------------------------------------------------------
# Traversal
-from zope.app.traversing.browser.interfaces import IAbsoluteURL
+from zope.traversing.browser.interfaces import IAbsoluteURL
+from zope.traversing.interfaces import IContainmentRoot
+from zope.traversing.interfaces import IPhysicallyLocatable
+from zope.traversing.interfaces import ITraverser, ITraversable
+from zope.traversing.adapters import DefaultTraversable
+from zope.traversing.adapters import Traverser, RootPhysicallyLocatable
+from zope.traversing.namespace import etc
+from zope.app.location.traversing import LocationPhysicallyLocatable
from zope.app.container.traversal import ContainerTraversable
from zope.app.container.interfaces import ISimpleReadContainer
-from zope.app.traversing.interfaces import IContainmentRoot
-from zope.app.traversing.interfaces import IPhysicallyLocatable
-from zope.app.traversing.interfaces import ITraverser, ITraversable
-from zope.app.traversing.adapters import DefaultTraversable
-from zope.app.traversing.adapters import Traverser, RootPhysicallyLocatable
-from zope.app.location.traversing import LocationPhysicallyLocatable
-from zope.app.traversing.namespace import etc
def setUpTraversal():
- from zope.app.traversing.browser import SiteAbsoluteURL, AbsoluteURL
+ from zope.traversing.browser import SiteAbsoluteURL, AbsoluteURL
ztapi.provideAdapter(None, ITraverser, Traverser)
ztapi.provideAdapter(None, ITraversable, DefaultTraversable)
@@ -168,7 +167,7 @@
folder.setSiteManager(LocalSiteManager(folder))
if setsite:
setSite(folder)
- return zapi.traverse(folder, "++etc++site")
+ return zope.traversing.api.traverse(folder, "++etc++site")
#------------------------------------------------------------------------
Modified: Zope3/branches/jim-adapter/src/zope/app/testing/ztapi.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/testing/ztapi.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/testing/ztapi.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -16,11 +16,11 @@
$Id$
"""
import zope.interface
+import zope.component
from zope.component.interfaces import IDefaultViewName
from zope.publisher.browser import IBrowserRequest
from zope.publisher.interfaces.browser import IDefaultBrowserLayer
-from zope.app import zapi
-from zope.app.traversing.interfaces import ITraversable
+from zope.traversing.interfaces import ITraversable
def provideView(for_, type, providing, name, factory, layer=None):
if layer is None:
@@ -58,14 +58,14 @@
type=IBrowserRequest):
if layer is None:
layer = type
- gsm = zapi.getGlobalSiteManager()
+ gsm = zope.component.getGlobalSiteManager()
gsm.provideAdapter((for_, layer), IDefaultViewName, '', name)
stypes = list, tuple
def provideAdapter(required, provided, factory, name='', with=()):
if isinstance(factory, (list, tuple)):
raise ValueError("Factory cannot be a list or tuple")
- gsm = zapi.getGlobalSiteManager()
+ gsm = zope.component.getGlobalSiteManager()
if with:
required = (required, ) + tuple(with)
@@ -75,7 +75,7 @@
gsm.registerAdapter(factory, required, provided, name)
def subscribe(required, provided, factory):
- gsm = zapi.getGlobalSiteManager()
+ gsm = zope.component.getGlobalSiteManager()
if provided is None:
gsm.registerHandler(factory, required)
else:
@@ -83,11 +83,11 @@
def provideUtility(provided, component, name=''):
- gsm = zapi.getGlobalSiteManager()
+ gsm = zope.component.getGlobalSiteManager()
gsm.registerUtility(component, provided, name)
def unprovideUtility(provided, name=''):
- gsm = zapi.getGlobalSiteManager()
+ gsm = zope.component.getGlobalSiteManager()
gsm.provideAdapter((), provided, name, None)
def provideNamespaceHandler(name, handler):
Modified: Zope3/branches/jim-adapter/src/zope/app/tree/browser/cookie.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/tree/browser/cookie.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/tree/browser/cookie.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -15,12 +15,13 @@
$Id$
"""
-from zope.app import zapi
+import zope.traversing.api
+from zope.traversing.interfaces import IContainmentRoot
+from zope.component.interfaces import IComponentLookup
+
from zope.app.container.interfaces import IContainer
from zope.app.folder.interfaces import IFolder
from zope.app.component.interfaces import ISite
-from zope.component.interfaces import IComponentLookup
-from zope.app.traversing.interfaces import IContainmentRoot
from zope.app.tree.filters import OnlyInterfacesFilter
from zope.app.tree.browser import StatefulTreeView
Modified: Zope3/branches/jim-adapter/src/zope/app/tree/tests/test_adapters.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/tree/tests/test_adapters.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/tree/tests/test_adapters.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -21,16 +21,15 @@
from zope.component.interfaces import ComponentLookupError
from zope.security.checker import defineChecker
from zope.security.checker import NamesChecker
+from zope.traversing.interfaces import IContainmentRoot
from zope.app.location.interfaces import ILocation
from zope.app.container.interfaces import IReadContainer
from zope.app.component.interfaces import ISite
-from zope.app.traversing.interfaces import IContainmentRoot
from zope.app.container.sample import SampleContainer
from zope.app.container.contained import setitem
from zope.app.testing.placelesssetup import PlacelessSetup
-from zope.app import zapi
from zope.app.testing import ztapi
from zope.app.tree.interfaces import IUniqueId, IChildObjects, \
Modified: Zope3/branches/jim-adapter/src/zope/app/undo/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/undo/__init__.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/undo/__init__.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -20,9 +20,9 @@
import transaction
import zope.component
from zope.interface import implements
+from zope.traversing.interfaces import IPhysicallyLocatable
from zope.app.undo.interfaces import IUndoManager, UndoError
-from zope.app.traversing.interfaces import IPhysicallyLocatable
from zope.app.security.principalregistry import principalRegistry
from zope.app.security.interfaces import IPrincipal
from zope.app.security.interfaces import PrincipalLookupError
Modified: Zope3/branches/jim-adapter/src/zope/app/undo/tests/test_zodbundomanager.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/undo/tests/test_zodbundomanager.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/undo/tests/test_zodbundomanager.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -85,7 +85,7 @@
# provide location adapter
from zope.app.location.traversing import LocationPhysicallyLocatable
from zope.app.location.interfaces import ILocation
- from zope.app.traversing.interfaces import IPhysicallyLocatable
+ from zope.traversing.interfaces import IPhysicallyLocatable
ztapi.provideAdapter(ILocation, IPhysicallyLocatable,
LocationPhysicallyLocatable)
@@ -112,7 +112,7 @@
def testGetTransactionsInLocation(self):
from zope.interface import directlyProvides
from zope.app.location import Location
- from zope.app.traversing.interfaces import IContainmentRoot
+ from zope.traversing.interfaces import IContainmentRoot
root = Location()
spam = Location()
Modified: Zope3/branches/jim-adapter/src/zope/app/versioncontrol/README.txt
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/versioncontrol/README.txt 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/versioncontrol/README.txt 2006-04-05 11:59:36 UTC (rev 66518)
@@ -23,9 +23,9 @@
>>> import persistent
>>> from zope import component, interface
+ >>> import zope.traversing.interfaces
>>> import zope.app.annotation.attribute
>>> import zope.app.annotation.interfaces
- >>> import zope.app.traversing.interfaces
>>> from zope.app.versioncontrol import interfaces
>>> marker = object()
@@ -35,7 +35,7 @@
... interfaces.IVersionable,
... interfaces.INonVersionedData,
... zope.app.annotation.interfaces.IAttributeAnnotatable,
- ... zope.app.traversing.interfaces.IPhysicallyLocatable,
+ ... zope.traversing.interfaces.IPhysicallyLocatable,
... )
...
... # Methods defined by INonVersionedData
Modified: Zope3/branches/jim-adapter/src/zope/app/versioncontrol/tests.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/versioncontrol/tests.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/versioncontrol/tests.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -18,20 +18,19 @@
import sys
import unittest
import persistent
+from transaction import abort
+import zope.event
+import zope.traversing.interfaces
from zope import component, interface
from zope.component.testing import PlacelessSetup
from zope.testing import doctest, module
-from transaction import abort
-import zope.event
-
import zope.app.annotation.interfaces
import zope.app.annotation.attribute
import zope.app.location
import zope.app.versioncontrol.version
from zope.app.versioncontrol import interfaces, nonversioned
-import zope.app.traversing.interfaces
name = 'zope.app.versioncontrol.README'
@@ -59,7 +58,7 @@
class L(persistent.Persistent, zope.app.location.Location):
interface.implements(interfaces.IVersionable,
zope.app.annotation.interfaces.IAttributeAnnotatable,
- zope.app.traversing.interfaces.IPhysicallyLocatable,
+ zope.traversing.interfaces.IPhysicallyLocatable,
)
def getPath(self):
return 'whatever'
Modified: Zope3/branches/jim-adapter/src/zope/app/workflow/browser/definition.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/workflow/browser/definition.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/workflow/browser/definition.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -15,8 +15,7 @@
$Id$
"""
-
-from zope.app.traversing.api import traverse
+from zope.traversing.api import traverse
# registration path changed
from zope.app.component.interfaces.registration import IRegistered
from zope.app.workflow.interfaces import IProcessDefinitionImportHandler
Modified: Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/instance.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/instance.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/workflow/stateful/instance.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -18,8 +18,6 @@
from persistent import Persistent
from persistent.dict import PersistentDict
-from zope.app import zapi
-from zope.event import notify
from zope.app.workflow.interfaces import IProcessDefinition
from zope.app.workflow.stateful.interfaces import AUTOMATIC
from zope.app.workflow.stateful.interfaces import IAfterTransitionEvent
@@ -29,10 +27,12 @@
from zope.app.workflow.stateful.interfaces import ITransitionEvent
from zope.app.workflow.stateful.interfaces import IBeforeRelevantDataChangeEvent
from zope.app.workflow.stateful.interfaces import IAfterRelevantDataChangeEvent
-from zope.app.traversing.api import getParent
from zope.app.workflow.instance import ProcessInstance
from zope.app.container.contained import Contained
+from zope.component import getUtility, getSiteManager
+from zope.event import notify
+from zope.traversing.api import getParent
from zope.security.interfaces import Unauthorized
from zope.interface import directlyProvides, implements
from zope.proxy import removeAllProxies
@@ -215,7 +215,7 @@
def getProcessDefinition(self):
"""Get the ProcessDefinition object from Workflow Utility."""
- return zapi.getUtility(IProcessDefinition, self.processDefinitionName)
+ return getUtility(IProcessDefinition, self.processDefinitionName)
def _getContext(self):
ctx = {}
@@ -272,9 +272,7 @@
if not script:
return True
if isinstance(script, (str, unicode)):
- #removed getServices in exchange for getSiteManager
- #sm = zapi.getServices(self)
- sm = zapi.getSiteManager(self)
+ sm = getSiteManager(self)
script = sm.resolve(script)
return script(contexts)
Modified: Zope3/branches/jim-adapter/src/zope/app/zapi/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/zapi/__init__.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/zapi/__init__.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -28,11 +28,10 @@
__all__ = tuple(IZAPI)
from zope.component import *
-
from zope.app.publisher.browser import getDefaultViewName
from zope.app.publisher.browser import queryDefaultViewName
-from zope.app.traversing.api import *
-from zope.app.traversing.browser.absoluteurl import absoluteURL
+from zope.traversing.api import *
+from zope.traversing.browser.absoluteurl import absoluteURL
from zope.exceptions.interfaces import UserError
name = getName
Modified: Zope3/branches/jim-adapter/src/zope/app/zapi/interfaces.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/zapi/interfaces.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/zapi/interfaces.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -17,9 +17,9 @@
"""
from zope.interface import Attribute
from zope.component.interfaces import IComponentArchitecture
+from zope.traversing.interfaces import ITraversalAPI
+from zope.traversing.browser.interfaces import IAbsoluteURLAPI
from zope.app.publisher.browser import IDefaultViewNameAPI
-from zope.app.traversing.interfaces import ITraversalAPI
-from zope.app.traversing.browser.interfaces import IAbsoluteURLAPI
class IZAPI(
IComponentArchitecture,
Modified: Zope3/branches/jim-adapter/src/zope/app/zptpage/tests/test_zptpage.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/zptpage/tests/test_zptpage.py 2006-04-05 11:58:13 UTC (rev 66517)
+++ Zope3/branches/jim-adapter/src/zope/app/zptpage/tests/test_zptpage.py 2006-04-05 11:59:36 UTC (rev 66518)
@@ -15,28 +15,26 @@
$Id$
"""
-
import unittest
+from zope.component import getMultiAdapter
from zope.interface import directlyProvides
from zope.interface.verify import verifyClass
from zope.security.interfaces import Forbidden
+from zope.publisher.browser import TestRequest
-from zope.app import zapi
+from zope.traversing.adapters import Traverser, DefaultTraversable
+from zope.traversing.adapters import RootPhysicallyLocatable
+from zope.traversing.interfaces import ITraverser, ITraversable
+from zope.traversing.interfaces import IPhysicallyLocatable
+from zope.traversing.interfaces import IContainmentRoot
+from zope.security.checker import NamesChecker, defineChecker
+
from zope.app.testing import ztapi
-from zope.publisher.browser import TestRequest
from zope.app.publisher.browser import BrowserView
-
-# Wow, this is a lot of work. :(
from zope.app.testing.placelesssetup import PlacelessSetup
-from zope.app.traversing.adapters import Traverser, DefaultTraversable
-from zope.app.traversing.interfaces import ITraverser, ITraversable
-from zope.app.traversing.interfaces import IPhysicallyLocatable
-from zope.app.traversing.interfaces import IContainmentRoot
-from zope.security.checker import NamesChecker, defineChecker
from zope.app.container.contained import contained
from zope.app.location.traversing import LocationPhysicallyLocatable
-from zope.app.traversing.adapters import RootPhysicallyLocatable
from zope.app.zptpage.interfaces import IZPTPage
from zope.app.zptpage.zptpage import ZPTPage, ZPTSourceView,\
@@ -110,7 +108,7 @@
defineChecker(AU, NamesChecker(['__str__']))
- from zope.app.traversing.namespace import view
+ from zope.traversing.namespace import view
ztapi.provideNamespaceHandler('view', view)
ztapi.browserView(IZPTPage, 'name', AU)
@@ -227,7 +225,7 @@
page.setSource(html, content_type='text/plain')
request = TestRequest()
- view = zapi.getMultiAdapter((page, request), name='source.html')
+ view = getMultiAdapter((page, request), name='source.html')
self.assertEqual(str(view), html)
self.assertEqual(view(), html)
More information about the Zope3-Checkins
mailing list