-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Workaround for #2682 and #2422 by simply clearing the TypeError #2685
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might be a safer, more localized workaround than #2684, until we have a full fix for #2336 (which needs a little survey, to see in which places the casts are expected to return a nullptr handle
and in which cases an exception is expected, given that it's such a central part of pybind11).
Thanks for the quick fix! |
Yes I can confirm that with the two fixes, the CI for debug cpython 3.8 and 3.9 now run without crashing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is safe for now.
FWIW Ran into a similar issue in our fork, but a slightly different edge case ( Just copied this solution there 😅 |
Description
As proposed in #2422 (comment), this PR is a possible solution for the assertion error in cpython debug mode.
Fixes #2682
Fixes #2422
Suggested changelog entry: