ninia / jep

Embed Python in Java
Other
1.3k stars 147 forks source link

Make most pyjtypes into heap types. #395

Closed bsteffensmeier closed 2 years ago

bsteffensmeier commented 2 years ago

This brings jep closer to the Python Stable ABI and ensures the pyjtypes with c extensions behave the same as the dynamically created types generated for other classes.

See: https://docs.python.org/3.10/c-api/typeobj.html#static-types

bsteffensmeier commented 2 years ago

Thanks to @Techcable who provided a starting point for this work. This is not as extensive as the work in #308 but it is a step in that direction.

Techcable commented 2 years ago

Great work! This should also make it easier to support alternative implementations like PyPy and GraalPython.

Also the stable ABI has been gradually improving over the last couple of versions. I am hopeful #308 would go a lot better in the future :)