Re: [Zope-dev] Broken authentication with zope.app.component 3.4.1 BBB code

2009-07-20 Thread Jim Fulton
On Mon, Jul 20, 2009 at 10:09 AM, Marius Gedminas wrote:
> On Mon, Jul 20, 2009 at 06:44:09AM -0400, Jim Fulton wrote:
>> On Mon, Jul 20, 2009 at 2:48 AM, Michael Howitz wrote:
>> > Do you search this one?
>> >
>> > zope.app.zopeappgenerations.ZopeAppSchemaManager
>>
>> Ah, thanks.
>>
>> So this is all rather confusing.  Marius' branch refer to files that
>> aren't in zope.app.component anymore.
>
> This probably means that if one wants to use an old Zope 3.2 DB with
> Zope 3.5 (is that a good name for the current "trunk" KGS?), one needs
> to upgrade to 3.4 and then run a custom generation script to activate
> and dirty all objects to cause re-pickling.  Right?

Right.

...

> I also wonder if __bases__ on subsites are migrated correctly.  We don't
> use subsites so the question is largely theoretical.

By guess is that __bases__ for subsites are OK.

Jim

-- 
Jim Fulton
___
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] Broken authentication with zope.app.component 3.4.1 BBB code

2009-07-20 Thread Marius Gedminas
On Mon, Jul 20, 2009 at 06:44:09AM -0400, Jim Fulton wrote:
> On Mon, Jul 20, 2009 at 2:48 AM, Michael Howitz wrote:
> > Do you search this one?
> >
> > zope.app.zopeappgenerations.ZopeAppSchemaManager
> 
> Ah, thanks.
> 
> So this is all rather confusing.  Marius' branch refer to files that
> aren't in zope.app.component anymore.

This probably means that if one wants to use an old Zope 3.2 DB with
Zope 3.5 (is that a good name for the current "trunk" KGS?), one needs
to upgrade to 3.4 and then run a custom generation script to activate
and dirty all objects to cause re-pickling.  Right?

> The relevant code has moved to
> zope.site, so, unless I'm missing something, Marius' patches seem
> largely irrelevant.

For some definition of relevance.

They're irrelevant for KGS 3.5, since old DB won't work in any case.

They're relevant for KGS 3.4, which appears to be a necessary
intermediate step in any migration from 3.2 to 3.5.

> The evolve4 script in zope.app.zopeappgenerations refers to a
> _evolve_to_generation_4 method that isn't anywhere on the trunk
> anymore, but is in the back35.py file that Marius edited. It looks
> like the schema manager in zope.app.zopeappgenerations needs to get
> cleaned up.
> 
> My suspicion is that it would be best to add a schema manager in
> zope.site that makes sure that the root site manager has a proper
> __bases__.

I also wonder if __bases__ on subsites are migrated correctly.  We don't
use subsites so the question is largely theoretical.

Marius Gedminas
-- 
http://pov.lt/ -- Zope 3 consulting and development


signature.asc
Description: Digital signature
___
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] Broken authentication with zope.app.component 3.4.1 BBB code

2009-07-20 Thread Jim Fulton
On Mon, Jul 20, 2009 at 2:48 AM, Michael Howitz wrote:
> Do you search this one?
>
> zope.app.zopeappgenerations.ZopeAppSchemaManager

Ah, thanks.

So this is all rather confusing.  Marius' branch refer to files that
aren't in zope.app.component anymore.  The relevant code has moved to
zope.site, so, unless I'm missing something, Marius' patches seem
largely irrelevant.

The evolve4 script in zope.app.zopeappgenerations refers to a
_evolve_to_generation_4 method that isn't anywhere on the trunk
anymore, but is in the back35.py file that Marius edited. It looks
like the schema manager in zope.app.zopeappgenerations needs to get
cleaned up.

My suspicion is that it would be best to add a schema manager in
zope.site that makes sure that the root site manager has a proper
__bases__.

Jim

-- 
Jim Fulton
___
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] Broken authentication with zope.app.component 3.4.1 BBB code

2009-07-19 Thread Michael Howitz
Am 19.07.2009 um 22:40 schrieb Jim Fulton:
> On Sun, Jul 19, 2009 at 4:25 PM, Marius Gedminas  
> wrote:
>> On Sun, Jul 19, 2009 at 11:55:45AM -0400, Jim Fulton wrote:
> ...
>>> You should use a generation to fix the problem rather hacking
>>> __setstate__.  The hard part of this is figuring out where to put  
>>> the
>>> generation. I wonder where that standard schema manager is. Maybe  
>>> you
>>> should just create one for zope.app.component.
>>
>> It used to be in zope.app.generations.  I don't know how exactly the
>> coordination for all that works now after the eggsplosion.
>
> Maybe someone will enlighten us about where it went. :)

Do you search this one?

zope.app.zopeappgenerations.ZopeAppSchemaManager

Yours sincerely,
-- 
Michael Howitz · m...@gocept.com · software developer
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 8 · fax +49 345 1229889 1
Zope and Plone consulting and development

___
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] Broken authentication with zope.app.component 3.4.1 BBB code

2009-07-19 Thread Jim Fulton
On Sun, Jul 19, 2009 at 4:25 PM, Marius Gedminas wrote:
> On Sun, Jul 19, 2009 at 11:55:45AM -0400, Jim Fulton wrote:
...
>> You should use a generation to fix the problem rather hacking
>> __setstate__.  The hard part of this is figuring out where to put the
>> generation. I wonder where that standard schema manager is. Maybe you
>> should just create one for zope.app.component.
>
> It used to be in zope.app.generations.  I don't know how exactly the
> coordination for all that works now after the eggsplosion.

Maybe someone will enlighten us about where it went. :)

> Note that zope.app.component currently implements most of its BBB via
> __setstate__ methods that explicitly try to avoid dirtying the objects.
> I don't know the rationale for that -- maintaining the ability to roll
> back to ancient Zope without reverting transactions in Data.fs, or
> perhaps just avoiding write-on-read semantics?  That's part of why I
> asked for a review.

I was wondering about that myself.  I think this was more a matter of
bootstrapping.  It may have been that it would have been too hard to
write a evolution script because the evolution script might have
needed a working component registry.  I don't think this is the case
here.

If we can't find the old schema manager, I'd rather start a new one in
here (in zope.app.component.)  I think what it has to do is pretty
simple -- just check to make sure the __bases__ for the root component
registry is correct.

Jim

-- 
Jim Fulton
___
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] Broken authentication with zope.app.component 3.4.1 BBB code

2009-07-19 Thread Marius Gedminas
On Sun, Jul 19, 2009 at 11:55:45AM -0400, Jim Fulton wrote:
> On Wed, Jul 15, 2009 at 4:08 PM, Marius Gedminas wrote:
> ...
> > This is a pretty serious issue, so I'd appreciate some review from
> > people who know about local component registries.  The fix is here:
> >
> >  http://svn.zope.org/zope.app.component/?rev=101931&view=rev
> 
> Thanks for digging into this.
> 
> You should use a generation to fix the problem rather hacking
> __setstate__.  The hard part of this is figuring out where to put the
> generation. I wonder where that standard schema manager is. Maybe you
> should just create one for zope.app.component.

It used to be in zope.app.generations.  I don't know how exactly the
coordination for all that works now after the eggsplosion.

Note that zope.app.component currently implements most of its BBB via
__setstate__ methods that explicitly try to avoid dirtying the objects.
I don't know the rationale for that -- maintaining the ability to roll
back to ancient Zope without reverting transactions in Data.fs, or
perhaps just avoiding write-on-read semantics?  That's part of why I
asked for a review.

Marius Gedminas
-- 
http://pov.lt/ -- Zope 3 consulting and development


signature.asc
Description: Digital signature
___
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] Broken authentication with zope.app.component 3.4.1 BBB code

2009-07-19 Thread Jim Fulton
On Wed, Jul 15, 2009 at 4:08 PM, Marius Gedminas wrote:
...
> This is a pretty serious issue, so I'd appreciate some review from
> people who know about local component registries.  The fix is here:
>
>  http://svn.zope.org/zope.app.component/?rev=101931&view=rev

Thanks for digging into this.

You should use a generation to fix the problem rather hacking
__setstate__.  The hard part of this is figuring out where to put the
generation. I wonder where that standard schema manager is. Maybe you
should just create one for zope.app.component.

Jim

-- 
Jim Fulton
"Readability counts."
___
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 )