1711. v0.12.4 asyncio full port
Why this spec exists
Spec 1710's sub-system blocker table parks two rows on T6 with the note "port the asyncio package (event loop, transports, protocols, futures, tasks, streams, subprocess, queues, locks) as its own spec". That spec is this one.
The immediate need is small: unittest.mock does
import asyncio at module load and then reaches into
asyncio.coroutines._is_coroutine, which is a single sentinel object.
stdlib/unittest/async_case.py is heavier; it constructs an
asyncio.Runner and runs coroutines. Both consumers sit on the path
to test_tabnanny.py (via unittest.mock) and to anything that uses
IsolatedAsyncioTestCase.
A stub that defines asyncio.coroutines._is_coroutine only would
satisfy unittest.mock. The standing project rule
("port whole subsystem, never partial slices") rules that out: when a
gate hits a subsystem, every function in that subsystem gets a faithful
port. So this spec covers the full asyncio surface — Python + C —
even though only a sliver is exercised on day one.
Checklist
Status legend: DONE = landed and verified, WIP = in progress, TODO = not started, BLOCKED = waiting on a larger sub-system spec.
Sources to fully port (CPython 3.14)
Python layer (Lib/asyncio/):
| File | Lines | gopy destination | Status | Commit |
|---|---|---|---|---|
__init__.py | 74 | stdlib/asyncio/__init__.py | TODO | — |
base_events.py | 2082 | stdlib/asyncio/base_events.py | TODO | — |
base_futures.py | 67 | stdlib/asyncio/base_futures.py | TODO | — |
base_subprocess.py | 319 | stdlib/asyncio/base_subprocess.py | TODO | — |
base_tasks.py | 94 | stdlib/asyncio/base_tasks.py | TODO | — |
constants.py | 41 | stdlib/asyncio/constants.py | TODO | — |
coroutines.py | 118 | stdlib/asyncio/coroutines.py | TODO | — |
events.py | 878 | stdlib/asyncio/events.py | TODO | — |
exceptions.py | 62 | stdlib/asyncio/exceptions.py | TODO |