-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[BUG]: Python atexit broken with pybind11 version >= 2.9.2 #4459
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
Comments
FYI @rwgk |
@chrreisinger could you help by
The change makes sense to me. My understanding is: the |
I will give it a try on the weekend. |
Awesome. If you create a PR with just the lines moved, that'll be a great start. It will be good to confirm that valgrind does not find any issues. We can work on the test together from there. |
@chrreisinger Any updates on this? |
…ybind#4459 (pybind#4486)" This reverts commit b2c1978. See pybind#4500 for background.
Oh boy, this broke some more things. |
Required prerequisites
What version (or hash if on master) of pybind11 are you using?
2.10.2
Problem description
We want to upgrade from pybind11 release 2.9.0 to 2.10.2, but we encountered an issue in the Python atexit (https://docs.python.org/3/library/atexit.html) functions, that our custom types are not registered anymore. With delta debugging we found that this PR caused the issue: #3744
In my opinion the
calls should be after the Py_Finalize function call.
When I change the orders of those function calls, the problem is gone.
Reproducible example code
No response
Is this a regression? Put the last known working version here if it is.
2.9.1
The text was updated successfully, but these errors were encountered: