Skip to content

Support Cython 3.0 #84

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

Merged
merged 1 commit into from
Jul 19, 2023
Merged

Support Cython 3.0 #84

merged 1 commit into from
Jul 19, 2023

Conversation

ekimd
Copy link
Contributor

@ekimd ekimd commented Jul 18, 2023

_capsule_destructor can no longer be implicitly converted to PyCapsule_Destructor unless it is marked as not throwing an exception.

@oleksandr-pavlyk
Copy link
Contributor

But the function that this change decorates as noexcept does raise Python exceptions. These get now swallowed, or were they being swallowed in 0.29.* as well?

@ekimd
Copy link
Contributor Author

ekimd commented Jul 19, 2023

While I'm not 100% certain, based on some of my reading I believe that the exception would be swallowed in <=0.29.*.
In general, destructors shouldn't throw exceptions otherwise unpredictable behavior can result. Line 57 should perhaps be changed to a simple print instead, or something to that effect.

@oleksandr-pavlyk
Copy link
Contributor

Ok, I will change the source code for the destructor in a separate commit. Thank you for the contribution!

@oleksandr-pavlyk oleksandr-pavlyk merged commit 7110797 into IntelPython:master Jul 19, 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.

2 participants