[Python-Dev] Cygwin Python 2.1c1 test_threadedtempfile problem
Tim Peters
tim.one@home.com
Sat, 14 Apr 2001 03:50:32 -0400
[Jason Tishler]
> I configured as follows:
>
> configure --with-threads=no
>
> When I run the regression tests I get the following:
>
> test test_threadedtempfile crashed --
> exceptions.AttributeError: 'threading' module has no attribute 'Event'
>
> Should this test only be run if Python is built with thread support?
Yes, it should be run only when there's thread support (well, actually,
regrtest.py will *try* it regardless, but ... see what follows).
The first thing test_threadedtempfile does is
import threading
and I *expect* that to die with an ImportError when there's no thread
suppport, due to threading.py trying to do
import thread
early on. regrtest.py looks out for ImportErrors, and I expect it to say
test test_threadedtempfile skipped -- No module named thread
in your situation.
So the question is why you're not getting an ImportError on "import thread"
(try it an interactive Python to make sure that's the cause). Why you're not
getting an ImportError I'll have to leave to someone who understands the Unix
config process.
OTOH, the threading module you are importing is damaged, else threading.Event
would have existed. So perhaps there's a deeper problem here than just a
config thing. First let us know what happens when you try "import thread" on
its own.