aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_asyncio/test_subprocess.py
Commit message (Collapse)AuthorAge
* gh-87744: fix waitpid race while calling send_signal in asyncio (#121126)Kumar Aditya2024-07-01
| | | 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.
* GH-120804: Remove `PidfdChildWatcher`, `ThreadedChildWatcher` and ↵Kumar Aditya2024-06-23
| | | | `AbstractChildWatcher` from asyncio APIs (#120893)
* GH-120804: Remove `get_child_watcher` and `set_child_watcher` from asyncio ↵Kumar Aditya2024-06-23
| | | | (#120818)
* GH-120804: Remove SafeChildWatcher, FastChildWatcher and ↵Kumar Aditya2024-06-21
| | | | | 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.
* gh-71052: Change Android's `sys.platform` from "linux" to "android"Malcolm Smith2024-03-11
| | | | Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-71052: Add test exclusions to support running the test suite on Android ↵Malcolm Smith2024-02-29
| | | | (#115918)
* gh-114099: Add test exclusions to support running the test suite on iOS ↵Russell Keith-Magee2024-02-05
| | | | | | | | | | | | | (#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-114272: Fix or skip tests that fail due to spaces in paths (GH-114451)Steve Dower2024-01-25
|
* gh-109862: Fix test_create_subprocess_with_pidfd when it was run separately ↵Serhiy Storchaka2024-01-15
| | | | (GH-113991)
* Add support.MS_WINDOWS constant (#110446)Victor Stinner2023-10-06
|
* gh-109709: Fix asyncio test_stdin_broken_pipe() (#109710)Victor Stinner2023-09-22
| | | | | | 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().
* gh-108973: Fix asyncio test_subprocess_consistent_callbacks() (#109431)Victor Stinner2023-09-20
| | | | | | | | | | | | | 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>
* gh-83925: Make asyncio.subprocess communicate similar to non-asyncio (#18650)Marek Marczykowski-Górecki2023-04-27
| | | | | | | 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.
* gh-102515: Remove unused imports in the `Lib/` directory (#102516)Alex Waygood2023-03-08
|
* GH-100192: fix `asyncio` subprocess tests to pass env vars to subprocess ↵Kumar Aditya2022-12-28
| | | | (#100569)
* GH-100192: add more `asyncio` subprocess tests (#100194)Kumar Aditya2022-12-28
|
* GH-100133: fix `asyncio` subprocess losing `stderr` and `stdout` output ↵Kumar Aditya2022-12-21
| | | | (#100154)
* GH-98219: reduce sleep time in `asyncio` subprocess test (#99464)Kumar Aditya2022-11-14
|
* GH-98407: fix `test_kill_issue43884` to not leak child processes (#98491)Kumar Aditya2022-10-24
|
* GH-98327: Reduce scope of catch_warnings() in _make_subprocess_transport ↵Kumar Aditya2022-10-17
| | | | | (#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.
* GH-94597: Deprecate child watcher getters and setters (#98215)Kumar Aditya2022-10-15
| | | | | | | 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.
* bpo-46364: Use sockets for stdin of asyncio only on AIX (#30596)Christoph Hamsen2022-10-13
| | | | Signed-off-by: Christoph Hamsen <hamsen.christoph@posteo.de> Co-authored-by: July Tikhonov <july.tikh@gmail.com>
* GH-94597: deprecate `SafeChildWatcher`, `FastChildWatcher` and ↵Kumar Aditya2022-10-08
| | | | `MultiLoopChildWatcher` child watchers (#98089)
* GH-94182: Run the PidfdChildWatcher on the running loop (#94184)Thomas Grainger2022-10-07
| | | | | | | | 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>
* gh-88050: Fix asyncio subprocess to kill process cleanly when process is ↵Kumar Aditya2022-10-05
| | | | blocked (#32073)
* gh-95010: Fix asyncio ↵Thomas Grainger2022-07-21
| | | | | | 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.
* gh-72889: Remove redundant mock.Mock()._is_coroutine = False workarounds ↵Thomas Grainger2022-07-17
| | | | (#94926)
* gh-82616: Add process_group support to subprocess.Popen (#23930)Gregory P. Smith2022-05-05
| | | | | | | | 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 (GH-28775)Christian Clauss2021-10-06
| | | | | Fix typos in the Lib directory as identified by codespell. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-38323: Skip SubprocessMultiLoopWatcherTest as they can hang the test ↵Pablo Galindo2021-06-05
| | | | suite (GH-26542)
* bpo-42392: Remove loop parameter from asyncio.tasks and asyncio.subprocess ↵Yurii Karabas2020-11-28
| | | | (GH-23521)
* bpo-40275: Use new test.support helper submodules in tests (GH-20824)Hai Shi2020-06-25
|
* Suppress the hang (#18457)Andrew Svetlov2020-02-27
|
* closes bpo-38692: Add a pidfd child process watcher to asyncio. (GH-17069)Benjamin Peterson2019-11-13
|
* bpo-38614: Increase asyncio test_communicate() timeout (GH-16995)Victor Stinner2019-10-30
| | | | Fix test_communicate() of test_asyncio.test_subprocess: use support.LONG_TIMEOUT (5 minutes), instead of 1 minute.
* bpo-38242: Revert "bpo-36889: Merge asyncio streams (GH-13251)" (#16482)Yury Selivanov2019-09-29
| | | See https://bugs.python.org/issue38242 for more details
* bpo-36373: Deprecate explicit loop in task and subprocess API (GH-16033)Andrew Svetlov2019-09-12
|
* bpo-38107: Replace direct future and task contructor calls with factories in ↵Andrew Svetlov2019-09-11
| | | | asyncio tests (GH-15928)
* bpo-35621: Support running subprocesses in asyncio when loop is executed in ↵Andrew Svetlov2019-06-30
| | | | non-main thread (GH-14344)
* Get rid of exception traceback printing in asyncio tests (GH-14343)Andrew Svetlov2019-06-24
|
* Revert "bpo-35621: Support running subprocesses in asyncio when loop is ↵Andrew Svetlov2019-06-03
| | | | | executed in non-main thread (#13630)" (GH-13793) https://bugs.python.org/issue35621
* bpo-35621: Support running subprocesses in asyncio when loop is executed in ↵Andrew Svetlov2019-06-02
| | | | non-main thread (#13630)
* bpo-35246: fix support for path-like args in asyncio subprocess (GH-13628)依云2019-05-28
| | | | | | | | | Drop isinstance checks from create_subprocess_exec function and let subprocess module do them. https://bugs.python.org/issue35246 https://bugs.python.org/issue35246
* bpo-36686: Improve the documentation of the std* params in ↵sbstp2019-05-27
| | | | | loop.subprocess_exec (GH-13586) https://bugs.python.org/issue36686
* bpo-35721: Close socket pair if Popen in _UnixSubprocessTransport fails ↵Niklas Fiekas2019-05-20
| | | | | | | | (GH-11553) This slightly expands an existing test case `test_popen_error` to trigger a `ResourceWarning` and fixes it. https://bugs.python.org/issue35721
* Forbid creating of stream objects outside of asyncio (#13101)Andrew Svetlov2019-05-06
|
* bpo-34728: Fix asyncio tests to run under "-Werror" (GH-9661)Yury Selivanov2018-10-02
|
* bpo-33562: Check the global asyncio event loop policy isn't set after any ↵Brett Cannon2018-06-01
| | | | tests (GH-7328)
* Revert "A better fix for asyncio test_stdin_broken_pipe (GH-7221)" (GH-7235)Yury Selivanov2018-05-29
| | | | | This reverts commit ad74d50517c069359578014bb32e660828d68332. Turns out it's not a good fix -- Travis has just crashed on this test.
* A better fix for asyncio test_stdin_broken_pipe (#7221)Yury Selivanov2018-05-29
|