Skip to main content
EuroPythonCode of ConductLive 📹

HPy: a better C API for Python

Room:
Liffey A
Start (Dublin time):
Start (your time):
Duration:
30 minutes

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.

Talk(c)Python Internals


The speaker

Ronan Lamy

I'm a freelance software developer and open-source consultant. I'm a cofounder of HPy and I've been a PyPy core developer since 2012.



← Back to schedule