[Zope3-checkins] CVS: Zope3/src/zope/app/apidoc/classmodule -
__init__.py:1.11 ftests.py:1.4
Jim Fulton
jim at zope.com
Sun Apr 18 12:01:02 EDT 2004
Update of /cvs-repository/Zope3/src/zope/app/apidoc/classmodule
In directory cvs.zope.org:/tmp/cvs-serv12900/src/zope/app/apidoc/classmodule
Modified Files:
__init__.py ftests.py
Log Message:
Changed way namespace handlers (handlers for traversing names of the
form "++namespace++name") are registered. Now the are registered as
views and adapters. When traversing a namespace-qualified view, a
request is sometimes provided. When a request is provided, a view
will be used to traverse the name. Otherwise, an adapter is used.
handlers that don't care about the request are registered as both an
adapter and a view.
With this change, it's not possible to have content-specific
namespace-specific traversers. Content objects can now define
specialized namespaces.
=== Zope3/src/zope/app/apidoc/classmodule/__init__.py 1.10 => 1.11 ===
--- Zope3/src/zope/app/apidoc/classmodule/__init__.py:1.10 Sat Apr 17 13:15:31 2004
+++ Zope3/src/zope/app/apidoc/classmodule/__init__.py Sun Apr 18 12:00:31 2004
@@ -152,8 +152,9 @@
>>> keys = module.keys()
>>> keys.sort()
- >>> keys[:4]
- ['APIDocumentation', 'browser', 'classmodule', 'handleNamespace']
+ >>> keys[:5]
+ ['APIDocumentation', 'apidocNamespace', 'browser', 'classmodule', """ \
+ """'handleNamespace']
>>> print module['browser'].getPath()
zope.app.apidoc.browser
@@ -426,7 +427,7 @@
'zope.app.apidoc.handleNamespace'
>>> func.getSignature()
- '(name, ob, request)'
+ '(ob, name)'
>>> func.getDocString()
'Used to traverse to an API Documentation.'
=== Zope3/src/zope/app/apidoc/classmodule/ftests.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/apidoc/classmodule/ftests.py:1.3 Tue Apr 6 16:57:59 2004
+++ Zope3/src/zope/app/apidoc/classmodule/ftests.py Sun Apr 18 12:00:31 2004
@@ -66,7 +66,7 @@
basic='mgr:mgrpw')
self.assertEqual(response.getStatus(), 200)
body = response.getBody()
- self.assert_(body.find('handleNamespace(name, parameters, pname,') > 0)
+ self.assert_(body.find('handleNamespace(ob, name)') > 0)
self.checkForBrokenLinks(
body, '/++apidoc++/Class/zope/app/apidoc/handleNamesapce',
basic='mgr:mgrpw')
More information about the Zope3-Checkins
mailing list