Closed
Description
Required prerequisites
- Make sure you've read the documentation. Your issue may be addressed there.
- Search the issue tracker and Discussions to verify that this hasn't already been reported. +1 or comment there if it has.
- Consider asking first in the Gitter chat room or in a Discussion.
What version (or hash if on master) of pybind11 are you using?
2.10.2
Problem description
In 2.10.2, @rwgk added a really neat feature to detect undefined behavior by double checking the GIL on reference counter calls.
Unfortunately (as experienced by our users, scipy/scipy#17644), the error messages here are really bad, especially on Windows.
We need a better error message strategy here to avoid user confusion.
This is tricky because this feels like a regression to our users when we really want to better inform them about UB in their code.
Reproducible example code
https://github.com/tylerjereddy/pybind_repro is a really nice Windows example that has terrible error messaging.
Is this a regression? Put the last known working version here if it is.
2.10.1