← 返回首页
bpo-45711: Remove unnecessary normalization of exc_info by iritkatriel · Pull Request #29922 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

bpo-45711: Remove unnecessary normalization of exc_info#29922

Merged
iritkatriel merged 3 commits into
python:mainfrom
iritkatriel:45711-exc_info_does_not_need_normalizing-2
Dec 8, 2021
Merged

bpo-45711: Remove unnecessary normalization of exc_info#29922
iritkatriel merged 3 commits into
python:mainfrom
iritkatriel:45711-exc_info_does_not_need_normalizing-2

Conversation

iritkatriel commented Dec 5, 2021
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

exc_info should always be normalized, so it is not necessary to normalize it here.

It is also not necessary to copy the traceback to the exception instance. I added an assertion that the traceback does not change, and it broke only one test: test_exception_chaining_after_await_with_context_cycle

This is a test that raises the same exception twice, and makes sure that no context cycle is created. The test is not concerned with the traceback at all. We discussed the issue of the traceback change in this test in PR29780.

https://bugs.python.org/issue45711

Comment thread Misc/NEWS.d/next/Core and Builtins/2021-12-05-17-36-08.bpo-45711.3TmTSw.rst Outdated Show resolved Hide resolved
Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
iritkatriel merged commit 2109f78 into python:main Dec 8, 2021
iritkatriel deleted the 45711-exc_info_does_not_need_normalizing-2 branch December 8, 2021 20:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Footer

© 2026 GitHub, Inc.