classification
Title: contextlib.ExitStack introduces a cycle in exception __context__
Type: Stage:
Components: Library (Lib) Versions: Python 3.6, Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Yury.Selivanov, gvanrossum, larry, martin.panter, ncoghlan, oconnor663, serhiy.storchaka, yselivanov
Priority: normal Keywords: patch

Created on 2015-12-02 19:58 by yselivanov, last changed 2015-12-06 02:20 by Yury.Selivanov.

Files
File name Uploaded Description Edit
Issue25786.patch yselivanov, 2015-12-02 19:59 review
Messages (5)
msg255762 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2015-12-02 19:58
See http://bugs.python.org/issue25779 and http://bugs.python.org/issue25782 for details.
msg255764 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2015-12-02 19:59
Nick, could you please take a look at the attached patch?
msg255798 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-12-03 00:46
If I understand this issue correctly, perhaps the test case should be augmented to check for a cycle:

try:
    main()
except RuntimeError as exc:
    self.assertIsNone(exc.__cause__)
else:
    self.fail("Expected RuntimeError")
msg255994 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2015-12-06 00:44
I don't agree that a reference cycle counts as a release blocker.
msg255999 - (view) Author: Yury Selivanov (Yury.Selivanov) * Date: 2015-12-06 02:20
This cycle leads to infinite unbreakable loop in cpython c internals.

Sent from my iPhone

> On Dec 5, 2015, at 7:44 PM, Larry Hastings <report@bugs.python.org> wrote:
> 
> 
> Larry Hastings added the comment:
> 
> I don't agree that a reference cycle counts as a release blocker.
> 
> ----------
> nosy: +larry
> priority: release blocker -> normal
> 
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue25786>
> _______________________________________
History
Date User Action Args
2015-12-06 02:20:14Yury.Selivanovsetnosy: + Yury.Selivanov
messages: + msg255999
2015-12-06 00:44:18larrysetpriority: release blocker -> normal
nosy: + larry
messages: + msg255994

2015-12-03 00:46:38martin.pantersetnosy: + martin.panter
messages: + msg255798
2015-12-02 20:06:12oconnor663setnosy: + oconnor663
2015-12-02 19:59:54yselivanovsetfiles: + Issue25786.patch
keywords: + patch
messages: + msg255764
2015-12-02 19:58:45yselivanovcreate