We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

HPy: a better C API for Python

Formal Metadata

Title
HPy: a better C API for Python
Title of Series
Number of Parts
112
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
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
The official Python C API is specific to the current implementation of CPython. It has served us well and forms the basis upon which our entire extension ecosystem rests. However, it exposes a lot of internal details which makes it hard to implement it for other Python implementations (e.g. PyPy, GraalPython, Jython, IronPython, etc.), and prevents major evolutions of CPython itself, such as using a GC instead of refcounting, or removing the GIL. This is where HPy comes in. It's a new C API designed from the ground up according to the following goals: * running much faster on alternate implementations, and at native speed on CPython * making it possible to compile a single binary which runs unmodified on all supported Python implementations and versions * being simpler and more manageable than the Python/C API * providing an improved debugging experience. We'll discuss its current status and show how existing extensions can be gradually ported to it.