You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PyCData_Type.tp_hash doesn't use PyObject_HashNotImplemented #78327
So not only does the function it does use (PyCData_nohash) prevent PyType_Ready from setting _ctypes._SimpleCData.dict["hash"] to None, (contrary to to every other unhashable type in the standard library) but the error message it returns is less detailed.
It seems like a big deal if this were to be changed as it could break backwards compatibility so I won't open PR myself as I'm still not that familiar with the contribution process.
Activity
mr-nfamous commentedon Jul 18, 2018
So not only does the function it does use (
PyCData_nohash) prevent PyType_Ready from setting _ctypes._SimpleCData.dict["hash"] toNone, (contrary to to every other unhashable type in the standard library) but the error message it returns is less detailed.It seems like a big deal if this were to be changed as it could break backwards compatibility so I won't open PR myself as I'm still not that familiar with the contribution process.
gh-78327: Use `PyObject_HashNotImplemented` for `ctypes` data types (G…