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

Set sys.last_exc in addition to last_type/last_value/last_traceback on Python>=3.12 #11850

Closed
bluetech opened this issue Jan 21, 2024 · 1 comment · Fixed by #12027
Closed
Labels
type: enhancement new feature or API change, should be merged into features branch

Comments

@bluetech
Copy link
Member

Python 3.12 added sys.last_exc. We should set it like we do the older variants.

@bluetech bluetech added the type: enhancement new feature or API change, should be merged into features branch label Jan 21, 2024
@robotherapist
Copy link
Contributor

Hey @bluetech, I submitted a PR: #11934

As last_exc is the same as last_value (from trying locally and looking at python here), and have added an if to check we're only using it on Python versions >= 3.12.0. Let me know if I need to do anything else!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement new feature or API change, should be merged into features branch
Projects
None yet
2 participants