classification
Title: import warning in multiprocessing
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: jnoller Nosy List: jnoller, pitrou
Priority: normal Keywords:

Created on 2008-08-29 18:15 by pitrou, last changed 2008-09-01 17:15 by pitrou. This issue is now closed.

Messages (4)
msg72146 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-08-29 18:15
I get the following when running "regrtest.py -uall" under trunk:

/home/antoine/cpython/__svn__/Lib/multiprocessing/__init__.py:82:
ImportWarning: Not importing directory
'/home/antoine/cpython/__svn__/Modules/_multiprocessing': missing
__init__.py
  import _multiprocessing
msg72275 - (view) Author: Jesse Noller (jnoller) * (Python committer) Date: 2008-09-01 16:48
Prior to you getting this error: Did you get a compilation error during 
the make?
msg72279 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-09-01 17:11
Indeed. _multiprocessing.so compiles fine but afterwards I get:

*** WARNING: importing extension "_multiprocessing" failed with <type
'exceptions.AttributeError'>: 'module' object has no attribute 'SemLock'


And if I try manually:

>>> import _multiprocessing
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/antoine/cpython/__svn__/Lib/multiprocessing/__init__.py",
line 148, in <module>
    from multiprocessing.synchronize import (Lock, RLock, Condition, Event,
  File
"/home/antoine/cpython/__svn__/Lib/multiprocessing/synchronize.py", line
29, in <module>
    SEM_VALUE_MAX = _multiprocessing.SemLock.SEM_VALUE_MAX
AttributeError: 'module' object has no attribute 'SemLock'


Removing the .pyc files doesn't help.
msg72281 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-09-01 17:15
Mmmh, after doing "svn up" again and recompiling, the extension imports
fine and the ImportWarning disappears.
History
Date User Action Args
2008-09-01 17:15:44pitrousetstatus: open -> closed
resolution: out of date
messages: + msg72281
2008-09-01 17:11:34pitrousetmessages: + msg72279
2008-09-01 16:48:48jnollersetmessages: + msg72275
2008-08-29 18:15:36pitroucreate