Hi Tres!

Tres Seaver wrote:
> Log message for revision 94389:
>   Move clashing imports into body of initialize().
> Changed:
>   U   Products.CMFDefault/trunk/Products/CMFDefault/__init__.py

What are "clashing imports"? Can't they be fixed in an other way? I'd 
prefer to have less code in initialize(), not more.

Maybe related:

Running CMF trunk tests with Zope 2.10, I now get random test-module 
import failures like this one:

   Module: Products.CMFActionIcons.tests.test_exportimport

   Traceback (most recent call last):
     File "..\Products\CMFActionIcons\tests\test_exportimport.py", line 
24, in ?
       from Products.CMFCore.testing import ExportImportZCMLLayer
     File "..\Products\CMFCore\__init__.py", line 18, in ?
       import PortalFolder
     File "..\Products\CMFCore\PortalFolder.py", line 26, in ?
       from App.class_init import default__class_init__ as InitializeClass
     File "..\lib\python\App\class_init.py", line 16, in ?
       import AccessControl.Permission
     File "..\lib\python\AccessControl\Permission.py", line 18, in ?
       import string, Products, Globals
     File "..\lib\python\Globals\__init__.py", line 23, in ?
       import Acquisition, ComputedAttribute, App.PersistentExtra, os
     File "..\lib\python\App\PersistentExtra.py", line 24, in ?
       from class_init import default__class_init__
   ImportError: cannot import name default__class_init__

Digging a bit deeper, I found a circular import in Zope that causes 
these failures:

AccessControl.Permission uses ApplicationDefaultPermissions defined in 
App.class_init and App.class_init imports AccessControl.Permission.

AFAICS moving ApplicationDefaultPermissions to AccessControl.Permission 
would be the best way to fix this.



Zope-CMF maillist  -  Zope-CMF@lists.zope.org

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests

Reply via email to