[Zope3-dev] 'thread_local' AttributeError in zope.security.checker
paulcarduner at gmail.com
Tue Aug 14 19:32:06 EDT 2007
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'
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, selectChecker
from zope.security._zope_security_checker import NoProxy, Checker
from zope.security._zope_security_checker import _defaultChecker
from zope.security._zope_security_checker import _available_by_default
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. 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 also just noticed that ~5 hours ago, Jim made a change to this file,
so I tried using the latest trunk revision but got the same error.
More information about the Zope3-dev