Skip to content

embed: ps_island.c engine seam for PyPy (init and exception args) #667

Open

Description

@espetro

Plan: .agents/plans/2026-10-25-embedding-release-plan.md (branch work/embedplan). Tracking: #651. Epic: #428.

Size: M.

Two APIs, three lines in src/pyscriptc/runtime/ps_island.c: Py_InitializeEx(0) (line 37) becomes PS_ENGINE_START(), which for -DPS_ENGINE_PYPY is rpython_startup_code(), pypy_setup_home(home, 1) and pypy_init_threads() (order and the need for pypy_init_threads for PyGILState_Ensure from native threads were not run in the POC; verify first); PyException_GetArgs (lines 276 and 297) becomes PyObject_GetAttrString(val, "args"). The driver emits the define from the descriptor. Keep the PyGILState and SaveThread discipline from #174.

Acceptance: ps_island.c compiles against CPython and PyPy headers; the CPython island tests are unchanged; exception message tests green.

Depends on: #666.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions