Mailing List Archive

ZClass problem in 2.8 (Was: Re: [Zope-dev] Upcoming Zope 2.8 release)
Andreas Jung wrote:
> <dieter@handshake.de> wrote:
>> What about the ZClasses?
> Jim fixed them (hopefully :-))

They don't work for me in 2.8... :-(

I can't shake a new permission problem when trying to add a ZClass
instance in 2.8b2. This is a 2.8 specific problem as the same process
works in 2.7.6. For reference, the recently enabled tests for ZClasses
all pass fine. This is a problem wether python or C security control is
enabled via zope.conf. Also this was always tried with a 'fresh' ZODB.

From a bit of digging through the code it seems there is a difference
comes about in the call on line 166 of AccessControl.User inside
_check_context :

return object.aq_inContextOf(context, 1)

In Zope 2.8 it returns 0, in 2.76 it returns 1 with the steps below. I
don't know how to even start to try to debug inside this C based method?

Below are the steps I used to reproduce this problem. This was on a
Fedora Core 3 x86_64 server with a fresh Zope & Python compile :

- Open the ZMI and login as a user with 'Manager' permissions.
- Goto : /Control_Panel/Products/
- Add a new Product 'AAA'
- Go to the Product : /Control_Panel/Products/AAA/
- Add a new 'Z Class' :
id=ZZZ
title=ZZZ
meta type=ZZZ
'Create Constructor objects' checked
'Included standard Zope persistent object base classes' checked.

- Goto the Root Folder
- Goto the Security Tab
- Give 'Manager' permission to 'Add ZZZs'
- Goto the Root Folder
- Try to add an instance of a 'ZZZ':
- Zope 2.7.6 succeeds no problem.
- Zope 2.8.0-b2 (and b1) you get a http auth login form come up.
- You get the same behaviours with Python 2.3.5 and 2.4.1.

I also tried a quick hack to make the above method always return 1 in
Zope 2.8, but another error is then encountered whilst trying to add the
ZClass instance :

* Module ZPublisher.Publish, line 187, in publish_module_standard
* Module ZPublisher.Publish, line 144, in publish
* Module ZPublisher.Publish, line 107, in publish
* Module Zope2.App.startup, line 248, in recordMetaData
* Module OFS.Traversable, line 104, in getPhysicalPath
* Module App.FactoryDispatcher, line 90, in __getattr__

AttributeError: getPhysicalPath

I didn't see anything different you 'need' to do with 2.8 WRT ZClasses
for this to work, but I suppose I could have missed something! One
other note is that I have also only been able to try this on 64 bit
platforms (Solaris 10 and FC3 as above).

Thanks for any help. I hope this can be resolved before 2.8 goes final!

JB.
_______________________________________________
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders
Re: ZClass problem in 2.8 (Was: Re: [Zope-dev] Upcoming Zope 2.8 release) [ In reply to ]
--On 7. Juni 2005 10:08:56 +1000 John Barratt <jlb@ball.langarson.com.au>
wrote:

> Andreas Jung wrote:
>> <dieter@handshake.de> wrote:
>>> What about the ZClasses?
>> Jim fixed them (hopefully :-))
>

>
> Thanks for any help. I hope this can be resolved before 2.8 goes final!
>

This is likely a task for Jim. I don't have any about ZClasses (and I won't
them). If necessary this problem might be fixed in a later release. This
problem is not as serious as I could hold up the final 2.8 release. This
release has to go out now.

-aj
Re: ZClass problem in 2.8 (Was: Re: [Zope-dev] Upcoming Zope 2.8 release) [ In reply to ]
On Tuesday 07 June 2005 14:27, Andreas Jung wrote:
> This is likely a task for Jim. I don't have any about ZClasses (and I won't
> them). If necessary this problem might be fixed in a later release. This
> problem is not as serious as I could hold up the final 2.8 release. This
> release has to go out now.

Are working ZClasses no longer a requirement for Zope? (This is not a flame,
just a question). There's plenty of people out there with ZClass-based
products, so if 2.8 is going to ship with broken ZClass, there should
probably be a reasonably prominent warning in the release notes about this.

Anthony
--
Anthony Baxter <anthony@interlink.com.au>
It's never too late to have a happy childhood.
_______________________________________________
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders
Re: ZClass problem in 2.8 (Was: Re: [Zope-dev] Upcoming Zope 2.8 release) [ In reply to ]
--On 7. Juni 2005 16:10:55 +1000 Anthony Baxter <anthony@interlink.com.au>
wrote:

> On Tuesday 07 June 2005 14:27, Andreas Jung wrote:
>> This is likely a task for Jim. I don't have any about ZClasses (and I
>> won't them). If necessary this problem might be fixed in a later
>> release. This problem is not as serious as I could hold up the final 2.8
>> release. This release has to go out now.
>
> Are working ZClasses no longer a requirement for Zope? (This is not a
> flame, just a question). There's plenty of people out there with
> ZClass-based products, so if 2.8 is going to ship with broken ZClass,
> there should probably be a reasonably prominent warning in the release
> notes about this.

According to Jim ZClasses are working. A possibly isolated bug in ZClasses
is bad but there are in general lots of such bugs in Zope. So this is not
a release stopper for me now. We have discussed ZClasses already and about
how ZClasses can be maintained in the future. Since I see little commitment
to ZClasses (except from Jim) ZClasses are not really a blocker for *this*
2.8.0 release. We defered this release already a bunch of times and it is
now time to get 2.8.0 with Five and MVCC support to people. This is much,
much more important for Zope than having to care about ZClasses. People can
stick with Zope 2.7 if there is a problem for them with ZClasses in the
hope that someone fixes outstanding ZClasses in a further 2.8 release. I
don't care getting some beatings for my opinon that ZClasses are a neat
ancient toy but not the tool of choice for nowadays Zope applications. We
need a strong ZODB with MVCC and we need Five to bridge the world to Zope
3. And therefore ZClasses are absolutely not a reason to block the 2.8.0
release.

-aj
Re: ZClass problem in 2.8 (Was: Re: [Zope-dev] Upcoming Zope 2.8 release) [ In reply to ]
Andreas Jung wrote:
> According to Jim ZClasses are working. A possibly isolated bug in
> ZClasses is bad but there are in general lots of such bugs in Zope. So
> this is not a release stopper for me now.
As far as I can see this is either a serious bug with respect to
ZClasses in that they just don't work, or something I'm not doing quite
right WRT Zope 2.8. My understanding from discussions on zope-dev was
that 'ZClasses not working' was a blocker for a release of Zope 2.8.0 final?

As an aside, I have tried this on an older Red Hat 32bit linux box and
reproduced the same problem, so it doesn't appear to be a 64bit specific
problem as I indicated it could be in my previous email.

> We have discussed ZClasses
> already and about how ZClasses can be maintained in the future. Since I
> see little commitment to ZClasses (except from Jim) ZClasses are not
> really a blocker for *this* 2.8.0 release. We defered this release
> already a bunch of times and it is now time to get 2.8.0 with Five and
> MVCC support to people. This is much, much more important for Zope than
> having to care about ZClasses. People can stick with Zope 2.7 if there
> is a problem for them with ZClasses in the hope that someone fixes
> outstanding ZClasses in a further 2.8 release. I don't care getting some
> beatings for my opinon that ZClasses are a neat ancient toy but not the
> tool of choice for nowadays Zope applications. We need a strong ZODB
> with MVCC and we need Five to bridge the world to Zope 3. And therefore
> ZClasses are absolutely not a reason to block the 2.8.0 release.
We are currently using ZClasses, but also really want to be able to use
MVCC. I am happy to help out where possible to get ZClasses going in
2.8 if I can get some guidance as to how to go about it. It looks to be
a reasonably 'intricate' problem.

At the end of the day, I'm actually not concerned about which release
this fix (if needed) gets into. The most important thing from my PoV is
resolving this for a version of Zope 2.8(+) (even just a branch) soon. I
agree that there is a lot of 'good' in Zope 2.8 that should be made
available to the wider community in the form of a final release ASAP.

Thanks,

JB.
_______________________________________________
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders
Re: ZClass problem in 2.8 (Was: Re: [Zope-dev] Upcoming Zope 2.8 release) [ In reply to ]
Dieter Maurer wrote:
> Looks like an acquisition bug:
>
> obj.aq_inContextOf(context, 1) is recursively defined by:
>
> True, if "obj.aq_base == context.aq_base"
> or "container(obj) is not None"
> and "container(obj).aq_inContextOf(context, 1)"
>
> where "container(obj)" is "aq_parent(aq_inner(obj))"
> which is the container containing "obj".
>
> which is equivalent to (resolving the recursing):
>
> obj.aq_inContextOf(context, 1)
> iff for some (hierarchie) ancestor "a" of obj,
> "a.aq_base == context.aq_base".
>
> Given this definition, you can check which implementation
> is wrong and file a bug report.

Looking at the relevant *Acquisition.c files, both implementations of
aq_inContextOf(2.7.6 & 2.8.0b2) are identical. The implementation of
macros used in this method (isWrapper, WRAPPER, and OBJECT) are also
identitcal, there being nothing else immediately obvious that looks
like it could have been implemented differently there.

I would hence suspect the wrapping, and/or behaviour of the object
and/or context to be somehow different?

JB.
_______________________________________________
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders