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

Add PyErr_GetRaisedException(), PyErr_SetRaisedException() to FFI #3248

Merged
merged 1 commit into from
Jun 18, 2023
Merged

Add PyErr_GetRaisedException(), PyErr_SetRaisedException() to FFI #3248

merged 1 commit into from
Jun 18, 2023

Conversation

ijl
Copy link
Contributor

@ijl ijl commented Jun 16, 2023

These are new and part of the stable API as of v3.12.0a6.

PyErr_Fetch(), PyErr_Restore(), and PyErr_NormalizeException() were simultaneously deprecated in favor of these.

python/cpython@feec49c

These are new and part of the stable API as of v3.12.0a6.

PyErr_Fetch(), PyErr_Restore(), and PyErr_NormalizeException()
were simultaneously deprecated in favor of these.

python/cpython@feec49c
@ijl
Copy link
Contributor Author

ijl commented Jun 16, 2023

I see this working as expected on 3.12b2. Usage and docs: https://docs.python.org/3.12/c-api/exceptions.html#c.PyErr_GetRaisedException

@adamreichold
Copy link
Member

Would you be interested in adjusting the usage sites in PyO3 as well?

@ijl
Copy link
Contributor Author

ijl commented Jun 16, 2023

I don't think I have familiarity with the non-FFI codebase now.

Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In which case I guess we merge this and we'll find time to adjust the 3.12 usages later. Thanks!

@davidhewitt davidhewitt added this pull request to the merge queue Jun 18, 2023
Merged via the queue into PyO3:main with commit bdf51ab Jun 18, 2023
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.

3 participants