daltairwalter

Results 11 comments of daltairwalter

I will test again with 2.8.0, but I didn't see any changes that I expect to make a difference. It still looks like the tstate that is stored in the...

When I originally created this ticket, it was possible to make this happen in non-embedded scenarios. I think it required a well behaved non-pybind11 pyd that did specific legitimate things...

As stated in the initial message, there is a relatively straightforward fix for this in pybind11. In internals.h: Just remove the line that stores the initial tstate that is dangling:...

I made minor updates to the failing example: ``` #include #include #include #include namespace py = pybind11; void causeHang() { auto state = PyGILState_Ensure(); std::cout

I will look into the noconvert option. Is there any way to do this at the module level rather than at the function level?

noconvert() does produce the type hints I want, but the documentation also indicates that this changes the functionality too. According to the noconvert documentation it will prevent an int from...

Looking back at @timohl's options for fixing this, it seems like the global macro would definitely work. If I understand correctly, this would effectively just replace `typing.SupportsInt` and `typing.SupportsFloat` with...

> This would allow the SupportsInt/Float behaviour through the native int and float and python-like behaviour through `py::int_` and `py::float_` @gentlegiantJGC this behavior does not fix the problem. It would...

> What if you make this > > ``` > def pdf(self, x: typing.SupportsFloat) -> float: > ``` > > or `x: float | typing.SupportsFloat`, or in the worst case...

Thank you for all the suggestions on this. After considering this, I think the global macro changes idea still seems the most viable for my use case because it doesn't...