changed the run_process() API to allow for calling via a
process = await nursery.start(run_process, ...) style and a new
deliver_cancel() callback api from:
https://github.com/python-trio/trio/pull/1568
i commented here, and this might be a way for us to simplify our
implementation by leveraging the now existing shielded-nursery-spawns-killer-task style
which is more or less what we implemented before this APi landed:
https://github.com/python-trio/trio/pull/1568#pullrequestreview-551374713
currently the default impls don't close the stdstreams on a hard
kill? I'll be copying that in from the old Process.aclose() in
the interim.
home/goodboy/repos/tractor/tractor/_spawn.py:191: TrioDeprecationWarning: using trio.Process as an async context manager is deprecated since Trio 0.20.0; use run_process or nursery.start(run_process, ...) instead (https://github.com/python-trio/trio/issues/1104)
async with proc: # calls ``trio.Process.aclose()``
/home/goodboy/.virtualenvs/xonsh310/lib/python3.10/site-packages/trio/_abc.py:261: TrioDeprecationWarning: trio.Process.aclose is deprecated since Trio 0.20.0; use run_process or nursery.start(run_process, ...) instead (https://github.com/python-trio/trio/issues/1104)
await self.aclose()
Mostly comprehensive list of related trio issues & PRs:
trio
changed it's subprocess API as per the large discussion in https://github.com/python-trio/trio/issues/1104.Summary:
Process.aclose()
behaviour due to it being "surprising", prone to bugs and,run_process()
API to allow for calling via aprocess = await nursery.start(run_process, ...)
style and a newdeliver_cancel()
callback api from: https://github.com/python-trio/trio/pull/1568Process.aclose()
in the interim.Mostly comprehensive list of related
trio
issues & PRs: