| Commit message (Collapse) | Author | Age |
|
|
| |
asyncio earlier relied on subprocess module to send signals to the process, this has some drawbacks one being that subprocess module unnecessarily calls waitpid on child processes and hence it races with asyncio implementation which internally uses child watchers. To mitigate this, now asyncio sends signals directly to the process without going through the subprocess on non windows systems. On Windows it fallbacks to subprocess module handling but on windows there are no child watchers so this issue doesn't exists altogether.
|
|
|
|
| |
`AbstractChildWatcher` from asyncio APIs (#120893)
|
|
|
|
| |
(#120818)
|
|
|
|
|
| |
MultiLoopChildWatcher from asyncio (#120805)
Remove SafeChildWatcher, FastChildWatcher and MultiLoopChildWatcher from asyncio. These child watchers have been deprecated since Python 3.12. The tests are also removed and some more tests will be added after the rewrite of child watchers.
|
|
|
|
| |
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
| |
(#115918)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#114889)
Add test annotations required to run the test suite on iOS (PEP 730).
The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.
`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
|
| |
|
|
|
|
| |
(GH-113991)
|
| |
|
|
|
|
|
|
| |
Replace harcoded sleep of 500 ms with synchronization using a pipe.
Fix also Process._feed_stdin(): catch also BrokenPipeError on
stdin.write(input), not only on stdin.drain().
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SubprocessProtocol process_exited() method can be called before
pipe_data_received() and pipe_connection_lost() methods. Document it
and adapt the test for that.
Revert commit 282edd7b2a74c4dfe1bfe3c5b1d30f9c21d554d6.
_child_watcher_callback() calls immediately _process_exited(): don't
add an additional delay with call_soon(). The reverted change didn't
make _process_exited() more determistic: it can still be called
before pipe_connection_lost() for example.
Co-authored-by: Davide Rizzo <sorcio@gmail.com>
|
|
|
|
|
|
|
| |
subprocess's communicate(None) closes stdin of the child process, after
sending no (extra) data. Make asyncio variant do the same.
This fixes issues with processes that waits for EOF on stdin before
continuing.
|
| |
|
|
|
|
| |
(#100569)
|
| |
|
|
|
|
| |
(#100154)
|
| |
|
| |
|
|
|
|
|
| |
(#98333)
Alas, warnings.catch_warnings() has global scope, not thread scope, so this is still not perfect, but it reduces the time during which warnings are ignored. Better solution welcome.
|
|
|
|
|
|
|
| |
This is the next step for deprecating child watchers.
Until we've removed the API completely we have to use it, so this PR is mostly suppressing a lot of warnings when using the API internally.
Once the child watcher API is totally removed, the two child watcher implementations we actually use and need (Pidfd and Thread) will be turned into internal helpers.
|
|
|
|
| |
Signed-off-by: Christoph Hamsen <hamsen.christoph@posteo.de>
Co-authored-by: July Tikhonov <july.tikh@gmail.com>
|
|
|
|
| |
`MultiLoopChildWatcher` child watchers (#98089)
|
|
|
|
|
|
|
|
| |
There is no reason for this watcher to be attached to any particular loop.
This should make it safe to use regardless of the lifetime of the event loop running in the main thread
(relative to other loops).
Co-authored-by: Yury Selivanov <yury@edgedb.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
|
|
|
| |
blocked (#32073)
|
|
|
|
|
|
| |
GenericWatcherTests.test_create_subprocess_fails_with_inactive_watcher (GH-95009)
The test was never run, because it was missing the TestCase class.
The test failed because the wrong attribute was patched.
|
|
|
|
| |
(#94926)
|
|
|
|
|
|
|
|
| |
One more thing that can help prevent people from using `preexec_fn`.
Also adds conditional skips to two tests exposing ASAN flakiness on the Ubuntu 20.04 Address Sanitizer Github CI system. When that build is run on more modern systems the "problem" does not show up. It seems ASAN implementation related.
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
Fix typos in the Lib directory as identified by codespell.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
| |
suite (GH-26542)
|
|
|
|
| |
(GH-23521)
|
| |
|
| |
|
| |
|
|
|
|
| |
Fix test_communicate() of test_asyncio.test_subprocess: use
support.LONG_TIMEOUT (5 minutes), instead of 1 minute.
|
|
|
| |
See https://bugs.python.org/issue38242 for more details
|
| |
|
|
|
|
| |
asyncio tests (GH-15928)
|
|
|
|
| |
non-main thread (GH-14344)
|
| |
|
|
|
|
|
| |
executed in non-main thread (#13630)" (GH-13793)
https://bugs.python.org/issue35621
|
|
|
|
| |
non-main thread (#13630)
|
|
|
|
|
|
|
|
|
| |
Drop isinstance checks from create_subprocess_exec function and let
subprocess module do them.
https://bugs.python.org/issue35246
https://bugs.python.org/issue35246
|
|
|
|
|
| |
loop.subprocess_exec (GH-13586)
https://bugs.python.org/issue36686
|
|
|
|
|
|
|
|
| |
(GH-11553)
This slightly expands an existing test case `test_popen_error` to trigger a `ResourceWarning` and fixes it.
https://bugs.python.org/issue35721
|
| |
|
| |
|
|
|
|
| |
tests (GH-7328)
|
|
|
|
|
| |
This reverts commit ad74d50517c069359578014bb32e660828d68332.
Turns out it's not a good fix -- Travis has just crashed on this test.
|
| |
|