[Python-bugs-list] [ python-Bugs-416089 ] import problem with 2.1c1

noreply@sourceforge.net noreply@sourceforge.net
Sat, 14 Apr 2001 13:19:41 -0700


Bugs item #416089, was updated on 2001-04-14 02:39
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=416089&group_id=5470

>Category: Python Library
Group: None
Status: Open
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Guido van Rossum (gvanrossum)
Summary: import problem with 2.1c1

Initial Comment:
I have built Python 2.1c1 under Linux and Irix
without the thread module.  When I import
threading an ImportError occurs as expected.
However, reissuing the import threading (not reloading)
statement does not raise an ImportError.  This causes a
failure in the regression tests with  the
following error message:

test test_threadedtempfile crashed --
exceptions.AttributeError: 'threading' module has no
attribute 'Event'

Here is a sample session from the interactive
interpreter.

>% ./python
Python 2.1c1 (#4, Apr 14 2001, 03:22:09) 
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)]
on linux2
Type "copyright", "credits" or "license" for more
information.
>>> import threading
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/home/raj/python/dist/src/Lib/threading.py",
line 5, in ?
    import thread
ImportError: No module named thread
>>> import threading # No import error here
>>> 

and under IRIX

% ./python 
Python 2.1c1 (#3, Apr 13 2001, 21:38:25) [C] on irix646
Type "copyright", "credits" or "license" for more
information.
>>> import threading
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File                              
"/usr/people/raj/python/dist/src/Lib/threading.py",                             
line 5, in
?                                                   
    import
thread                                                   
ImportError: No module named thread                 
>>> import threading # Again no import error
here                               
>>>

----------------------------------------------------------------------

>Comment By: Tim Peters (tim_one)
Date: 2001-04-14 13:19

Message:
Logged In: YES 
user_id=31435

Assigned to Guido, because I suspect he just fixed this in 
the CVS tree.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=416089&group_id=5470