Re: ZClass problem in 2.8 (Was: Re: [Zope-dev] Upcoming Zope 2.8 release)

2005-06-13 Thread John Barratt

Jo Meder wrote:

A long time ago, Shane posted a very useful function
to analyse acquisition wrappers: "showaq".

Maybe, the mailing list archive is still able to locate his post...



Just ask Google: http://www.zope.org/Members/chrisw/showaq


Thanks Jo.  It seems though that there was a branch containing further 
ZClass fixes that was merged into Zope 2.8 final that wasn't in b2 that 
fixed this problem.


JB.
___
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: ZClass problem in 2.8 (Was: Re: [Zope-dev] Upcoming Zope 2.8 release)

2005-06-10 Thread Jo Meder
Am 09.06.2005, 19:28 Uhr
schrieb Dieter Maurer <[EMAIL PROTECTED]>:

> A long time ago, Shane posted a very useful function
> to analyse acquisition wrappers: "showaq".
> 
> Maybe, the mailing list archive is still able to locate his post...

Just ask Google: http://www.zope.org/Members/chrisw/showaq

Jo.


-- 
internetmanufaktur jo- Berlin, Germany
  |||meder---fon: ++49-30-417 17 63 33
http://www.meder.de/ --- fax: ++49-30-417 17 63 45
Kollwitzstr. 75  mob: ++49-170- 2 98 89 97
10435 Berlin ---http://www.meder.de/keys/jo-pubkey.txt
___
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: ZClass problem in 2.8 (Was: Re: [Zope-dev] Upcoming Zope 2.8 release)

2005-06-09 Thread Dieter Maurer
John Barratt wrote at 2005-6-9 16:54 +1000:
> ...
>I would hence suspect the wrapping, and/or behaviour of the object 
>and/or context to be somehow different?

A long time ago, Shane posted a very useful function
to analyse acquisition wrappers: "showaq".

Maybe, the mailing list archive is still able to locate his post...

-- 
Dieter
___
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: ZClass problem in 2.8 (Was: Re: [Zope-dev] Upcoming Zope 2.8 release)

2005-06-08 Thread John Barratt

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-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: ZClass problem in 2.8 (Was: Re: [Zope-dev] Upcoming Zope 2.8 release)

2005-06-08 Thread Dieter Maurer
John Barratt wrote at 2005-6-7 10:08 +1000:
> ...
> 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

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.

-- 
Dieter
___
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-Coders] ZClass problem in 2.8 (Was: Re: [Zope-dev] Upcoming Zope 2.8 release)

2005-06-07 Thread John Barratt

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-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-Coders] ZClass problem in 2.8 (Was: Re: [Zope-dev] Upcoming Zope 2.8 release)

2005-06-06 Thread Andreas Jung



--On 7. Juni 2005 16:10:55 +1000 Anthony Baxter <[EMAIL PROTECTED]> 
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






pgpQxfWcfjrJO.pgp
Description: PGP 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-Coders] ZClass problem in 2.8 (Was: Re: [Zope-dev] Upcoming Zope 2.8 release)

2005-06-06 Thread Andreas Jung



--On 7. Juni 2005 10:08:56 +1000 John Barratt <[EMAIL PROTECTED]> 
wrote:



Andreas Jung wrote:

<[EMAIL PROTECTED]> 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


pgpoGo9hOpd8y.pgp
Description: PGP 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 )


ZClass problem in 2.8 (Was: Re: [Zope-dev] Upcoming Zope 2.8 release)

2005-06-06 Thread John Barratt

Andreas Jung wrote:

<[EMAIL PROTECTED]> 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-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] Upcoming Zope 2.8 release

2005-05-19 Thread Andreas Jung

--On Donnerstag, 19. Mai 2005 19:59 Uhr +0200 Dieter Maurer 
<[EMAIL PROTECTED]> wrote:

Andreas Jung wrote at 2005-5-19 13:43 +0200:
after resolving all outstanding problems with Zope 2.8 under Windows the
next
releases will be Zope 2.8 b2 (this weekend) and Zope 2.8.0 final
(scheduled  for
2005/06/11).
What about the ZClasses?
Jim fixed them (hopefully :-))
-aj


pgpXcsNX7SAIT.pgp
Description: PGP 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] Upcoming Zope 2.8 release

2005-05-19 Thread Jim Fulton
Dieter Maurer wrote:
Andreas Jung wrote at 2005-5-19 13:43 +0200:
after resolving all outstanding problems with Zope 2.8 under Windows the 
next
releases will be Zope 2.8 b2 (this weekend) and Zope 2.8.0 final (scheduled 
for
2005/06/11).

What about the ZClasses?
They work fine AFAIK.
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] Upcoming Zope 2.8 release

2005-05-19 Thread Dieter Maurer
Andreas Jung wrote at 2005-5-19 13:43 +0200:
>after resolving all outstanding problems with Zope 2.8 under Windows the 
>next
>releases will be Zope 2.8 b2 (this weekend) and Zope 2.8.0 final (scheduled 
>for
>2005/06/11).

What about the ZClasses?


-- 
Dieter
___
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] Upcoming Zope 2.8 release

2005-05-19 Thread Jim Fulton
Yay! :)
Andreas Jung wrote:
Hi,
after resolving all outstanding problems with Zope 2.8 under Windows the 
next
releases will be Zope 2.8 b2 (this weekend) and Zope 2.8.0 final 
(scheduled for
2005/06/11).

I will cut a 2.8 release branch for Zope 2.8 b2. This means that the trunk
is open for new development (Zope 2.9). Bugs (as always) have to be fixed
on the 2.8 branch, SVN trunk and 2.7 branch (CVS).

--
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] Upcoming Zope 2.8 release

2005-05-19 Thread Andreas Jung
Hi,
after resolving all outstanding problems with Zope 2.8 under Windows the 
next
releases will be Zope 2.8 b2 (this weekend) and Zope 2.8.0 final (scheduled 
for
2005/06/11).

I will cut a 2.8 release branch for Zope 2.8 b2. This means that the trunk
is open for new development (Zope 2.9). Bugs (as always) have to be fixed
on the 2.8 branch, SVN trunk and 2.7 branch (CVS).
Andreas 

pgpXrEZKMwHPk.pgp
Description: PGP 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 )