Skip to content

Commit 0bc4f4d

Browse files
docs: changelog what the branch does since the engine seam
The changelog still said only the trio engine could host gateways, and the ProtocolEngine docstring the same; both engines run the whole protocol. It had no entries for trio becoming an extra, the execnet info worker/engines keys, Deployment and transfer, or RSync becoming an adapter with a changed callback. Co-Authored-By: Claude Opus 5.5 (1M context) via Claude Code <noreply@anthropic.com>
1 parent bf24d14 commit 0bc4f4d

2 files changed

Lines changed: 31 additions & 14 deletions

File tree

‎CHANGELOG.rst‎

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,13 @@ series, once the consumers that need them have released without them.
2828
``python -m execnet worker ...`` for a direct interpreter launch and
2929
``execnet worker ...`` under ``uv run``; both are the same CLI.
3030
``execnet-socketserver`` still works and forwards to ``execnet server``
31-
with a ``DeprecationWarning``. ``execnet info`` reports version, trio
32-
availability and supported transports as JSON, and replaces the
33-
``import execnet, trio`` probe used to decide whether a ``python=``
34-
interpreter can host a worker directly.
31+
with a ``DeprecationWarning``. ``execnet info`` reports as JSON the execnet
32+
version, whether this interpreter can serve a worker (``worker``) and on
33+
which engines (``engines``), the trio version, Python, executable, platform
34+
and supported protocols. It replaces the ``import execnet, trio`` probe used
35+
to decide whether a ``python=`` interpreter can host a worker directly; a
36+
coordinator falls back to the ``trio`` key for a remote that predates
37+
``worker``.
3538
* The protocol no longer has to be the worker's stdin/stdout. A new
3639
``transport=socket|stdio`` spec key selects, and ``socket`` is the default
3740
for every worker execnet spawns itself: an inherited socketpair for
@@ -282,10 +285,26 @@ series, once the consumers that need them have released without them.
282285
two meet the same contract -- start, a portal, one door to the root task scope, the
283286
group registry, a stop that joins -- and are tested against the same suite.
284287

285-
**Only the trio engine can host gateways.** The protocol core is still written
286-
against trio directly, so a group built on an asyncio engine is refused with a
287-
message saying what is missing. The backend exists so that the boundary between
288-
execnet and the async library under it is a tested one rather than an intention.
288+
Both run the whole protocol, coordinator and worker alike: the protocol core
289+
reaches its async library only through a small neutral layer. An engine picks
290+
trio when it is installed and asyncio otherwise; ``backend=`` overrides that.
291+
292+
* **trio is an extra where asyncio can run the protocol.** Nothing extra is
293+
required on Python 3.11 and newer; ``execnet[trio]`` asks for trio anywhere,
294+
and an install that has it keeps using it. Python 3.10 has no
295+
``asyncio.TaskGroup``, so trio stays a requirement there.
296+
* New ``execnet.Deployment`` puts a project on a host *before* any worker runs
297+
against it: a frozen ``uv`` environment, the project's own wheel installed into
298+
it, and the files the wheel does not carry. It hands back ``execnet.Deployed``,
299+
whose ``translate()`` maps a local path to where it landed. New
300+
``execnet.transfer`` sends a tree to a host, only what differs. Both run as a
301+
service inside the worker, so no source is shipped, and both are available on
302+
every namespace.
303+
* ``RSync`` is deprecated and now an adapter over ``execnet.transfer``; the old
304+
source-shipped receiver is gone. ``filter``, ``delete``, the progress hook and
305+
``finishedcallback`` behave as before. ``callback`` receives the gateway rather
306+
than a channel, and fires when a file is sent rather than when the far side
307+
confirms it -- the new protocol has no per-file acknowledgement.
289308

290309
* Gateway groups share one ``execnet.ProtocolEngine`` per process -- one OS thread
291310
running a loop -- instead of starting a thread each. Pass an explicit one as

‎src/execnet/_engine.py‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,10 @@ class ProtocolEngine:
169169
application that would rather not discover a broken environment at its
170170
first ``makegateway()`` should ask.
171171
172-
``backend`` picks which async library the loop is: ``"trio"`` (the
173-
default) or ``"asyncio"``. **The protocol core only runs on trio
174-
today** -- an asyncio engine starts, runs tasks and stops, but refuses
175-
to build gateways, because the protocol core has not been ported
176-
through the seam yet. It exists so that the seam is a real,
177-
tested boundary rather than an intention. The asyncio backend needs
172+
``backend`` picks which async library the loop is: ``"trio"`` or
173+
``"asyncio"``; left unset, it is trio when trio is installed and
174+
asyncio otherwise, decided when the loop starts. Both run the whole
175+
protocol. The asyncio backend needs
178176
Python 3.11 for ``TaskGroup``; an older interpreter is refused here,
179177
when the engine is built.
180178
"""

0 commit comments

Comments
 (0)