Skip to content
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

sys._current_exceptions() should return exceptions rather than exc_info tuples #103176

Closed
iritkatriel opened this issue Apr 1, 2023 · 1 comment · Fixed by #103177
Closed
Assignees
Labels
3.12 bugs and security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@iritkatriel
Copy link
Member

iritkatriel commented Apr 1, 2023

The function sys._current_exceptions() returns a mapping of thread-id to an exc_info tuple representing that thread's handled exception. As part of the larger effort of moving away from exc_info to simple exception instances, we should change this mapping to have just the exception instance as value.

While this is a breaking change, I think we can do this without a deprecation period because this function is named with a leading _, and it is documented as "for internal and specialized purposes only".

Linked PRs

@iritkatriel iritkatriel added type-feature A feature request or enhancement stdlib Python modules in the Lib dir labels Apr 1, 2023
iritkatriel added a commit to iritkatriel/cpython that referenced this issue Apr 1, 2023
@iritkatriel iritkatriel added release-blocker 3.12 bugs and security fixes labels Apr 3, 2023
@iritkatriel
Copy link
Member Author

Marking as blocker so we won't forget to make a decision about whether this should be done via a deprecation cycle (it's not really a blocker, the label can be removed).

@iritkatriel iritkatriel self-assigned this Apr 3, 2023
iritkatriel added a commit that referenced this issue Apr 11, 2023
warsaw pushed a commit to warsaw/cpython that referenced this issue Apr 11, 2023
aisk pushed a commit to aisk/cpython that referenced this issue Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 bugs and security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement
Projects
1 participant