Skip to main content

MEP-71 implementation tracking

Per-phase tracking for MEP-71 Mochi+Python package manager. Status values: NOT STARTED, IN PROGRESS, BLOCKED, LANDED, DEFERRED. Commit is the merge commit short SHA on main (or, for the umbrella PR, the in-branch commit on mep/0071-python-package).

A phase is LANDED only when its gate is green for every target (consume direction + publish direction where applicable). Missing surfaces become N.1, N.2, ... sub-phases per the umbrella-phase coverage rule.

Phase status

PhaseTitleStatusCommitTracking page
0Skeleton: package3/python/ layout + Driver / Venv / SkipReason / BridgeErrorLANDED8e1ef75fphase-00
1Simple-index client (PEP 503 HTML + PEP 691 JSON + PEP 700 metadata, sha256 + blake3 download verify)LANDED3dfc4490phase-01
2uv resolver bridge (subprocess + lockfile parsing) + PEP 751 pylock.toml round-tripLANDEDa38cb023phase-02
3PEP 561 stub discovery (4-tier precedence, typeshed pin, stubgen sandbox) + .pyi parserLANDED55469e50phase-03
4Closed type-mapping table (scalars / strings / collections / Optional / Union / dataclass / TypedDict / Protocol)LANDED39d45ea4phase-04
5Wrapper module synthesiser (<pkg>_externs.py + .pyi + _mochi_wrap.py runtime)LANDED627e3267phase-05
6Mochi-side extern fn emitter (<pkg>_shim.mochi with extern python fun + type ... = { ... })LANDED82aa45b6phase-06
7import python "<package>@<semver>" as <alias> grammar + parserLANDEDcd5fe055phase-07
8Build orchestration: workspace synth (+ wheel install + libpython link as sub-phases 8.1 / 8.2)LANDEDa8ec48f3phase-08
8.1Wheel install loop: drive uv against rendered pyproject.tomlNOT STARTEDphase-08
8.2libpython link: cgo embed for runtime-mode = "embedded"NOT STARTEDphase-08
9mochi.lock [[python-package]] integration + --check mode + capability databaseLANDEDcdd98e15phase-09
10TargetPythonPackage emit (sdist + wheel + mochi-build PEP 517 backend + .pyi for downstream typing)LANDED60e7917bphase-10
10.1Sdist tar.gz + wheel zip packer (deterministic mtimes, ZIP64-aware)NOT STARTEDphase-10
10.2mochi pkg build --target=python-package CLI verbNOT STARTEDphase-10
10.3Mochi module -> pypackage.Package surface walkerNOT STARTEDphase-10
11Trusted publishing (mochi pkg publish --to=pypi) Sigstore OIDC + PEP 740 attestationsLANDED981e7baaphase-11
11.1Sigstore live signing harness (sigstore-python shell-out + Rekor log)NOT STARTEDphase-11
11.2Live PyPI / TestPyPI HTTP (mint endpoint contract test)NOT STARTEDphase-11
11.3mochi pkg publish --to=pypi CLI verbNOT STARTEDphase-11
12Async bridge (asyncio.run per-call + persistent loop opt-in + cross-loop hazard guards)LANDEDdf616a89phase-12
12.1Wire asyncbridge into wrapper synthesiser so async surfaces emit sync shims end-to-endNOT STARTEDphase-12
12.2Free-threaded GIL handling around the persistent loop cache (PyMutex on cp3XYt)NOT STARTEDphase-12
12.3Cancellation + timeout propagation (mochi_async_timeout ContextVar -> asyncio.wait_for)NOT STARTEDphase-12
13abi3 wheel slimming + auditwheel-equivalent platform tag validationLANDEDd09e2919phase-13
13.1Live ELF / Mach-O / PE reader behind SymbolReaderNOT STARTEDphase-13
13.2Py_LIMITED_API discipline check before promoting to abi3NOT STARTEDphase-13
13.3mochi pkg audit --wheel <path> + mochi pkg slim --abi3 CLI verbsNOT STARTEDphase-13
14Subprocess runtime mode ([python].runtime-mode = "subprocess" with JSON-RPC protocol)LANDED168d2ec7phase-14
14.1Live os/exec spawn + stderr forwarding + worker lifetime managementNOT STARTEDphase-14
14.2Request pipelining (multiple in-flight requests demultiplexed by ID)NOT STARTEDphase-14
14.3mochi pkg run --runtime=subprocess CLI verb + [python].runtime-mode dispatchNOT STARTEDphase-14
14.4Mixed sync + async worker surfacesNOT STARTEDphase-14
15Attestation verification at install time + --require-attestations enforcementLANDED1cf131b7phase-15
15.1Live sigstore-go crypto verifier (X.509 chain + Rekor inclusion proof + SCT)NOT STARTEDphase-15
15.2Live PyPI HTTP <wheel-url>.provenance fetcher with cache + retryNOT STARTEDphase-15
15.3mochi pkg install --require-attestations + --allowed-builder + --trusted-publisher CLI verbsNOT STARTEDphase-15
16Pyodide / WASI target support (wasm32-emscripten, wasm32-wasip2 wheel resolution + WIT interface)LANDEDa2ac4f8cphase-16
16.1Wire WIT world emit into wrapper synthesiser so extern python -> WIT export for WASI targetsNOT STARTEDphase-16
16.2Live Pyodide distribution index client at pyodide.org/distribution/v<X>/full/NOT STARTEDphase-16
16.3mochi pkg install --target=pyodide / --target=wasi-p2 CLI verbs + lockfile target fieldNOT STARTEDphase-16
17Free-threaded CPython 3.13t / 3.14t (cp3XYt ABI tag, PyMutex, atomic refcount)LANDED332255f1phase-17
17.1Live ELF / Mach-O / PE module-marker reader (PEP 703 Py_mod_gil slot)NOT STARTEDphase-17
17.2Wire RenderLockShim into wrapper synthesiser so extern python shims pick the right primitiveNOT STARTEDphase-17
17.3mochi pkg install --runtime=free-threaded + --allow-untested-freethread + deny-list configNOT STARTEDphase-17
18abi2026 transition (`abi-tag-policy = "legacy""abi2026""both"`) + 2026-Q1 rolloutLANDED
18.1mochi.lock [python].abi-tag-policy field + mochi.toml mirrorNOT STARTEDphase-18
18.2mochi pkg promote --to=abi2026 CLI verb + .dist-info/ interpreter-tag relinkNOT STARTEDphase-18
18.3Live PyPI two-tag publish (cp32-abi3 + cp314-abi2026 side-by-side during migration window)NOT STARTEDphase-18

Per-phase fields

Each phase tracking page documents (or will document, once the phase begins):

  • Gate: the test or check that must pass for the phase to be LANDED.
  • Files to touch: the bridge-side files (Go) and emit-side files (Python template + C glue template) the phase introduces or modifies.
  • Fixtures: which of the 25-package fixture corpus the phase validates against.
  • Skip count: the expected SkipReport count per fixture package (golden numbers).
  • Sub-phase decomposition (if needed): N.1, N.2, ... entries when an upstream constraint forces splitting.

Fixture corpus

The 25-package fixture corpus (May 2026 top-30-most-downloaded-on-PyPI selection biased toward typed packages with PEP 561 markers):

numpy, pandas, scipy, scikit-learn, requests, httpx, urllib3, pillow, pydantic, attrs, click, typer, rich, tqdm, sqlalchemy, fastapi, starlette, uvicorn, aiohttp, pyyaml, toml, tomli, msgpack, orjson, pytest.

Each phase that touches the type-mapping or wrapper layer asserts golden counts against this corpus. The corpus is regenerated quarterly to track PyPI API drift.

Coverage of the four PEP 561 tiers across the corpus (approximate, as of 2026-Q2):

  • Tier 1 (inline py.typed): pydantic, attrs, click, typer, rich, httpx, fastapi, starlette, sqlalchemy 2.x, msgpack, orjson, pytest. 12 / 25.
  • Tier 2 (sibling <name>-stubs): requests (types-requests), urllib3 (types-urllib3), pyyaml (types-PyYAML), toml (types-toml), tqdm (types-tqdm). 5 / 25.
  • Tier 3 (typeshed): tomli, uvicorn (partial). 2 / 25.
  • Tier 4 (stubgen fallback): numpy (partial; numpy ships partial inline), pandas (partial), scipy, scikit-learn, pillow, aiohttp (partial). 6 / 25.

The mix is intentional to exercise all four tiers across the fixture set.

Implementation location

The bridge lives at package3/python/ in the repo root:

package3/python/
README.md # pointer to MEP-71 spec
errors/ # SkipReason + BridgeError (phase 0)
build/ # Workspace + Driver + Venv + libpython link (phase 0)
semver/ # PEP 440 version parser (phase 1)
simple/ # PEP 503 / 691 / 700 simple-index client + content-addressed cache (phase 1)
toml/ # minimal TOML reader scoped to uv.lock + pylock.toml + pyproject.toml (phase 2)
uv/ # uv subprocess bridge + uv.lock parser + pylock.toml round-trip (phase 2)
stubs/ # PEP 561 stub discovery + typeshed pin + stubgen sandbox + .pyi parser (phase 3)
typemap/ # closed type table + Mochi/Python rendering (phase 4)
wrapper/ # <pkg>_externs.py + .pyi + _mochi_wrap.py synthesiser (phase 5)
emit/ # Mochi shim emitter — <pkg>_shim.mochi with extern python fun + type aliases (phase 6)
importspec/ # import python "<spec>" body parser (phase 7)
lockfile/ # mochi.lock [[python-package]] table + --check diff + capability database (phase 9)
pypackage/ # TargetPythonPackage emit: sdist + wheel + mochi_build PEP 517 backend (phase 10)
publish/ # PyPI publish + Sigstore + PEP 740 attestations (phase 11)
asyncbridge/ # async-fn -> sync-fn shim renderer + cross-loop guard (phase 12)
abi3/ # abi3 wheel slimming + auditwheel-equivalent platform validator (phase 13)
subproc/ # JSON-RPC 2.0 stdio protocol + Python worker source renderer (phase 14)
attest/ # install-time PEP 740 verification + policy (phase 15)
pyodide/ # pyodide / emscripten / wasi-p2 platform-tag matcher + WIT emitter (phase 16)
freethread/ # cp3XYt ABI matcher + PEP 703 module-marker audit + PyMutex lock shim (phase 17)
abi2026/ # 2026-Q1 ABI-tag transition: TagClass + Policy + Selector + Promote/Downgrade (phase 18)
runtime/ # the embedded mochi_runtime Python package (phase 5 + phase 12)

The package3/python/ location is shared with the broader MEP-57 polyglot package work (where package3/ is the v3 package-system tree). MEP-73 occupies package3/rust/ in parallel.

Status snapshot

As of 2026-05-30 01:35 (GMT+7): MEP-71 spec and research bundle landed; all 19 umbrella phases (0-18) LANDED on main (8.1, 8.2, 10.1, 10.2, 10.3, 11.1, 11.2, 11.3, 12.1, 12.2, 12.3, 13.1, 13.2, 13.3, 14.1, 14.2, 14.3, 14.4, 15.1, 15.2, 15.3, 16.1, 16.2, 16.3, 17.1, 17.2, 17.3, 18.1, 18.2, 18.3 deferred sub-phases). Every umbrella phase shipped one-PR-per-phase with auto-merge, following the MEP-73 cadence; only the deferred sub-phases (live IO, CLI verbs, live crypto) remain.

Cross-references