Log message for revision 67700: Removed the usage of the now empty five:traversable, to get rid of the deprecation warning.
Changed: U Products.Five/branches/regebro-traversal_refactor/browser/tests/cps_test_localizer.txt U Products.Five/branches/regebro-traversal_refactor/browser/tests/test_traversable.py U Products.Five/branches/regebro-traversal_refactor/doc/localsite.txt U Products.Five/branches/regebro-traversal_refactor/doc/manual.txt U Products.Five/branches/regebro-traversal_refactor/doc/products/FiveMiscTutorial/configure.zcml U Products.Five/branches/regebro-traversal_refactor/doc/products/ViewsTutorial/configure.zcml U Products.Five/branches/regebro-traversal_refactor/form/tests/configure.zcml U Products.Five/branches/regebro-traversal_refactor/formlib/tests/configure.zcml U Products.Five/branches/regebro-traversal_refactor/tests/directives.zcml U Products.Five/branches/regebro-traversal_refactor/tests/test_viewable.py -=- Modified: Products.Five/branches/regebro-traversal_refactor/browser/tests/cps_test_localizer.txt =================================================================== --- Products.Five/branches/regebro-traversal_refactor/browser/tests/cps_test_localizer.txt 2006-04-28 09:36:32 UTC (rev 67699) +++ Products.Five/branches/regebro-traversal_refactor/browser/tests/cps_test_localizer.txt 2006-04-28 09:42:45 UTC (rev 67700) @@ -22,8 +22,6 @@ ... <i18n:registerTranslations directory="locales" /> ... </configure> ... - ... <five:traversable class="Products.CPSDefault.Portal.CPSDefaultSite" /> - ... ... <adapter ... for="zope.publisher.interfaces.http.IHTTPRequest" ... provides="zope.i18n.interfaces.IUserPreferredLanguages" Modified: Products.Five/branches/regebro-traversal_refactor/browser/tests/test_traversable.py =================================================================== --- Products.Five/branches/regebro-traversal_refactor/browser/tests/test_traversable.py 2006-04-28 09:36:32 UTC (rev 67699) +++ Products.Five/branches/regebro-traversal_refactor/browser/tests/test_traversable.py 2006-04-28 09:42:45 UTC (rev 67700) @@ -57,16 +57,6 @@ ... ... <!-- make the zope2.Public permission work --> ... <meta:redefinePermission from="zope2.Public" to="zope.Public" /> - ... - ... <five:traversable - ... class="Products.Five.tests.testing.fancycontent.FancyContent" - ... /> - ... <five:traversable - ... class="Products.Five.browser.tests.test_traversable.SimpleClass" - ... /> - ... <five:traversable - ... class="Products.Five.tests.testing.FiveTraversableFolder" - ... /> ... ... <!-- this view will never be found --> ... <browser:page @@ -216,7 +206,6 @@ ... attribute="eagle" ... permission="zope2.Public" ... /> - ... <five:traversable class="OFS.Application.Application"/> ... </configure>''' >>> import Products.Five >>> from Products.Five import zcml Modified: Products.Five/branches/regebro-traversal_refactor/doc/localsite.txt =================================================================== --- Products.Five/branches/regebro-traversal_refactor/doc/localsite.txt 2006-04-28 09:36:32 UTC (rev 67699) +++ Products.Five/branches/regebro-traversal_refactor/doc/localsite.txt 2006-04-28 09:42:45 UTC (rev 67700) @@ -42,12 +42,7 @@ the site manager to site; it is assumed that the site already knows how to get its site manager. -Also note that in order for the view to work, the object's class needs -to be Five-traversable, e.g. with the following ZCML statement: - <five:traversable class=".module.MyClass" /> - - Custom site implementations --------------------------- Modified: Products.Five/branches/regebro-traversal_refactor/doc/manual.txt =================================================================== --- Products.Five/branches/regebro-traversal_refactor/doc/manual.txt 2006-04-28 09:36:32 UTC (rev 67699) +++ Products.Five/branches/regebro-traversal_refactor/doc/manual.txt 2006-04-28 09:42:45 UTC (rev 67700) @@ -260,28 +260,7 @@ ``five`` in this case refers to the XML namespace for Five, ``http://namespace.zope.org/five``. -We've provided another ZCML directive to make an object -traversable. To make your MyClass traversable, let's assume it is in -``mymodule``, in the same package as the zcml file we are editing:: - <five:traversable class=".mymodule.MyClass" /> - -To continue our example, to make Zope's ``Folder`` traversable through -Five, you need to declare this in ZCML as well: - - <five:traversable class="OFS.Folder.Folder"/> - -This makes Folder traverse in the Zope 3 way first, looking up views -and other things, and then if they cannot be found, fall back on the -regular Zope 2 traversal. It does this by overriding the -``__bobo_traverse__`` hook. Old hooks that are already in place in an -object will be stored and become the secondary fallback. This allows -the ZMI to work still, but new views can be added on the fly. - -Note that at the point of writing it is only possible to make an object -viewable through ZCML if this object does not already provide its own -``__bobo_traverse__`` method. - Views in Five are simple classes. The only requirements for a Five view class are: Modified: Products.Five/branches/regebro-traversal_refactor/doc/products/FiveMiscTutorial/configure.zcml =================================================================== --- Products.Five/branches/regebro-traversal_refactor/doc/products/FiveMiscTutorial/configure.zcml 2006-04-28 09:36:32 UTC (rev 67699) +++ Products.Five/branches/regebro-traversal_refactor/doc/products/FiveMiscTutorial/configure.zcml 2006-04-28 09:42:45 UTC (rev 67700) @@ -4,8 +4,6 @@ xmlns:five="http://namespaces.zope.org/five" > -<five:traversable class="OFS.Folder.Folder" /> - <browser:resource image="z3base.png" name="z3base.png" Modified: Products.Five/branches/regebro-traversal_refactor/doc/products/ViewsTutorial/configure.zcml =================================================================== --- Products.Five/branches/regebro-traversal_refactor/doc/products/ViewsTutorial/configure.zcml 2006-04-28 09:36:32 UTC (rev 67699) +++ Products.Five/branches/regebro-traversal_refactor/doc/products/ViewsTutorial/configure.zcml 2006-04-28 09:42:45 UTC (rev 67700) @@ -3,12 +3,8 @@ xmlns:browser="http://namespaces.zope.org/browser" xmlns:five="http://namespaces.zope.org/five"> - <five:traversable class="OFS.Application.Application"/> - <!-- OFS.Folder.Folder views --> - <five:traversable class="OFS.Folder.Folder"/> - <browser:page for="OFS.interfaces.IFolder" name="overview.html" @@ -49,8 +45,6 @@ <!-- .democontent.IDemoContent views --> - <five:traversable class=".democontent.DemoContent"/> - <browser:page for="zope.app.container.interfaces.IAdding" name="addDemoContent.html" Modified: Products.Five/branches/regebro-traversal_refactor/form/tests/configure.zcml =================================================================== --- Products.Five/branches/regebro-traversal_refactor/form/tests/configure.zcml 2006-04-28 09:36:32 UTC (rev 67699) +++ Products.Five/branches/regebro-traversal_refactor/form/tests/configure.zcml 2006-04-28 09:42:45 UTC (rev 67700) @@ -10,7 +10,6 @@ <meta:redefinePermission from="zope2.Public" to="zope.Public" /> <!-- browser forms --> - <five:traversable class=".schemacontent.FieldContent" /> <browser:editform schema=".schemacontent.IFieldContent" @@ -20,8 +19,6 @@ permission="zope2.Public" /> - <five:traversable class=".schemacontent.ComplexSchemaContent" /> - <browser:editform schema=".schemacontent.IComplexSchemaContent" for=".schemacontent.IComplexSchemaContent" Modified: Products.Five/branches/regebro-traversal_refactor/formlib/tests/configure.zcml =================================================================== --- Products.Five/branches/regebro-traversal_refactor/formlib/tests/configure.zcml 2006-04-28 09:36:32 UTC (rev 67699) +++ Products.Five/branches/regebro-traversal_refactor/formlib/tests/configure.zcml 2006-04-28 09:42:45 UTC (rev 67700) @@ -6,11 +6,7 @@ xmlns:i18n="http://namespaces.zope.org/i18n" i18n_domain="formtest" > - - <five:traversable class="OFS.Folder.Folder" /> - <five:traversable class=".content.Content" /> - <browser:page name="add_content" for="*" Modified: Products.Five/branches/regebro-traversal_refactor/tests/directives.zcml =================================================================== --- Products.Five/branches/regebro-traversal_refactor/tests/directives.zcml 2006-04-28 09:36:32 UTC (rev 67699) +++ Products.Five/branches/regebro-traversal_refactor/tests/directives.zcml 2006-04-28 09:42:45 UTC (rev 67700) @@ -7,22 +7,6 @@ factory=".adapters.Adapter" /> - <!-- this is a test whether five:traversable can be called more than - once on a class; SimpleContent inherits from Traversable, so - one directive suffices here --> - - <five:traversable class="Products.Five.tests.testing.simplecontent.SimpleContent" /> - - <!-- this is a test whether the *directive* can be called more than - once without raising a conflicting configuration exception --> - - <five:traversable class="Products.Five.tests.testing.simplecontent.SimpleContent" /> - - <!-- this tests whether five:traversable can be called on a class that - already provides __bobo_traverse__, such as our FancyContent --> - - <five:traversable class="Products.Five.tests.testing.fancycontent.FancyContent" /> - <!-- Testing the vocabulary directive --> <vocabulary Modified: Products.Five/branches/regebro-traversal_refactor/tests/test_viewable.py =================================================================== --- Products.Five/branches/regebro-traversal_refactor/tests/test_viewable.py 2006-04-28 09:36:32 UTC (rev 67699) +++ Products.Five/branches/regebro-traversal_refactor/tests/test_viewable.py 2006-04-28 09:42:45 UTC (rev 67700) @@ -21,7 +21,8 @@ def test_defaultView(): """ - Testing default view functionality + This tests the default view functionality. It also tests the deprecated + BrowserDefault class. References to BrowserDefault can be removed in 2.12. Take a class Foo and an interface IFoo: @@ -50,15 +51,21 @@ Now take a BrowserDefault for an instance of Foo:: + >>> import zope.deprecation >>> foo = Foo() >>> from Products.Five.viewable import BrowserDefault + >>> zope.deprecation.__show__.off() >>> bd = BrowserDefault(foo) + >>> zope.deprecation.__show__.on() For now the default view name is index.html, like we set above: >>> from Products.Five.traversable import FakeRequest >>> request = FakeRequest() - + >>> from zope.app.publisher.browser import queryDefaultViewName + + >>> queryDefaultViewName(foo, request) + u'index.html' >>> obj, path = bd.defaultView(request) >>> obj is foo True @@ -69,6 +76,9 @@ >>> from zope.interface import directlyProvides >>> directlyProvides(foo, IFoo) + >>> queryDefaultViewName(foo, request) + u'foo.html' + >>> obj, path = bd.defaultView(request) >>> obj is foo True _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins