Skip to content

Commit 82fc3dc

Browse files
docs: crosscheck the handoff docs against the tree they describe
HANDOFF and the roadmap had drifted from what is actually there: - the test count was 552; it is 574. `tox -e docs` doctests all of doc/, not just doc/example/ -- so basics.rst is verified, while test_debug.rst and test_ssh_fileserver.rst have no doctests and nothing checks them. - `execnet info` answers six keys, not five, and "version" is spelled "execnet". Its `protocols` list has no reader anywhere and omits `share`, so a Windows remote understates itself -- recorded under roadmap item 1, which is where that payload gets settled. - the file map was missing _trace.py, _gevent_support.py and __main__.py. - roadmap section 5 "Stale wording" was itself stale: the ExecModel docstring and _shim.REMOVED_IN were both fixed already. Same for the changelog, which is renumbered to 3.0. Elsewhere: the README still advertised zero-install bootstrapping and eventlet, which 3.0 reversed and killed respectively; and the deselect in xdist-known-failures.txt justified itself with a launch command (`python -m execnet._trio_worker`) that is not the launch contract, in the file a maintainer reads to judge whether the deselect still holds. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent ba5829a commit 82fc3dc

6 files changed

Lines changed: 45 additions & 30 deletions

File tree

.github/xdist-known-failures.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
# Asserts `sys.argv == ["-c"]`, and its own docstring says it is
1515
# documenting "the behavior due to execnet using `python -c`". execnet no
16-
# longer ships source over the wire: workers are launched as
17-
# `python -m execnet._trio_worker <config>`, so sys.argv legitimately
18-
# differs. Needs an xdist-side update, not an execnet fix.
16+
# longer ships source over the wire: workers are launched through the CLI
17+
# (`python -m execnet worker --protocol-... --config ...`), so sys.argv
18+
# legitimately differs. Needs an xdist-side update, not an execnet fix.
1919
testing/test_remote.py::test_remote_inner_argv

HANDOFF.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,17 @@ This is the doc to read first. Two companions:
1111
## How to work here
1212

1313
```
14-
uv run pytest testing/ # 552 passed, 66 skipped
15-
uv run pytest testing/ -n 12 # must stay green (~7s)
14+
uv run pytest testing/ # 574 passed, 66 skipped
15+
uv run pytest testing/ -n 12 # must stay green (~8s)
1616
uv run pre-commit run -a # never grep-filter its output
17-
uv run tox -e docs # builds with -W and doctests doc/example/
17+
uv run tox -e docs # sphinx -W, then doctests all of doc/
1818
```
1919

20+
`tox -e docs` doctests the whole `doc/` tree, not just the examples:
21+
`doc/basics.rst` is executed too, so a `>>>` block there is checked. The
22+
two files with no `>>>` in them — `doc/example/test_debug.rst` (the trace
23+
transcript) and `test_ssh_fileserver.rst` — are prose nothing verifies.
24+
2025
ssh paths have a real local harness in `testing/test_ssh_local.py` (an
2126
asyncssh server; needs a system ssh client). Hypothesis stress coverage
2227
is `testing/test_channel_stress.py` behind `--stress=N`.
@@ -42,8 +47,10 @@ protocol (`Message` framing) is unchanged from 2.1.
4247

4348
**No source is shipped over the wire, ever.** Workers are launched as
4449
`execnet worker <transport> <config>`; foreign and remote interpreters are
45-
uv-provisioned; a dev coordinator builds and ships a wheel. Version skew
46-
gets a rough major/minor check (`_trio_worker._check_version`).
50+
uv-provisioned; a dev coordinator builds and ships a wheel. A major/minor
51+
version skew is **refused** by the worker before it touches its stdio
52+
(`_trio_worker._check_version`); `EXECNET_IGNORE_VERSION_SKEW=1` in its
53+
environment or its config `env:` downgrades that to a warning.
4754

4855
### Four namespaces, one per concurrency library you drive execnet from
4956

@@ -77,8 +84,10 @@ execnet info
7784

7885
`ADDR` is `unix:/path` or `host:port`. Everything that starts a worker
7986
emits these tokens; there is no second launch path. `execnet info`
80-
answers JSON (version, trio, executable, platform, protocols) so
81-
provisioning learns a remote's version *before* connecting.
87+
answers JSON — keys `execnet`, `trio`, `python`, `executable`, `platform`,
88+
`protocols` — so provisioning learns a remote's version *before*
89+
connecting. `protocols` is advisory today: nothing reads it, and it does
90+
not list `share` (see roadmap item 1, which is about this payload).
8291

8392
`transport=socket|stdio` is a spec key; **`socket` is the default for
8493
every worker execnet spawns**, which is why a worker's stdio is free for
@@ -128,6 +137,8 @@ the coordinator's shape does not dictate the worker's.
128137
| `_cli.py` / `_socketserver.py` / `_provision.py` | the CLI, `execnet server`, uv provisioning + argv builders |
129138
| `_execmodel.py` | `WORKER_PROFILES`, `resolve_profile`, and the deprecated `ExecModel` xdist shim |
130139
| `_rsync.py` / `_rsync_remote.py` / `_xspec.py` / `_exec_source.py` | rsync, spec parsing, remote_exec source normalization |
140+
| `_trace.py` / `_gevent_support.py` | `EXECNET_DEBUG` tracing; the gevent wait backend's hub plumbing |
141+
| `__main__.py` / `_version.py` | `python -m execnet``_cli.main`; the generated version |
131142
| `_shim.py` + `gateway*.py`, `multi.py`, `rsync*.py`, `xspec.py` | the deprecated pre-Trio module names, warning and forwarding |
132143

133144
## Invariants — do not regress

README.rst

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ execnet: distributed Python deployment and communication
1313
.. image:: https://github.com/pytest-dev/execnet/workflows/test/badge.svg
1414
:target: https://github.com/pytest-dev/execnet/actions?query=workflow%3Atest
1515

16-
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
17-
:target: https://github.com/python/black
16+
.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
17+
:target: https://github.com/astral-sh/ruff
1818

1919
.. _execnet: https://execnet.readthedocs.io
2020

@@ -29,7 +29,9 @@ a minimal and fast API targeting the following uses:
2929
Features
3030
--------
3131

32-
* zero-install bootstrapping: no remote installation required!
32+
* automatic provisioning: a target environment that lacks execnet is set up
33+
with uv_, so no manual remote installation is required -- and no source of
34+
our own is ever shipped over the wire
3335

3436
* flexible communication: send/receive as well as
3537
callback/queue mechanisms supported
@@ -40,5 +42,8 @@ Features
4042

4143
* interoperable between Windows and Unix-ish systems.
4244

43-
* integrates with different threading models, including standard
44-
os threads, eventlet and gevent based systems.
45+
* one namespace per concurrency library you drive it from: threads
46+
(``execnet``), trio (``execnet.trio``), asyncio (``execnet.aio``) and
47+
gevent (``execnet.gevent``).
48+
49+
.. _uv: https://docs.astral.sh/uv/

ROADMAP-3.0.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ for.
66

77
## Why 3.0, not 2.2
88

9-
The branch was drafted as 2.2 and the changelog still called it that. It
10-
is a major release:
9+
The branch was drafted as 2.2. It is a major release:
1110

1211
- the launch contract changed — a worker is `execnet worker …`, and no
1312
source is bootstrapped over the wire;
@@ -80,6 +79,12 @@ prefer it and fall back to `"trio"` only for a 2.x-vintage remote. Keep
8079
emitting `"trio"` indefinitely. One line, and it buys the freedom to
8180
answer honestly from an engine that is not Trio.
8281

82+
Settle the rest of the payload in the same pass, since it is the same
83+
cross-version contract. It is `execnet`, `trio`, `python`, `executable`,
84+
`platform`, `protocols` today; `protocols` has no reader at all and does
85+
not list `share`, so a Windows remote understates what it can do. Either
86+
give it a reader or say in the docs that it is informational.
87+
8388
### 2. Deprecated names out of `__all__`
8489

8590
`set_execmodel` is advertised as supported API by `execnet.__all__` and
@@ -167,12 +172,6 @@ we are); adopt the private-stdlib trick and own its seams; or note that
167172
makes `execnet.gevent` work in the environment gevent users actually have.
168173
Decide before 3.0, because it is what the namespace promises.
169174

170-
### 5. Stale wording
171-
172-
`_execmodel.ExecModel`'s docstring still describes the `loop=`/`exec=`/
173-
`wait=` axes, which were dropped before they shipped. `_shim.REMOVED_IN`
174-
says `execnet 3.0`, which is now wrong per the policy above.
175-
176175
## What pins us to Trio
177176

178177
Two futures get conflated and have different answers:
@@ -330,9 +329,8 @@ arriving.
330329
## Suggested order
331330

332331
1. `execnet info` capability key, `__all__` cleanups, underscore the engine
333-
methods, fix the stale wording — small, and item 1 cannot be changed
334-
after release.
335-
2. Changelog and docs renumbered to 3.0; undraft PR #422.
332+
methods — small, and item 1 cannot be changed after release.
333+
2. Undraft PR #422. (The changelog and docs are renumbered already.)
336334
3. Decide the execnet/xdist split for provisioning + workspaces, then build
337335
points 1–3 of that section. This is what the next xdist waits on.
338336
4. Kubernetes: decide in-tree versus extension point, then the proxy.

doc/basics.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,9 +396,10 @@ The execnet command line
396396
and forwards here with a ``DeprecationWarning``.
397397

398398
``execnet info``
399-
Print this interpreter's execnet version, trio availability, executable,
400-
platform and supported transports as JSON. A coordinator uses it to
401-
decide whether a ``python=`` interpreter can host a worker directly.
399+
Print this interpreter's execnet version, trio availability, Python
400+
version, executable, platform and supported protocols as JSON. A
401+
coordinator uses it to decide whether a ``python=`` interpreter can host
402+
a worker directly.
402403

403404
``execnet worker ...``
404405
The launch contract between a coordinator and the worker process it

doc/example/test_ssh_fileserver.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ And here is some code to use it to retrieve remote contents::
1111

1212
import execnet
1313
import servefiles
14-
gw = execnet.makegateway("ssh=codespeak.net")
14+
gw = execnet.makegateway("ssh=myhost")
1515
channel = gw.remote_exec(servefiles)
1616

1717
for fn in ('/etc/passwd', '/etc/group'):

0 commit comments

Comments
 (0)