Currently, multiprocessing cannot be imported:
import multiprocessing Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/gbr/devel/python/Lib/multiprocessing/__init__.py", line 63, in <module> import _multiprocessing AttributeError: 'module' object has no attribute 'BufferTooShort'
The test suite passes (at least for some buildbots) because it imports _multiprocessing first, which then in its init function imports multiprocessing to get the BufferTooShort exception. Since BufferTooShort and other exceptions inheriting from ProcessError are simple derived exceptions, why aren't they created in the C module in the first place? Georg
On Wed, Jun 11, 2008 at 1:32 AM, Georg Brandl
Currently, multiprocessing cannot be imported:
import multiprocessing Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/gbr/devel/python/Lib/multiprocessing/__init__.py", line 63, in <module> import _multiprocessing AttributeError: 'module' object has no attribute 'BufferTooShort'
The test suite passes (at least for some buildbots) because it imports _multiprocessing first, which then in its init function imports multiprocessing to get the BufferTooShort exception.
I fixed it by moving the _multiprocessing import below the exception definitions.
Since BufferTooShort and other exceptions inheriting from ProcessError are simple derived exceptions, why aren't they created in the C module in the first place?
They should eventually go to C, but I'll worry about it after the betas. :) -- Cheers, Benjamin Peterson "There's no place like 127.0.0.1."
On Wed, Jun 11, 2008 at 8:23 AM, Benjamin Peterson
On Wed, Jun 11, 2008 at 1:32 AM, Georg Brandl
wrote: Currently, multiprocessing cannot be imported:
import multiprocessing Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/gbr/devel/python/Lib/multiprocessing/__init__.py", line 63, in <module> import _multiprocessing AttributeError: 'module' object has no attribute 'BufferTooShort'
The test suite passes (at least for some buildbots) because it imports _multiprocessing first, which then in its init function imports multiprocessing to get the BufferTooShort exception.
I fixed it by moving the _multiprocessing import below the exception definitions.
Since BufferTooShort and other exceptions inheriting from ProcessError are simple derived exceptions, why aren't they created in the C module in the first place?
They should eventually go to C, but I'll worry about it after the betas. :)
Thanks Ben, you beat me to it. I'll add it to the tracker.
participants (3)
-
Benjamin Peterson
-
Georg Brandl
-
Jesse Noller