HPy: The Future of Python Native Extensions
Formal Metadata
| Title | HPy: The Future of Python Native Extensions |
|
| Title of Series | |
| Number of Parts | 141 |
| Author | |
| License | CC Attribution - NonCommercial - ShareAlike 4.0 International: You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this license. |
| Identifiers | |
| Publisher | |
| Release Date | |
| Language | |
Content Metadata
| Subject Area | |
| Genre | |
| Abstract | Updating Python versions often forces us to update native extensions at the
same time. But what if you need to update Python because of a security issue,
but cannot (yet) move to a newer version of a dependency? Or you are running a
proprietary binary extension that cannot easily be recompiled?
The HPy project provides a better C extension API for Python. It compiles to
binaries that work across all versions of CPython, PyPy, GraalPy. HPy makes
porting from the existing C API easy and its design ensures that the binaries
we produce today stay binary compatible with future Python versions.
NumPy is the single largest direct user of the CPython C API we know of. After
over 2 years of work and more than 30k lines of code ported, we can demonstrate
NumPy running its tests and benchmarks with HPy. We will show the same NumPy
binary run on multiple CPython versions and GraalPy. And we will discuss
performance characteristics of this port across CPython, GraalPy, and PyPy. |
|