[New-bugs-announce] [issue21342] multiprocessing RLock and Lock raise incorrect exceptions when releasing an unlocked lock.
Steinn Steinsen
report at bugs.python.org
Thu Apr 24 08:00:51 CEST 2014
New submission from Steinn Steinsen:
In the documentation of multiprocessing the locks, RLock and Lock,
are said to be clones of their respective threading synchronization primitives.
There is an inconsistency in what exceptions are raised when an
unlocked lock is released. According to the threading documentation a
RuntimeError should be raised.
Lock.release raises ValueError
RLock.release raises AssertionError
Tested this in python 2.7, 3.2, 3.4, 3.5 and broken in all those versions.
The attached patch fixes this for 3.5
----------
components: Library (Lib)
files: release_exceptions.patch
keywords: patch
messages: 217117
nosy: steinn
priority: normal
severity: normal
status: open
title: multiprocessing RLock and Lock raise incorrect exceptions when releasing an unlocked lock.
type: behavior
versions: Python 2.7, Python 3.2, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file35017/release_exceptions.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21342>
_______________________________________
More information about the New-bugs-announce
mailing list