summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_unix_events.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-110335: asyncio test_unix_events cleans multiprocessing (#110336)Victor Stinner2023-10-041-0/+8
| | | | test_unix_events tests using the multiprocessing module now call multiprocessing.util._cleanup_tests().
* gh-109582: test_fork_signal_handling should wait for event (#109605)Davide Rizzo2023-09-211-2/+11
| | | | | | Sometimes the child_handled event was missing because either the child quits before it gets a chance to handle the signal, or the parent asserts before the event notification is delivered via IPC. Synchronize explicitly to avoid this.
* gh-103780: Use patch instead of mock in asyncio unix events test (#103782)Itamar Ostricher2023-04-241-5/+4
|
* gh-102799: remove unnecessary calls to sys.exc_info() in tests (#102800)Irit Katriel2023-03-181-2/+2
|
* gh-100160: Restore and deprecate implicit creation of an event loop (GH-100410)Serhiy Storchaka2023-01-131-2/+6
| | | | | | | | | | Partially revert changes made in GH-93453. asyncio.DefaultEventLoopPolicy.get_event_loop() now emits a DeprecationWarning and creates and sets a new event loop instead of raising a RuntimeError if there is no current event loop set. Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
* gh-93453: No longer create an event loop in get_event_loop() (#98440)Serhiy Storchaka2022-12-061-4/+7
| | | | | | | | | | | | | | | asyncio.get_event_loop() now always return either running event loop or the result of get_event_loop_policy().get_event_loop() call. The latter should now raise an RuntimeError if no current event loop was set instead of creating and setting a new event loop. It affects also a number of asyncio functions and constructors which call get_event_loop() implicitly: ensure_future(), shield(), gather(), etc. DeprecationWarning is no longer emitted if there is no running event loop but the current event loop was set. Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* GH-66285: remove redundant `time.sleep` from `test_fork_signal_handling` ↵Kumar Aditya2022-12-031-1/+0
| | | | (GH-99963)
* GH-66285: fix forking in asyncio (#99769)Kumar Aditya2022-11-271-0/+98
| | | Closes #66285
* GH-66285: Revert "fix forking in asyncio" (#99756)Kumar Aditya2022-11-241-99/+0
|
* GH-66285: skip asyncio fork tests for platforms without md5 hash (#99745)Kumar Aditya2022-11-241-0/+4
| | | Such buildbots (at the time of writing, only "AMD64 RHEL8 FIPS Only Blake2 Builtin Hash 3.x") cannot use multiprocessing with a fork server, so just skip the test there.
* GH-66285: fix forking in `asyncio` (#99539)Kumar Aditya2022-11-241-0/+95
| | | `asyncio` now does not shares event loop and signal wakeupfd in forked processes.
* GH-94597: add deprecation warnings for subclassing `AbstractChildWatcher` ↵Kumar Aditya2022-11-121-1/+8
| | | | (#99386)
* GH-94597: Deprecate child watcher getters and setters (#98215)Kumar Aditya2022-10-151-9/+12
| | | | | | | 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.
* GH-94597: deprecate `SafeChildWatcher`, `FastChildWatcher` and ↵Kumar Aditya2022-10-081-5/+16
| | | | `MultiLoopChildWatcher` child watchers (#98089)
* GH-98023: Change default child watcher to PidfdChildWatcher on supported ↵Kumar Aditya2022-10-081-1/+13
| | | | systems (#98024)
* Revert "gh-87079: Warn on unintended signal wakeup fd override in `asyncio` ↵Guido van Rossum2022-09-171-24/+0
| | | | | | | (#96807)" (#96898) This reverts commit 05878106989c6f5b9dd35a6c15a21bee59312827. Reason: This broke buildbots (some warnings added by that commit are turned to errors in the SSL buildbot). Repro: ./python Lib/test/ssltests.py
* gh-87079: Warn on unintended signal wakeup fd override in `asyncio` (#96807)Michel Hidalgo2022-09-171-0/+24
| | | Warn on loop initialization, when setting the wakeup fd disturbs a previously set wakeup fd, and on loop closing, when upon resetting the wakeup fd, we find it has been changed by someone else.
* gh-95597: Fix typo in Lib directory files (#95599)Jo, Yunjin2022-08-031-1/+1
|
* gh-84623: Remove unused imports (#94132)Victor Stinner2022-06-221-1/+0
|
* gh-93852: Add test.support.create_unix_domain_name() (#93914)Victor Stinner2022-06-171-19/+21
| | | | | | | | | | | | | | | test_asyncio, test_logging, test_socket and test_socketserver now create AF_UNIX domains in the current directory to no longer fail with OSError("AF_UNIX path too long") if the temporary directory (the TMPDIR environment variable) is too long. Modify the following tests to use create_unix_domain_name(): * test_asyncio * test_logging * test_socket * test_socketserver test_asyncio.utils: remove unused time import.
* Fix warning: asyncio.events._event_loop_policy was modified by test_asyncio ↵Andrew Svetlov2022-02-101-4/+4
| | | | (GH-31253)
* bpo-23819: Get rid of assert statements in test_asyncio (GH-30212)Serhiy Storchaka2021-12-201-1/+2
| | | | | | To keep checks even if run tests with optimized Python. Either use special assertion methods like assertEqual() or raise an AssertionError explicitly.
* bpo-40364: asyncio uses os.waitstatus_to_exitcode() (GH-23798)Victor Stinner2020-12-161-196/+65
| | | | | test_unix_events.py no longer checks if waitstatus_to_exitcode() mock has been called or not to make the test more functional, rather than checking the exact implementation.
* bpo-40275: Use new test.support helper submodules in tests (GH-20824)Hai Shi2020-06-251-4/+4
|
* bpo-40275: Avoid importing socket in test.support (GH-19603)Serhiy Storchaka2020-04-251-6/+7
| | | | | | * Move socket related functions from test.support to socket_helper. * Import socket, nntplib and urllib.error lazily in transient_internet(). * Remove importing multiprocess.
* bpo-38019: correctly handle pause/resume reading of closed asyncio unix pipe ↵Andrew Svetlov2019-09-291-0/+27
| | | | (GH-16472)
* bpo-38107: Replace direct future and task contructor calls with factories in ↵Andrew Svetlov2019-09-111-2/+2
| | | | asyncio tests (GH-15928)
* Remove unused imports in tests (GH-14518)Victor Stinner2019-07-011-2/+0
|
* bpo-35621: Support running subprocesses in asyncio when loop is executed in ↵Andrew Svetlov2019-06-301-25/+9
| | | | non-main thread (GH-14344)
* Revert "bpo-35621: Support running subprocesses in asyncio when loop is ↵Andrew Svetlov2019-06-041-9/+25
| | | | | executed in non-main thread (#13630)" (GH-13793) https://bugs.python.org/issue35621
* bpo-35621: Fix tests when SafeChildWatcher is expected instead of ↵Andrew Svetlov2019-06-021-0/+1
| | | | | ThreadedChildWatcher (GH-13754) https://bugs.python.org/issue35621
* bpo-35621: Support running subprocesses in asyncio when loop is executed in ↵Andrew Svetlov2019-06-021-25/+9
| | | | non-main thread (#13630)
* bpo-37035: Don't log OSError (GH-13548)Andrew Svetlov2019-05-271-5/+1
| | | https://bugs.python.org/issue37035
* bpo-35602: Make sure the transport is always closed in ↵Pablo Galindo2018-12-291-5/+5
| | | | | SelectorEventLoopUnixSockSendfileTests (GH-11338) There is a race condition in SelectorEventLoopUnixSockSendfileTests that causes the prepare() method return a non connected server protocol, making the cleanup() method skips the correct handling of the transport. This commit makes prepare() always return a connected server protocol that can always be cleaned up correctly.
* bpo-34622: Extract asyncio exceptions into a separate module (GH-9141)Andrew Svetlov2018-09-111-6/+6
|
* bpo-33562: Check the global asyncio event loop policy isn't set after any ↵Brett Cannon2018-06-021-0/+4
| | | | tests (GH-7328)
* Revert "bpo-22087: Fix Policy.get_event_loop() to detect fork (GH-7208)" (#7232)Yury Selivanov2018-05-301-32/+0
| | | This reverts commit 5d97b7bcc19496617bf8c448d2f149cc28c73bc7.
* bpo-22087: Fix Policy.get_event_loop() to detect fork (GH-7208)Yury Selivanov2018-05-291-0/+32
| | | | Original patch by Dan O'Reilly.
* bpo-33332: Add signal.valid_signals() (GH-6581)Antoine Pitrou2018-05-041-0/+12
|
* bpo-32622: Native sendfile on windows (#5565)Andrew Svetlov2018-02-251-55/+9
| | | * Support sendfile on Windows Proactor event loop naively.
* bpo-32410: Improve sock_sendfile tests (#5294)Andrew Svetlov2018-01-241-16/+19
| | | | | * Rename sock_sendfile test methods * Make sock_sendfile tests more stable
* bpo-32410: Make SendfileNotAvailableError exception public (#5243)Andrew Svetlov2018-01-191-6/+7
|
* bpo-32410: Implement loop.sock_sendfile() (#4976)Andrew Svetlov2018-01-161-0/+251
|
* bpo-26133: Fix typos (#5010)Andrew Svetlov2017-12-261-0/+17
| | | | | | * Fix typos * Change warning text * Add test
* bpo-29970: Make ssh_handshake_timeout None by default (#4939)Andrew Svetlov2017-12-201-0/+17
| | | | | * Make ssh_handshake_timeout None by default. * Raise ValueError if ssl_handshake_timeout is used without ssl. * Raise ValueError if ssl_handshake_timeout is not positive.
* bpo-32273: Move asyncio.test_utils to test.test_asyncio (#4785)Yury Selivanov2017-12-111-1/+1
|
* bpo-32193: Convert asyncio to async/await usage (#4753)Andrew Svetlov2017-12-081-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-32166: Drop Python 3.4 code from asyncio (#4612)Andrew Svetlov2017-11-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | * Drop Python 3.4 code from asyncio * Fix notes * Add missing imports * Restore comment * Resort imports * Drop Python 3.4-3.5 specific code * Drop redunant check * Fix tests * Restore _COROUTINE_TYPES order * Remove useless code
* bpo-28684: asyncio tests handle PermissionError raised on binding unix ↵xdegaye2017-11-241-0/+4
| | | | | | | | | sockets (GH-4503) The test.support.skip_unless_bind_unix_socket() decorator is used to skip asyncio tests that fail because the platform lacks a functional bind() function for unix domain sockets (as it is the case for non root users on the recent Android versions that run now SELinux in enforcing mode).
* bpo-32066: Support pathlib.Path in create_unix_connection; sock arg should ↵Yury Selivanov2017-11-201-2/+10
| | | | be optional (#4447)