Skip to content

bpo-45711: Remove unnecessary normalization of exc_info #29922

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Dec 5, 2021

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

Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
@iritkatriel iritkatriel merged commit 2109f78 into python:main Dec 8, 2021
@iritkatriel iritkatriel deleted the 45711-exc_info_does_not_need_normalizing-2 branch December 8, 2021 20:08
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