You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Python 3.x emits `ResourceWarning`s if certains resources aren't correctly
closed. Due to the way Mitogen has been terminating child processes this has
been occurring.
```
test_dev_tty_open_succeeds
(create_child_test.TtyCreateChildTest.test_dev_tty_open_succeeds) ...
/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/subprocess.py:1127:
ResourceWarning: subprocess 3313 is still running
_warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
ok
```
During garbage collection subprocess.Popen() objects emit
ResourceWarning("subprocess 123 is still running")
if proc.returncode hasn't been set. Typically calling proc.wait() does so,
once the sub-process has exited. Calling os.waitpid(proc.pid, 0) also waits
for the sub-process to exit, but it doesn't update proc.returncode, so the
ResourceWarning is still emitted.
This change exposes `subprocess.Popen` methods on
`mitogen.parent.PopenProcess`, so that the returncode can be set.
See https://gist.github.com/moreati/b8d157ff82cb15234bece4033accc5e5
|
1 year ago | |
|---|---|---|
| .ci | 1 year ago | |
| .github | 5 years ago | |
| ansible_mitogen | 1 year ago | |
| docs | 1 year ago | |
| examples | 4 years ago | |
| mitogen | 1 year ago | |
| scripts | 2 years ago | |
| tests | 1 year ago | |
| .gitignore | 2 years ago | |
| .lgtm.yml | 6 years ago | |
| LICENSE | 5 years ago | |
| MANIFEST.in | 7 years ago | |
| README.md | 4 years ago | |
| dev_requirements.txt | 7 years ago | |
| preamble_size.py | 4 years ago | |
| run_tests | 4 years ago | |
| setup.cfg | 5 years ago | |
| setup.py | 2 years ago | |
| tox.ini | 1 year ago | |
