Erlang_python 3.0.0 released

Just shipped 3.0.0 of erlang_python. It embeds CPython into the BEAM via dirty NIFs and lets you call Python from Erlang or Elixir with proper parallelism, async/await, and bidirectional callbacks.

What’s new:

  • Two public execution modes

  • worker (default): dedicated pthread per context, works with any Python version, stable thread affinity for numpy/torch/tensorflow

  • owngil (Python 3.14+): dedicated pthread + subinterpreter with its own GIL, true N-way parallelism

  • py:async_call/3,4, py:async_gather/1,2, py:parallel/1 all work end-to-end now

  • Free-threaded Python 3.13t works automatically in worker mode

Fixed:

  • Issue #63: thread-callback flake on FreeBSD 14 / Python 3.12 (six layered defects in the erlang.call plumbing, now resolved)

  • py:async_call/py:async_await round-trip used to silently time out

Removed (breaking, see migration guide):

  • Public py:subinterp_* handle API; use py_context:start_link(N, owngil) instead

  • py:num_executors/0, py:async_stream/3,4, the multi_executor and free_threaded mode atoms

  • num_executors and num_async_workers config keys

Docs: erlang_python v3.0.0 — Documentation

Repo: GitHub - benoitc/erlang-python: Execute Python from Erlang using dirty NIFs with GIL-aware execution, rate limiting, and free-threading support · GitHub

Release: Release 3.0.0 · benoitc/erlang-python · GitHub

Happy to hear what people are doing with it.

3 Likes