Philipp von Weitershausen wrote:
> I think we should care about the standard Debian Python, people will
> be trying out Zope with it and if they fail, they'll give it up.
> Whether or not they'll do deployment with a self-compiled Python is
> another question.
>
> Regarding the issue, it seems to me that you already have a
> Products.xxx package on your PYTHONPATH *before* the Zope 2 code is
> executed. You see, 'Products' is a namespace package so it's actually
> forbidden to put any code in there because with namespace packages you
> never know which of the many Products/__init__.py will be loaded first.
>
> Zope, however, violates that rule by having an __ac_permissions__
> variable in its Products/__init__.py and the code that breaks for you
> expects this variable to be there already:
>
> Products.__ac_permissions__=(
> Products.__ac_permissions__+((perm,(),default),))
>
> I think we should get rid of the (rather useless) definition of
> __ac_permissions__ in Products/__init__.py and change all other code
> that uses __ac_permissions__ to accept it not being there (in which
> case it would simply use an empty tuple).
>
> Emmanuel, could you try to subsitute the line above with
>
> ac_permissions = getattr(Products, '__ac_permissions__', ())
> Products.__ac_permissions__=(ac_permissions+((perm,
> (),default),))
>
> and check if it works?
I think we should fix this on the trunk (making Products a proper
namespace package) but not worry about a backport: it is *definitely*
outside the box to run Zope from a Python which already has bits of
another Zope installed (as appears to be the case here).
I will check in the attached as soon as I have finished running the tests.
Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 <email address hidden>
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Philipp von Weitershausen wrote: __init_ _.py will be loaded first. __init_ _.py and the code that breaks for you __ac_permission s__=( __ac_permission s__+((perm, (),default) ,)) __init_ _.py and change all other code ns__', ()) __ac_permission s__=(ac_ permissions+ ((perm,
> I think we should care about the standard Debian Python, people will
> be trying out Zope with it and if they fail, they'll give it up.
> Whether or not they'll do deployment with a self-compiled Python is
> another question.
>
> Regarding the issue, it seems to me that you already have a
> Products.xxx package on your PYTHONPATH *before* the Zope 2 code is
> executed. You see, 'Products' is a namespace package so it's actually
> forbidden to put any code in there because with namespace packages you
> never know which of the many Products/
>
> Zope, however, violates that rule by having an __ac_permissions__
> variable in its Products/
> expects this variable to be there already:
>
> Products.
> Products.
>
> I think we should get rid of the (rather useless) definition of
> __ac_permissions__ in Products/
> that uses __ac_permissions__ to accept it not being there (in which
> case it would simply use an empty tuple).
>
> Emmanuel, could you try to subsitute the line above with
>
> ac_permissions = getattr(Products, '__ac_permissio
> Products.
> (),default),))
>
> and check if it works?
I think we should fix this on the trunk (making Products a proper
namespace package) but not worry about a backport: it is *definitely*
outside the box to run Zope from a Python which already has bits of
another Zope installed (as appears to be the case here).
I will check in the attached as soon as I have finished running the tests.
Tres. ======= ======= ======= ======= ======= ======= ======= ======= ==== palladion. com enigmail. mozdev. org
- --
=======
Tres Seaver +1 540-429-0999 <email address hidden>
Palladion Software "Excellence by Design" http://
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iD8DBQFIb5PW+ gerLs4ltQ4RAko9 AJ9rLeNUWSEV1vF BWTBYttI053kdUQ CbBWKO T+YFj6u0=
SRpl/SPP2jr72eD
=b13f
-----END PGP SIGNATURE-----