[ZCM] [ZC] 2264/ 3 Assign "Five: browser:view should set __name__"
"Collector: Zope Bugs, Features, and Patches ..." <[email protected]> Tue, 27 Mar 2007 11:06:24 -0400
| Newsgroups | gmane.comp.web.zope.devel.collector-monitor |
|---|---|
| Message-ID | <[email protected]> |
Issue #2264 Update (Assign) "Five: browser:view should set __name__" Status Accepted, Zope/bug medium To followup, visit: http://www.zope.org/Collectors/Zope/2264 ============================================================== = Assign - Entry #3 by mj on Mar 27, 2007 11:06 am Status: Pending => Accepted Supporters added: philikon Fixed on the Zope trunk: http://svn.zope.org/?rev=73766&view=rev and in the Five 1.5 branch: http://svn.zope.org/?rev=73767&view=rev and in the Five 1.4 branch: http://svn.zope.org/?rev=73770&view=rev and in the Five 1.3 branch: http://svn.zope.org/?rev=73768&view=rev I have no idea where to log the change though; Zope 2.9/2.10 changelogs? Also, did I miss any branches of Five this needs to be merged to? I merged to 1.3 (Zope 2.9) and 1.5 (Zope 2.10) because they cover currently maintained Zope versions, and 1.4 because I pitied it not being attached to a Zope version in between. :) Feel free to close if I'm all done, or re-assign to me with pointers. ________________________________________ = Comment - Entry #2 by philikon on Jan 12, 2007 9:31 am Thanks for the report. You're right, browser:view doesn't seem to do this, though browser:page does. Perhaps you could round up a simple unit test (crafted after the ones in Five/browser/tests) and provide a fix along with it. The browser:page implementation in Five/browser/metaconfigure.py should provide enough inspiration :). ________________________________________ = Request - Entry #1 by mj on Jan 12, 2007 4:55 am In Zope3, browser:view sets __name__ on the generated class to the name of the view; after all it is a ILocation implementation. The Zope2/Five implementation of the directive omits this. However, Zope2's recordMetaData depends on either __name__ being set, or getPhysicalPath being available, so a plain Products.Five.BrowserView-based view class can never be rendered without it setting __name__ explicitly (or implementing getPhysicalPath). ==============================================================