Skip to content

dev call 20231005

Stepan Sindelar edited this page Oct 5, 2023 · 8 revisions

Dev Call: 5 October 2023

Present

Stepan, Florian, Matti, Du Toit, Tim, Antonio, Petr

Agenda

  • HPy Meetup / CPython core dev sprint in Brno
  • HPy 0.9 released 🥳

CPython core dev sprint C API summit

  • Ideas for C API summit pres:
    • present (detailed) handles contract (HPy_Dup, HPy_Close, lifetime of handles, HPy_Is)
    • show how is that contract implemented on CPython (HPy_Dup -> Py_INCREF, etc.)
    • still: debug mode checks the full contract
    • handles allow boxing (MicroPython also does boxing)
    • handles would work well with WebAssembly GC (MicroPython also uses tracing GC and its API exposes handles)
    • no-GIL: handles (and their lifetime tied to single Python->C call) allow "single threaded" reference counting, could that be useful?
    • API vs. ABI: you can have ABI stabililty and backwards compatiblilty without an explicit context arg (like SDL did) but it is way more complicated and fragile.
    • context arg allows specializations (profiling in upcalls; specialized upcall functions)
  • Comments from Petr
    • Petr will give a talk about the future of the C API (basically big list of suggestions)
    • let's make the HPy talk a collection of extra ideas for that
    • We should mainly talk about benefits of context and handles, and
    • show the benefit of the HPy context.
  • Antonio meant, we can also show that handles don't impose a radical change for the CPython implementation.
  • We should, in general, not show too many detail in the slides but let's prepare some backup slides (for later discussion) with more details about how we implement CPython ABI mode and show that overhead is minimal.

HPy Helpers

  • Stepan is not sure if the current way of shipping helpers is good
  • He is curious about the updating story. How would we propagate a bug fix?
  • Maybe we should ship a shared lib and load it.
  • It might be useful to compile a HPy helpers version into the extension such that the runtime can check and refuse to run helpers with known issues
  • Florian will open an issue for further discussion (see #450)

Cython/HPy

  • We can translate binops and forloops
  • There is a problem

PyPy

  • HPy 0.9 migration is making good progress; 26 test still
  • This should (hopefully) be included in the next PyPy release
Clone this wiki locally