`trio` subprocs launching
Replacement for #55 after going through the slew of merge conflicts.
From that issue verbatim here is the original description:
ping @linuxmaniac
This is in preparation of a python 3.6+ only 1.0.0.alpha release and replaces all the internal processing launching machinery with the new subprocess support in trio.
This not only gets us cross OS support for free but also gives access to async/await based scenario and agent spawning.
A few interesting notes:
-
SIPpturns out to be a good fit withtriocancellation semantics since it has a built in cancellation system viaSIGUSR1 - this now gives us a strictly single threaded implementation
-
triogives us deterministic teardown allowing for much finer control over per agent failures and subsequent reporting
TODO:
- [ ] adjust to the new
trioproc spawning APIs and get CI running clean, also see- https://github.com/python-trio/trio/pull/1568 -> we need to pin to the appropriate
trioversion that this was merged to. - [ ] i think we want the
process = await nursery.start(trio.run_process, ...)form yah?
- https://github.com/python-trio/trio/pull/1568 -> we need to pin to the appropriate
- [ ] write some async spawning tests and examples in the readme
- do we need this right away or can we add it in a follow up?
- consider playing around with timeout and other cancellation tools such as
trio.move_on_after()andtrio.fail_after()and figure out how this can interplay with log reporting for interactive use - [ ] add the mac os env to CI
I look forward to feedback and thoughts!
Looks like I've broken something using the new spawn api, not sure what.
I don't have the sipp binary installed locally atm so if someone wants to take a shot at repairing this (hint hint @linuxmaniac) please feel free!
BTW, some of the commits don't pass the pre-commit checks.
when rebasing, you should do git rebase -x 'pre-commit run --from HEAD^ --to HEAD' origin/master in order to force the execution of pre-commit checks per commit
@linuxmaniac RE all the little changes you suggest, can you make a PR onto this branch to fix them if you've already gone through it?
@linuxmaniac RE all the little changes you suggest, can you make a PR onto this branch to fix them if you've already gone through it?
There you are https://github.com/SIPp/pysipp/pull/88
@linuxmaniac landed it 🏄🏼
There rebased clean to master.