Closed seberg closed 7 months ago
I honestly don't remember if that
Py_IsInitialized
wasn't just to tape over C++ related deficiencies
Our experience in PyArrow (not in DLPack context) is that it's required for robust integration with C++: https://github.com/apache/arrow/blob/51817917e1436c8799ed382d160798060cd76652/python/pyarrow/src/arrow/python/common.h#L194-L199
Yeah, makes sense: If you knew it came from Python, it would be your job to store it in a way like that OwnedRef
which deals with it. But the whole issue here is that we want to allow you "forget" that this came from Python...
I honestly don't remember if that
Py_IsInitialized
wasn't just to tape over C++ related deficiencies, but I suspect there isn't much to be avoided there...(I.e. if we take care of the GIL for the other library, we also have to do this check for them which would normally be their job.)
Closes gh-103