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.

classification
Title: Fix jumping out of "with" block
Type: crash Stage: resolved
Components: Interpreter Core Versions: Python 3.8, Python 3.7, Python 3.6, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: pitrou, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2018-03-08 07:46 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 6026 merged serhiy.storchaka, 2018-03-08 07:57
PR 6074 merged serhiy.storchaka, 2018-03-11 06:51
PR 6075 merged miss-islington, 2018-03-11 07:31
PR 6076 merged miss-islington, 2018-03-11 07:32
Messages (6)
msg313426 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-03-08 07:46
The proposed PR fixes jumping from "with" block. Currently the exit function is left on the stack.

This fix is for 3.8 only. 3.7 and older versions are affected by this bug, but since the code was significantly changed in 3.8, I'm not sure it will be so easy to fix it in older versions.
msg313427 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-03-08 09:35
Well, it is not hard to fix this in older versions.
msg313582 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-03-11 06:32
New changeset 26c9f565d016db21257a60d29ab2c99383dd5ac7 by Serhiy Storchaka in branch 'master':
bpo-33026: Fix jumping out of "with" block by setting f_lineno. (#6026)
https://github.com/python/cpython/commit/26c9f565d016db21257a60d29ab2c99383dd5ac7
msg313585 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-03-11 07:30
New changeset 04aadf23eac51fec2e436c5960c1362bbb7d03de by Serhiy Storchaka in branch '3.7':
[3.7] bpo-33026: Fix jumping out of "with" block by setting f_lineno. (GH-6026). (#6074)
https://github.com/python/cpython/commit/04aadf23eac51fec2e436c5960c1362bbb7d03de
msg313586 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-03-11 08:21
New changeset 20ac11a9fb027f183914bbaaaed091b57c882e54 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6':
[3.6] bpo-33026: Fix jumping out of "with" block by setting f_lineno. (GH-6026). (GH-6074) (GH-6075)
https://github.com/python/cpython/commit/20ac11a9fb027f183914bbaaaed091b57c882e54
msg313589 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-03-11 08:56
New changeset 3854f5885edc8dc67b1aba82fbb525604fbc625b by Serhiy Storchaka (Miss Islington (bot)) in branch '2.7':
[2.7] bpo-33026: Fix jumping out of "with" block by setting f_lineno. (GH-6026). (GH-6074) (GH-6076)
https://github.com/python/cpython/commit/3854f5885edc8dc67b1aba82fbb525604fbc625b
History
Date User Action Args
2022-04-11 14:58:58adminsetgithub: 77207
2018-03-13 08:56:31serhiy.storchakalinkissue33041 dependencies
2018-03-11 08:56:24serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-03-11 08:56:01serhiy.storchakasetmessages: + msg313589
2018-03-11 08:21:15serhiy.storchakasetmessages: + msg313586
2018-03-11 07:32:23miss-islingtonsetpull_requests: + pull_request5836
2018-03-11 07:31:22miss-islingtonsetpull_requests: + pull_request5835
2018-03-11 07:30:16serhiy.storchakasetmessages: + msg313585
2018-03-11 06:51:37serhiy.storchakasetpull_requests: + pull_request5834
2018-03-11 06:32:49serhiy.storchakasetmessages: + msg313582
2018-03-08 09:35:38serhiy.storchakasetmessages: + msg313427
versions: + Python 2.7, Python 3.6, Python 3.7
2018-03-08 07:57:57serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request5789
2018-03-08 07:46:38serhiy.storchakacreate