<mattip>
but I think that should fail in universal mode: there is no HPy_dealloc slot
_0az3 has quit [Remote host closed the connection]
_0az3 has joined #hpy
_0az3 has quit [Remote host closed the connection]
_0az3 has joined #hpy
_0az3 has quit [Remote host closed the connection]
_0az3 has joined #hpy
_0az3 has quit [Remote host closed the connection]
_0az3 has joined #hpy
_0az3 has quit [Remote host closed the connection]
_0az3 has joined #hpy
_0az3 has quit [Remote host closed the connection]
_0az3 has joined #hpy
_0az3 has quit [Remote host closed the connection]
_0az3 has joined #hpy
_0az3 has quit [Remote host closed the connection]
_0az3 has joined #hpy
<antocuni>
mattip: the test is correct
<antocuni>
don't make confusion between "universal ABI" and "pure HPy types"
<mattip>
so in order for that test to work, pypy needs to be able to convert a hpy handle into a PyObject internally
<antocuni>
a custom type can be pure or legacy (if it uses .legacy_slots and/or .legacy_methods)
<antocuni>
and when you compile and HPy module you can target the universal ABI o the CPython ABI, but that's orthogonal
<antocuni>
mattip: yes, and if I remember correctly, this has not been implemented yet
<antocuni>
and it's hard
<mattip>
ahh
<antocuni>
I think that the plan is to detect at module-loading time whether a type is pure or legacy. If it's legacy, it will be implemented using e.g. W_HPyObjectLegacy (which does not exists yet), which will inherit for e.g. W_BaseCPyObject
<antocuni>
I thought there was already some conversation about this, but I don't remember whether it is on github issues, pypy issues or on IRC
<antocuni>
and I cannot find it
<mattip>
OK. That will come with the cpyext performance penalty, since we will have to create the shadow cpyext object
<antocuni>
yes
<antocuni>
but that's fine because we will have the penalty only for legacy types
<antocuni>
pure types will be faster, which is also an incentive to complete the porting
<antocuni>
mattip: if you are looking for some low hanging fruits in the hpy-0.0.4 branch, I think that there are tests failing about exceptions
<antocuni>
which should be easy, but I didn't investigate
<mattip>
I think it is done
<antocuni>
ah cool
<mattip>
d15ce3843d6e and friends
<antocuni>
ah then probably this means that the only thing left is support for legacy types
_0az3 has quit [Remote host closed the connection]
<mattip>
right, but that mixes implementaion detaisl (aobut PyObject_HEAD) with porting details ("you can use `legacy_slots` in the spec specification to do ..."
<mattip>
)
<antocuni>
I don't understand
<antocuni>
PyObject_HEAD is not an implementation detail
<antocuni>
if you are writing a legacy type, you MUST put PyObject_HEAD in your C struct
_0az3 has quit [Remote host closed the connection]
<mattip>
In the tests, there is a lot of meta-programming, which hides the C struct. So all I see is