[Zope-dev] Default skin pain

2006-03-18 Thread Philipp von Weitershausen
Hi there,

Zope 3 has the concept of a default layer. This is a request interface
that most skins derive from. It is also the default request interface
that browser views are registered for if they don't specify another one
using the 'layer' argument.

Zope 3 also has the concept of a default skin. This is a request
interface that is specially registered and applied to the request after
it has been created. This last bit is important because you want all
subsequent view look-ups to take the default skin into account. Since
most browser views are registered for the default layer interface and
most skins derive from the default layer interface, not setting the
default skin on the request as early as possible would result in most
views not being found.

Of course, ZPublisher doesn't apply the default skin to the request
after its creation. Therefore, Five has to do a hack: upon the first
Five-style traversal (that might involve Zope 3 views), it puts the
default skin on the request. There are two problems with this approach:

* Previous traversal steps could have already set a different layer (or
skin) on the request. This is a valid usecase (e.g. ++skin++ can be used
for this). Five's behaviour would possibly make the previously applied
layers or skins ineffective again. Five tries to be as uninvasive as
possible by only doing this when the request doesn't have an ILayer
interface yet. Problem is, the notion of all layer interfaces providing
ILayer is going to go away (it's already deprecated on the Zope 3 trunk).

* More importantly, you sometimes might want to do view lookup before
the first Five-style traversal happens. Then you're dealing with a
virgin request that doesn't have the default skin installed (and
therefore neither the default layer in most case) and your view look-ups
 would probably fail because the views were registered for the default
layer.

The latter point is an issue in Plone, by the way.

I would propose to remove the Five hack and properly set the default
skin right after the request has been created. This would be in
ZPublisher.Publish.publish_module_standard.

(ZopeTestCase would also have to be fixed up so that each test gets its
individual request object [all tests currently share the same one!] and
that the request would also have the default skin set from the beginning)

Philipp

___
Zope-Dev maillist  -  Zope-Dev@zope.org
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 )


Re: [Zope-dev] Default skin pain

2006-03-18 Thread Lennart Regebro
On 3/18/06, Philipp von Weitershausen [EMAIL PROTECTED] wrote:
 I would propose to remove the Five hack and properly set the default
 skin right after the request has been created. This would be in
 ZPublisher.Publish.publish_module_standard.

That's probably a good idea.

Althoug, wasn't somebody going to try replacing the whole publisher?

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope-Dev maillist  -  Zope-Dev@zope.org
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 )


Re: [Zope-dev] Default skin pain

2006-03-18 Thread Philipp von Weitershausen
Lennart Regebro wrote:
I would propose to remove the Five hack and properly set the default
skin right after the request has been created. This would be in
ZPublisher.Publish.publish_module_standard.
 
 That's probably a good idea.
 
 Althoug, wasn't somebody going to try replacing the whole publisher?

Sure. We just can't wait for that. I consider this a bugfix so it'll go
into Zope 2.9 as well as the trunk.

Philipp
___
Zope-Dev maillist  -  Zope-Dev@zope.org
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 )


Re: [Zope-dev] Default skin pain

2006-03-18 Thread Lennart Regebro
On 3/18/06, Philipp von Weitershausen [EMAIL PROTECTED] wrote:
 Sure. We just can't wait for that. I consider this a bugfix so it'll go
 into Zope 2.9 as well as the trunk.

Oh, well in that case... +1.

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope-Dev maillist  -  Zope-Dev@zope.org
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 )


Re: [Zope-dev] New mailing list: [EMAIL PROTECTED] for all checkin messages

2006-03-18 Thread Jens Vagelpohl

I've set up a new mailing list that gets all checkins for the
zope.org CVS and Subversion repositories:

  http://mail.zope.org/mailman/listinfo/checkins


Does this list replace [EMAIL PROTECTED] as the default checkins list?

jens

___
Zope-Dev maillist  -  Zope-Dev@zope.org
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 )


Re: [Zope-dev] New mailing list: [EMAIL PROTECTED] for all checkin messages

2006-03-18 Thread Jim Fulton

Jens Vagelpohl wrote:

I've set up a new mailing list that gets all checkins for the
zope.org CVS and Subversion repositories:

  http://mail.zope.org/mailman/listinfo/checkins



Does this list replace [EMAIL PROTECTED] as the default checkins list?


Yes.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope-Dev maillist  -  Zope-Dev@zope.org
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] New mailing list: [EMAIL PROTECTED] for all checkin messages

2006-03-18 Thread Jim Fulton


I've set up a new mailing list that gets all checkins for the
zope.org CVS and Subversion repositories:

  http://mail.zope.org/mailman/listinfo/checkins

Note to contributors:

Only members can send messages to this list.  This means that you will
get messages for a while when you check in saying your messages are
being held for moderation.  I am moderating the list. When I see
legitimate held messages, I'll add the sender to the list of valid
non-member senders.  So if you don't want to subscribe, you don't have
to. :)

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope-Dev maillist  -  Zope-Dev@zope.org
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 )


Re: [Zope-dev] New mailing list: [EMAIL PROTECTED] for all checkin messages

2006-03-18 Thread Tino Wildenhain
Jim Fulton schrieb:
 
 I've set up a new mailing list that gets all checkins for the
 zope.org CVS and Subversion repositories:
 
   http://mail.zope.org/mailman/listinfo/checkins
 
 Note to contributors:
 
 Only members can send messages to this list.  This means that you will
 get messages for a while when you check in saying your messages are
 being held for moderation.  I am moderating the list. When I see
 legitimate held messages, I'll add the sender to the list of valid
 non-member senders.  So if you don't want to subscribe, you don't have
 to. :)

I seen this with the cvs list. Cant the checkin messages not
automatically accepted? I mean the sending server is known...

Regards
Tino
___
Zope-Dev maillist  -  Zope-Dev@zope.org
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 )


Re: [Zope-dev] New mailing list: [EMAIL PROTECTED] for all checkin messages

2006-03-18 Thread Jim Fulton

Tino Wildenhain wrote:

Jim Fulton schrieb:


I've set up a new mailing list that gets all checkins for the
zope.org CVS and Subversion repositories:

 http://mail.zope.org/mailman/listinfo/checkins

Note to contributors:

Only members can send messages to this list.  This means that you will
get messages for a while when you check in saying your messages are
being held for moderation.  I am moderating the list. When I see
legitimate held messages, I'll add the sender to the list of valid
non-member senders.  So if you don't want to subscribe, you don't have
to. :)



I seen this with the cvs list. Cant the checkin messages not
automatically accepted? I mean the sending server is known...


I tried something like this for a while,  It even worked for a while.
And then stopped working. :(

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
Zope-Dev maillist  -  Zope-Dev@zope.org
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 )