summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_subprocess.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-46364: Use sockets for stdin of asyncio only on AIX (GH-30596)Miss Islington (bot)2022-10-131-0/+20
| | | | | | | Signed-off-by: Christoph Hamsen <hamsen.christoph@posteo.de> Co-authored-by: July Tikhonov <july.tikh@gmail.com> (cherry picked from commit c9ed0327a9c741a1808926b409df29467baf303a) Co-authored-by: Christoph Hamsen <37963496+xopham@users.noreply.github.com>
* [3.10] Fix typos in the Lib directory (GH-28775) (GH-28804)Christian Clauss2021-10-071-1/+1
| | | | | | | | Fix typos in the Lib directory as identified by codespell. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>. (cherry picked from commit 745c9d9dfc1ad6fdfdf1d07420c6273ff67fa5be) Co-authored-by: Christian Clauss <cclauss@me.com>
* bpo-38323: Skip SubprocessMultiLoopWatcherTest as they can hang the test ↵Miss Islington (bot)2021-06-051-0/+2
| | | | | | | | | suite (GH-26542) (GH-26544) (cherry picked from commit f171877ebe276749f31386baed5841ce37cbee2e) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-42392: Remove loop parameter from asyncio.tasks and asyncio.subprocess ↵Yurii Karabas2020-11-281-20/+0
| | | | (GH-23521)
* bpo-40275: Use new test.support helper submodules in tests (GH-20824)Hai Shi2020-06-251-3/+4
|
* Suppress the hang (#18457)Andrew Svetlov2020-02-261-2/+9
|
* closes bpo-38692: Add a pidfd child process watcher to asyncio. (GH-17069)Benjamin Peterson2019-11-141-0/+18
|
* bpo-38614: Increase asyncio test_communicate() timeout (GH-16995)Victor Stinner2019-10-301-1/+1
| | | | 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-301-12/+0
| | | See https://bugs.python.org/issue38242 for more details
* bpo-36373: Deprecate explicit loop in task and subprocess API (GH-16033)Andrew Svetlov2019-09-121-79/+105
|
* bpo-38107: Replace direct future and task contructor calls with factories in ↵Andrew Svetlov2019-09-111-3/+2
| | | | asyncio tests (GH-15928)
* bpo-35621: Support running subprocesses in asyncio when loop is executed in ↵Andrew Svetlov2019-06-301-1/+39
| | | | non-main thread (GH-14344)
* Get rid of exception traceback printing in asyncio tests (GH-14343)Andrew Svetlov2019-06-241-2/+2
|
* Revert "bpo-35621: Support running subprocesses in asyncio when loop is ↵Andrew Svetlov2019-06-041-39/+1
| | | | | 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-021-1/+39
| | | | non-main thread (#13630)
* bpo-35246: fix support for path-like args in asyncio subprocess (GH-13628)依云2019-05-291-0/+11
| | | | | | | | | 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-271-0/+90
| | | | | loop.subprocess_exec (GH-13586) https://bugs.python.org/issue36686
* bpo-35721: Close socket pair if Popen in _UnixSubprocessTransport fails ↵Niklas Fiekas2019-05-201-4/+13
| | | | | | | | (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-071-0/+12
|
* bpo-34728: Fix asyncio tests to run under "-Werror" (GH-9661)Yury Selivanov2018-10-021-4/+4
|
* bpo-33562: Check the global asyncio event loop policy isn't set after any ↵Brett Cannon2018-06-021-0/+5
| | | | tests (GH-7328)
* Revert "A better fix for asyncio test_stdin_broken_pipe (GH-7221)" (GH-7235)Yury Selivanov2018-05-301-4/+2
| | | | | 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-301-2/+4
|
* Attempt to fix test_stdin_broken_pipe on Travis (#7210)Yury Selivanov2018-05-291-0/+1
|
* bpo-32262: Fix typo in f-string (GH-7016)Christian Heimes2018-05-201-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix typo from commit 6370f345e1d5829e1fba59cd695c8b82c5a8c620 Signed-off-by: Christian Heimes <christian@python.org> <!-- Thanks for your contribution! Please read this comment in its entirety. It's quite important. # Pull Request title It should be in the following format: ``` bpo-NNNN: Summary of the changes made ``` Where: bpo-NNNN refers to the issue number in the https://bugs.python.org. Most PRs will require an issue number. Trivial changes, like fixing a typo, do not need an issue. # Backport Pull Request title If this is a backport PR (PR made against branches other than `master`), please ensure that the PR title is in the following format: ``` [X.Y] <title from the original PR> (GH-NNNN) ``` Where: [X.Y] is the branch name, e.g. [3.6]. GH-NNNN refers to the PR number from `master`. --> <!-- issue-number: bpo-32262 --> https://bugs.python.org/issue32262 <!-- /issue-number -->
* bpo-32273: Move asyncio.test_utils to test.test_asyncio (#4785)Yury Selivanov2017-12-111-5/+3
|
* bpo-32193: Convert asyncio to async/await usage (#4753)Andrew Svetlov2017-12-081-59/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Convert asyncio/tasks.py to async/await * Convert asyncio/queues.py to async/await * Convert asyncio/test_utils.py to async/await * Convert asyncio/base_subprocess.py to async/await * Convert asyncio/subprocess.py to async/await * Convert asyncio/streams.py to async/await * Fix comments * Convert asyncio/locks.py to async/await * Convert asyncio.sleep to async def * Add a comment * Add missing news * Convert stubs from AbstrctEventLoop to async functions * Convert subprocess_shell/subprocess_exec * Convert connect_read_pipe/connect_write_pip to async/await syntax * Convert create_datagram_endpoint * Convert create_unix_server/create_unix_connection * Get rid of old style coroutines in unix_events.py * Convert selector_events.py to async/await * Convert wait_closed and create_connection * Drop redundant line * Convert base_events.py * Code cleanup * Drop redundant comments * Fix indentation * Add explicit tests for compatibility between old and new coroutines * Convert windows event loop to use async/await * Fix double awaiting of async function * Convert asyncio/locks.py * Improve docstring * Convert tests to async/await * Convert more tests * Convert more tests * Convert more tests * Convert tests * Improve test
* bpo-31034: Reliable signal handler for test_asyncio (#2867)Victor Stinner2017-07-251-18/+25
| | | | | | | | | * bpo-31034: Reliable signal handler for test_asyncio Don't rely on the current SIGHUP signal handler, make sure that it's set to the "default" signal handler: SIG_DFL. * Add comments
* asyncio: Fix trailing whitespace/code styleYury Selivanov2017-03-031-4/+6
|
* bpo-29704: Fix asyncio.SubprocessStreamProtocol closing (#405)Seth M. Larson2017-03-031-0/+22
|
* Issue #28613: Fix get_event_loop() to return the current loopYury Selivanov2016-11-041-0/+3
| | | | when called from coroutines or callbacks.
* Issue #28368: Refuse monitoring processes if the child watcher has no loop ↵Yury Selivanov2016-10-051-0/+7
| | | | | | attached. Patch by Vincent Michel.
* Issue #27076: Doc, comment and tests spelling fixesMartin Panter2016-05-261-1/+1
| | | | Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
* Issue #26848: Fix asyncio/subprocess.communicate() to handle empty input.Yury Selivanov2016-05-131-0/+19
|
* asyncio, selectors: Update to the upstream versionYury Selivanov2016-03-021-1/+2
|
* Issue #26325: Added test.support.check_no_resource_warning() to check thatSerhiy Storchaka2016-02-111-2/+1
| | | | no ResourceWarning is emitted.
* asyncio: Add Transport.is_closing()Yury Selivanov2015-11-161-1/+1
| | | | See https://github.com/python/asyncio/pull/291 for details.
* Issue #24763: Fix asyncio test on Windows (fix reverted change)Yury Selivanov2015-08-091-1/+5
| | | | See also issue #24835
* asyncio: Sync with upstream (compat module)Yury Selivanov2015-08-041-5/+1
|
* Issue #24763: Fix asyncio test on WindowsVictor Stinner2015-07-311-1/+5
|
* Fix ResourceWarning in asyncio.BaseSubprocessTransportVictor Stinner2015-07-311-0/+15
| | | | | | | Issue #24763: Fix resource warnings when asyncio.BaseSubprocessTransport constructor fails, if subprocess.Popen raises an exception for example. Patch written by Martin Richard, test written by me.
* asyncio: sync with github asyncioVictor Stinner2015-07-091-1/+1
| | | | | * queues: get coroutine from asyncio.coroutines, not from asyncio.tasks * tets: replace tulip with asyncio in comments
* asyncio: Fix warning in test_close_kill_running()Victor Stinner2015-02-171-0/+1
| | | | | Read process exit status to avoid the "Caught subprocess termination from unknown pid" message.
* Issue #23475, asyncio: Fix test_close_kill_running()Victor Stinner2015-02-171-2/+10
| | | | | | Really kill the child process, don't mock completly the Popen.kill() method. This change fix memory leaks and reference leaks.
* asyncio: BaseSubprocessTransport.close() doesn't try to kill the process if itVictor Stinner2015-02-101-0/+55
| | | | already finished
* Issue #23347, asyncio: send_signal(), terminate(), kill() don't check if theVictor Stinner2015-01-301-16/+0
| | | | | | | transport was closed. The check broken a Tulip example and this limitation is arbitrary. Check if _proc is None should be enough. Enhance also close(): do nothing when called the second time.
* asyncio: Fix ResourceWarning in test_subprocess.test_proc_exit()Victor Stinner2015-01-291-0/+2
|
* asyncio: sync with TulipVictor Stinner2015-01-291-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #23347: send_signal(), kill() and terminate() methods of BaseSubprocessTransport now check if the transport was closed and if the process exited. Issue #23347: Refactor creation of subprocess transports. Changes on BaseSubprocessTransport: * Add a wait() method to wait until the child process exit * The constructor now accepts an optional waiter parameter. The _post_init() coroutine must not be called explicitly anymore. It makes subprocess transports closer to other transports, and it gives more freedom if we want later to change completly how subprocess transports are created. * close() now kills the process instead of kindly terminate it: the child process may ignore SIGTERM and continue to run. Call explicitly terminate() and wait() if you want to kindly terminate the child process. * close() now logs a warning in debug mode if the process is still running and needs to be killed * _make_subprocess_transport() is now fully asynchronous again: if the creation of the transport failed, wait asynchronously for the process eixt. Before the wait was synchronous. This change requires close() to *kill*, and not terminate, the child process. * Remove the _kill_wait() method, replaced with a more agressive close() method. It fixes _make_subprocess_transport() on error. BaseSubprocessTransport.close() calls the close() method of pipe transports, whereas _kill_wait() closed directly pipes of the subprocess.Popen object without unregistering file descriptors from the selector (which caused severe bugs). These changes simplifies the code of subprocess.py.
* Issue #22685: Fix test_pause_reading() of asyncio/test_subprocessVictor Stinner2015-01-151-2/+12
| | | | | | | Override the connect_read_pipe() method of the loop to mock immediatly pause_reading() and resume_reading() methods. The test failed randomly on FreeBSD 9 buildbot and on Windows using trollius.
* asyncio: Close transports in testsVictor Stinner2015-01-151-0/+1
| | | | | | | | | * Use test_utils.run_briefly() to execute pending calls to really close transports * sslproto: mock also _SSLPipe.shutdown(), it's need to close the transport * pipe test: the test doesn't close explicitly the PipeHandle, so ignore the warning instead * test_popen: use the context manager ("with p:") to explicitly close pipes