Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Dev

Simplifying dependencies of zope.app.publisher

 

 

Zope dev RSS feed   Index | Next | Previous | View Threaded


kobold at kobold

Jul 8, 2009, 2:09 PM

Post #1 of 9 (1006 views)
Permalink
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
_______________________________________________
Zope-Dev maillist - Zope-Dev [at] zope
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


faassen at startifact

Aug 6, 2009, 9:33 AM

Post #2 of 9 (833 views)
Permalink
Re: Simplifying dependencies of zope.app.publisher [In reply to]

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


_______________________________________________
Zope-Dev maillist - Zope-Dev [at] zope
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


kobold at kobold

Aug 6, 2009, 11:01 AM

Post #3 of 9 (845 views)
Permalink
Re: Simplifying dependencies of zope.app.publisher [In reply to]

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
_______________________________________________
Zope-Dev maillist - Zope-Dev [at] zope
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


shane at hathawaymix

Aug 6, 2009, 1:39 PM

Post #4 of 9 (832 views)
Permalink
Re: Simplifying dependencies of zope.app.publisher [In reply to]

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

_______________________________________________
Zope-Dev maillist - Zope-Dev [at] zope
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


jim at zope

Aug 7, 2009, 7:45 AM

Post #5 of 9 (832 views)
Permalink
Re: Simplifying dependencies of zope.app.publisher [In reply to]

2009/7/8 Fabio Tranchitella <kobold [at] kobold>:
> 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
_______________________________________________
Zope-Dev maillist - Zope-Dev [at] zope
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


jim at zope

Aug 7, 2009, 7:55 AM

Post #6 of 9 (827 views)
Permalink
Re: Simplifying dependencies of zope.app.publisher [In reply to]

On Thu, Aug 6, 2009 at 4:39 PM, Shane Hathaway<shane [at] hathawaymix> 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
_______________________________________________
Zope-Dev maillist - Zope-Dev [at] zope
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


jim at zope

Aug 7, 2009, 10:42 AM

Post #7 of 9 (833 views)
Permalink
Re: Simplifying dependencies of zope.app.publisher [In reply to]

2009/8/7 Fabio Tranchitella <fabio [at] tranchitella>:
> Hey Jim,
>
> you picked up an old e-mail of mine (it is from 8th of July)! :)

I know, but I thought my response was most applicable to the original. :)

>
> * 2009-08-07 17:13, Jim Fulton wrote:
>> For now, make these registrations conditional on the installation of
>> zope.container and then get rid of the dependency.
>
> I like your approach about optional dependencies, and IIRC I already
> proposed something like this on the list.

Cool. :)

> I think although that it is not safe to make any change until we get a
> clean, tested, explicit and globally accepted KGS for the ZTK. This is my
> top priority right now. :)

That makes me happy. :)

Jim

--
Jim Fulton
_______________________________________________
Zope-Dev maillist - Zope-Dev [at] zope
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


faassen at startifact

Aug 8, 2009, 9:48 AM

Post #8 of 9 (819 views)
Permalink
Re: Simplifying dependencies of zope.app.publisher [In reply to]

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

_______________________________________________
Zope-Dev maillist - Zope-Dev [at] zope
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


faassen at startifact

Aug 8, 2009, 10:30 AM

Post #9 of 9 (824 views)
Permalink
Re: Simplifying dependencies of zope.app.publisher [In reply to]

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

_______________________________________________
Zope-Dev maillist - Zope-Dev [at] zope
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Zope dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.