On Aug 14, 2007, at 7:32 PM, Paul Carduner wrote:
I came across an error I have not seen before. Just for reference,
here is the last snippet from the traceback:
line 420, in ?
AttributeError: 'module' object has no attribute 'thread_local'
I wish you had included the whole traceback.
The interesting part to me is that it was so easy to fix. Here is a
snippet of the relevant area of failing code from
# Get optimized versions
from zope.security._zope_security_checker import _checkers,
from zope.security._zope_security_checker import NoProxy, Checker
from zope.security._zope_security_checker import _defaultChecker
from zope.security._zope_security_checker import
The very first import statement is throwing the error, but alas, it is
not an ImportError. If I patch this code by catching the
AttributeError in the same way the ImportError is caught, then
everything works fine.
Except you don't get the C optimizations. IOW, you would just be
covering up a real error.
I tried looking into the c code, but after
years of python development, the c code just frightens me (a bit).
That said, I would really appreciate any pointers people might be able
to give me on what thread_local is for and why I (don't) need it.
I rearranged the imports in zope.security yesterday. I apparently
broke your usage, but I can't tell what your usage is. I'll need to
see the whole traceback. In particular, I'll need to see the import
Jim Fulton mailto:[EMAIL PROTECTED] Python
CTO (540) 361-1714
Zope Corporation http://www.zope.com http://www.zope.org
Zope3-dev mailing list