classification
Title: Access to non-existing "future" attribute in error path of futures
Type: behavior Stage: patch review
Components: Library (Lib) Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: bquinlan Nosy List: bquinlan, pieleric, python-dev
Priority: normal Keywords: patch

Created on 2012-06-06 09:05 by pieleric, last changed 2012-06-11 03:06 by bquinlan. This issue is now closed.

Files
File name Uploaded Description Edit
future-fix-attribute.patch pieleric, 2012-06-06 09:05 Patch to fix access to non-existing "future" attribute review
Messages (3)
msg162398 - (view) Author: √Čric Piel (pieleric) Date: 2012-06-06 09:05
concurrent.futures.Future.set_running_or_notify_cancel() has a reference to self.future, although Future has no future attribute. It's probably due to a copy/paste error. As it's in an error handling code path, most of the time the code is never used. Nevertheless it's worthy to fix it so that the right exception happens in case of error. This was detected by pylint.

Attaching a patch that fixes the error.
msg162602 - (view) Author: Roundup Robot (python-dev) Date: 2012-06-11 03:03
New changeset 68d7c0be5890 by Brian Quinlan in branch 'default':
#15015: Fix accessing an non-existing attribute.
http://hg.python.org/cpython/rev/68d7c0be5890
msg162603 - (view) Author: Brian Quinlan (bquinlan) (Python committer) Date: 2012-06-11 03:06
Thanks for the patch!
History
Date User Action Args
2012-06-11 03:06:31bquinlansetstatus: open -> closed
resolution: fixed
messages: + msg162603
2012-06-11 03:03:52python-devsetnosy: + python-dev
messages: + msg162602
2012-06-06 20:26:16bquinlansetassignee: bquinlan
2012-06-06 13:05:15r.david.murraysetnosy: + bquinlan
stage: patch review
type: behavior

versions: + Python 3.3, - Python 3.4
2012-06-06 09:05:29pielericcreate