Simplifying dependencies of zope.app.publisher
Hello, I'm sorry if I am flooding the list with all my requests/messages, but I don't want to introduce changes without approval of more experienced zope developers. I was analyzing zope.app.publisher, and I found that it would be possible to remove its dependency on zope.container because the latter is only used in zope/app/publisher/xmlrpc/configure.zcml to declare thee views like this: <view for="zope.container.interfaces.IItemContainer" type="zope.publisher.interfaces.xmlrpc.IXMLRPCRequest" provides="zope.publisher.interfaces.xmlrpc.IXMLRPCPublisher" factory="zope.container.traversal.ItemTraverser" permission="zope.Public" /> I think these snippets should me moved to zope.container's configure.zcml, where we already have other traversers. Do you agree with this change? -- Fabio Tranchitella http://www.kobold.it Free Software Developer and Consultant http://www.tranchitella.it _____________________________________________________________________ 1024D/7F961564, fpr 5465 6E69 E559 6466 BF3D 9F01 2BF8 EE2B 7F96 1564
Hey Fabio, Fabio Tranchitella wrote:
I'm sorry if I am flooding the list with all my requests/messages, but I don't want to introduce changes without approval of more experienced zope developers.
A belated +1 to discussing things, and +1 to doing work. :)
I was analyzing zope.app.publisher, and I found that it would be possible to remove its dependency on zope.container because the latter is only used in zope/app/publisher/xmlrpc/configure.zcml to declare thee views like this:
<view for="zope.container.interfaces.IItemContainer" type="zope.publisher.interfaces.xmlrpc.IXMLRPCRequest" provides="zope.publisher.interfaces.xmlrpc.IXMLRPCPublisher" factory="zope.container.traversal.ItemTraverser" permission="zope.Public" />
I think these snippets should me moved to zope.container's configure.zcml, where we already have other traversers.
Do you agree with this change?
I remember looking at this relationship in the past but I don't remember noticing it was this easy. If this looks possible, by all means go ahead. Regards, Martijn
Hello, * 2009-08-06 18:55, Martijn Faassen wrote:
I was analyzing zope.app.publisher, and I found that it would be possible to remove its dependency on zope.container because the latter is only used in zope/app/publisher/xmlrpc/configure.zcml to declare thee views like this:
<view for="zope.container.interfaces.IItemContainer" type="zope.publisher.interfaces.xmlrpc.IXMLRPCRequest" provides="zope.publisher.interfaces.xmlrpc.IXMLRPCPublisher" factory="zope.container.traversal.ItemTraverser" permission="zope.Public" />
I think these snippets should me moved to zope.container's configure.zcml, where we already have other traversers.
Do you agree with this change?
I remember looking at this relationship in the past but I don't remember noticing it was this easy. If this looks possible, by all means go ahead.
I don't think this change would be correct; we have a weird situation, because: - zope.app.publisher depends on zope.container only because xmlrpc's configure.zcml defines a couple of traversers for some zope.container interfaces (providing zope.publisher.interfaces.xmlrpc.IXMLRPCPublisher); - zope.container by itself depends on zope.publisher, because it defines some traversers for some zope.container interfaces (providing zope.publisher.interfaces.browser.IBrowserRequest). It is weird because XMLRPC and Browserrequest are handled in different ways: the former is configured by zope.app.publisher, the latter by zope.container itself. Jim suggested that zope.container shouldn't assume that I want to use zope.publisher, and thus it is not a good idea to move the configuration of the XMLRPC traversers to zope.container. My knowledge of the zope.publisher is too limited to do any change in this area, but to me it looks like these configurations (both of them) should be perfomed by zope.app.publisher (removing the dependency zope.container -> zope.publisher), but conditionally (zcml:condition) only if zope.container is installed, (removing the dependency zope.app.publisher -> zope.container). Anyway, I'm not going to dig more into this problem until we clearly define the ZTK and the policies to manage it. :) Best regards. Fabio
Fabio Tranchitella wrote:
My knowledge of the zope.publisher is too limited to do any change in this area, but to me it looks like these configurations (both of them) should be perfomed by zope.app.publisher (removing the dependency zope.container -> zope.publisher), but conditionally (zcml:condition) only if zope.container is installed, (removing the dependency zope.app.publisher -> zope.container).
I'm hoping Jim will soon take charge of zope.publisher, zope.traversing, zope.container, and zope.app.publisher, because he seems to be the only one who knows how they are supposed to be related. For example, which packages should be aware of XML-RPC? I would guess that none of them should have any notion of XML-RPC, and that there should be a "zope.xmlrpc" package, but my confidence in that guess is very low. Shane
On Thu, Aug 6, 2009 at 4:39 PM, Shane Hathaway<shane@hathawaymix.org> wrote: ...
I'm hoping Jim will soon take charge of zope.publisher, zope.traversing, zope.container, and zope.app.publisher, because he seems to be the only one who knows how they are supposed to be related.
Hah. Thanks a lot. ;) Things have moved around so much over the last couple of years I'm not sure anyone knows where things belong any more. ;) I do have some ideas for some specific minor cleanups in some of these. (That had to do with zope.app.publication, not zope.app.publisher.) That was blocked by the general instability we have right now. I'd really like us to stop moving things around until we get to a point where we have a reasonable kgs that has tests passing in Python 2.4-2.6 and on at least linux and mac. Once we have that and the processes in place to keep it, we can start to make progress again. I also have some ideas about how people should use zope.publisher (see the in progress, though stalled, zc.publication). Again, once we reach some stability, I can make progress on that again.
For example, which packages should be aware of XML-RPC? I would guess that none of them should have any notion of XML-RPC, and that there should be a "zope.xmlrpc" package, but my confidence in that guess is very low.
I'd really like to deprecate our current approach to XMLRPC. It's way too complicated. In the mean time, I'd like to find ways to make it more optional than it is now. Jim -- Jim Fulton
Hey, Jim Fulton wrote: [snip]
I do have some ideas for some specific minor cleanups in some of these. (That had to do with zope.app.publication, not zope.app.publisher.) That was blocked by the general instability we have right now. I'd really like us to stop moving things around until we get to a point where we have a reasonable kgs that has tests passing in Python 2.4-2.6 and on at least linux and mac. Once we have that and the processes in place to keep it, we can start to make progress again.
+1 on this. That's not to say I regret the progress we did make in the past, but past time to consolidate again before we can take new steps. Regards, Martijn
Hey, Fabio Tranchitella wrote: [snip]
Jim suggested that zope.container shouldn't assume that I want to use zope.publisher, and thus it is not a good idea to move the configuration of the XMLRPC traversers to zope.container.
I agree with that; I'd prefer zope.container to be publisher agnostic. I recall vaguely when looking at it thinking it might be possible to factor out the xmlrpc support entirely, but I don't recall the details.
My knowledge of the zope.publisher is too limited to do any change in this area, but to me it looks like these configurations (both of them) should be perfomed by zope.app.publisher (removing the dependency zope.container -> zope.publisher), but conditionally (zcml:condition) only if zope.container is installed, (removing the dependency zope.app.publisher -> zope.container).
That sounds like a reasonable approach, except that the conditional ZCML scares me a little bit - it's going to be hard to track down where a registration is made, perhaps. Regards, Martijn
2009/7/8 Fabio Tranchitella <kobold@kobold.it>:
Hello,
I'm sorry if I am flooding the list with all my requests/messages, but I don't want to introduce changes without approval of more experienced zope developers.
I was analyzing zope.app.publisher, and I found that it would be possible to remove its dependency on zope.container because the latter is only used in zope/app/publisher/xmlrpc/configure.zcml to declare thee views like this:
<view for="zope.container.interfaces.IItemContainer" type="zope.publisher.interfaces.xmlrpc.IXMLRPCRequest" provides="zope.publisher.interfaces.xmlrpc.IXMLRPCPublisher" factory="zope.container.traversal.ItemTraverser" permission="zope.Public" />
I think these snippets should me moved to zope.container's configure.zcml, where we already have other traversers.
Do you agree with this change?
Nope. (well, maybe in the long term) :) For now, make these registrations conditional on the installation of zope.container and then get rid of the dependency. See the other note I sent earlier today on optional dependencies. You'll also need to sort out the test dependency in browser/test_directoryresource. I expect that that dependency is spurious. Jim -- Jim Fulton
participants (4)
-
Fabio Tranchitella -
Jim Fulton -
Martijn Faassen -
Shane Hathaway