This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.golden
Recipients jnoller, stepheng.lynch, tim.golden
Date 2009-02-14.20:52:33
SpamBayes Score 0.00013911058
Marked as misclassified No
Message-id <49972F0D.2060205@timgolden.me.uk>
In-reply-to <1234641783.89.0.00973393014406.issue5261@psf.upfronthosting.co.za>
Content
Problem seems to be in Modules/_multiprocessing/semaphore.c 
line 549 where "__enter__" is defined as an alias for 
semlock_acquire, as is "acquire" a few lines above. However,
while "acquire" specifies METH_VARARGS | METH_KEYWORDS,
"__enter__" has only METH_VARARGS.

semlock_acquire at line 60 has the signature:

  SemLockObject *self, PyObject *args, PyObject *kwds

When it is called via __enter__ kwds aren't passed in
and it gets a NULL pointer.

Suggested patch attached, defining __enter__ in the same
way as acquire. Test included.
Files
File name Uploaded
multiprocessing.patch tim.golden, 2009-02-14.20:52:33
History
Date User Action Args
2009-02-14 20:52:35tim.goldensetrecipients: + tim.golden, jnoller, stepheng.lynch
2009-02-14 20:52:33tim.goldenlinkissue5261 messages
2009-02-14 20:52:33tim.goldencreate