[pypy-issue] [issue1621] CPyExt: PyObject_GetItem() fails on NumPyPy array objects
Amaury Forgeot d'Arc
tracker at bugs.pypy.org
Thu Oct 10 14:59:38 CEST 2013
Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:
Yes, test passes, but I think it does not do the correct thing:
best_base is numpypy.signedinteger, but the layout should be PyIntObject
(Because PyInt_Check() is True; maybe this should be part of the test as well)
I think the code should call check_and_find_best_base() instead, otherwise you completely bypass the check about "instance layout
conflicts".
...but this does not work either. And it's not a cpyext issue, but a numpypy one.
The following code works on cpython, but fails on pypy:
type('I', np.int64.__bases__, {})
It fails for two reasons:
- "type 'signedinteger' is not an acceptable base class"
- and if you try to bypass this check, you will get the "instance layout conflict" again.
We really have an issue with multiple inheritance of W_Objects.
________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1621>
________________________________________
More information about the pypy-issue
mailing list