C extensions plays a big role in the Python ecosystem, but the existing Python/C API has become a burden for alternative implementations and for innovation of CPython itself. HPy is a joint project by PyPy, CPython, Cython, Numpy and GraalPython developers to design a new future proof API.
Abstract
HPy provides a new API for extending Python in C. In other words, you use #include <hpy.h> instead of #include <Python.h>. The talk will explain:
- Why the current Python/C API is problematic for alternative implementations such as PyPy and for CPython itself
- How HPy plans to solve the problem, and what is the migration path for existing extensions
- Why HPy is appealing for extension developers: in particular, higher performance on PyPy and GraalPython, and the “debug mode” which automatically catches many mistakes at runtime instead of hitting painful segfaults and/or memory leaks.