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: Add tests for 'break' and 'return' inside 'finally' clause
Type: enhancement Stage: resolved
Components: Tests Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: serhiy.storchaka
Priority: normal Keywords: patch

Created on 2018-01-01 22:52 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 5078 merged serhiy.storchaka, 2018-01-01 22:53
PR 5080 closed python-dev, 2018-01-02 00:39
PR 5083 merged python-dev, 2018-01-02 07:04
PR 5084 merged serhiy.storchaka, 2018-01-02 08:30
Messages (4)
msg309352 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-01-01 22:52
'break' and 'return' are never used inside 'finally' clause in the stdlib. Therefore these cases are not covered by tests even implicitly. The proposed patch adds explicit tests for them.

'continue' inside 'finally' clause currently is prohibited (see issue1542451) and there are tests for this.
msg309354 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-01-02 00:38
New changeset 7cc42c356b0dc5ad9eaa9392789e84bd4aa1c7de by Serhiy Storchaka in branch 'master':
bpo-32478: Add tests for 'break' and 'return' inside 'finally' clause. (#5078)
https://github.com/python/cpython/commit/7cc42c356b0dc5ad9eaa9392789e84bd4aa1c7de
msg309358 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-01-02 08:20
New changeset aea95c2fbdec05dddd8b833a74eeb7ec8dc69706 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6':
bpo-32478: Add tests for 'break' and 'return' inside 'finally' clause. (GH-5078) (#5083)
https://github.com/python/cpython/commit/aea95c2fbdec05dddd8b833a74eeb7ec8dc69706
msg309361 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-01-02 08:56
New changeset b495377a8bdd711e9aab0885c60cd148284156e8 by Serhiy Storchaka in branch '2.7':
[2.7] bpo-32478: Add tests for 'break' and 'return' inside 'finally' clause. (GH-5078). (#5084)
https://github.com/python/cpython/commit/b495377a8bdd711e9aab0885c60cd148284156e8
History
Date User Action Args
2022-04-11 14:58:56adminsetgithub: 76659
2018-01-02 08:59:00serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-01-02 08:56:47serhiy.storchakasetmessages: + msg309361
2018-01-02 08:30:42serhiy.storchakasetpull_requests: + pull_request4959
2018-01-02 08:20:15serhiy.storchakasetmessages: + msg309358
2018-01-02 07:04:07python-devsetpull_requests: + pull_request4958
2018-01-02 00:39:50python-devsetpull_requests: + pull_request4955
2018-01-02 00:38:37serhiy.storchakasetmessages: + msg309354
2018-01-01 22:53:58serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request4953
2018-01-01 22:52:03serhiy.storchakacreate