summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_unix_events.py
Commit message (Collapse)AuthorAgeFilesLines
* 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)
* bpo-28369: Enhance transport socket check in add_reader/writer (#4365)Yury Selivanov2017-11-131-0/+70
|
* Remove unused imports.Serhiy Storchaka2016-12-161-1/+0
|
* Issue #28704: Fix create_unix_server to support Path-like objectsYury Selivanov2016-11-151-0/+10
|
* Issue #28652: Make loop methods reject socket kinds they do not support.Yury Selivanov2016-11-091-0/+27
|
* Issue #28613: Fix get_event_loop() to return the current loopYury Selivanov2016-11-041-0/+5
| | | | when called from coroutines or callbacks.
* Issue #28399: Remove UNIX socket from FS before binding.Yury Selivanov2016-10-091-5/+7
| | | | Patch by Коренберг Марк.
* asyncio: Only allow Unix Stream sockets for loop.create_unix_server/connectionYury Selivanov2016-10-071-1/+10
|
* Issue #28368: Refuse monitoring processes if the child watcher has no loop ↵Yury Selivanov2016-10-051-1/+13
| | | | | | attached. Patch by Vincent Michel.
* Issue #26909: Fix slow pipes IO in asyncio.Yury Selivanov2016-09-151-27/+22
| | | | Patch by INADA Naoki.
* asyncio: Add Transport.is_closing()Yury Selivanov2015-11-161-6/+6
| | | | See https://github.com/python/asyncio/pull/291 for details.
* Use os.devnull instead of hardcoded '/dev/null'.Serhiy Storchaka2015-02-151-3/+3
|
* asyncio: sync with TulipVictor Stinner2015-01-291-18/+11
| | | | | | | | | * Cleanup gather(): use cancelled() method instead of using private Future attribute * Fix _UnixReadPipeTransport and _UnixWritePipeTransport. Only start reading when connection_made() has been called. * Issue #23333: Fix BaseSelectorEventLoop._accept_connection(). Close the transport on error. In debug mode, log errors using call_exception_handler()
* Issue #23243: Close explicitly transports in asyncio testsVictor Stinner2015-01-151-94/+60
|
* Issue #23243: Fix asyncio._UnixWritePipeTransport.close()Victor Stinner2015-01-151-0/+3
| | | | | Do nothing if the transport is already closed. Before it was not possible to close the transport twice.
* asyncio: sync with TulipVictor Stinner2015-01-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | * PipeHandle now uses None instead of -1 for a closed handle * Sort imports in windows_utils. * Fix test_events on Python older than 3.5. Skip SSL tests on the ProactorEventLoop if ssl.MemoryIO is missing * Fix BaseEventLoop._create_connection_transport(). Close the transport if the creation of the transport (if the waiter) gets an exception. * _ProactorBasePipeTransport now sets _sock to None when the transport is closed. * Fix BaseSubprocessTransport.close(). Ignore pipes for which the protocol is not set yet (still equal to None). * TestLoop.close() now calls the close() method of the parent class (BaseEventLoop). * Cleanup BaseSelectorEventLoop: create the protocol on a separated line for readability and ease debugging. * Fix BaseSubprocessTransport._kill_wait(). Set the _returncode attribute, so close() doesn't try to terminate the process. * Tests: explicitly close event loops and transports * UNIX pipe transports: add closed/closing in repr(). Add "closed" or "closing" state in the __repr__() method of _UnixReadPipeTransport and _UnixWritePipeTransport classes.
* asyncio: sync with TulipVictor Stinner2014-12-261-2/+0
| | | | | * Fix pyflakes warnings: remove unused imports and variables * asyncio.test_support now uses test.support and test.script_helper if available
* asyncio: Coroutine objects are now rejected with a TypeError by the followingVictor Stinner2014-11-201-4/+10
| | | | | | | | | | | | | | functions: * add_signal_handler() * call_at() * call_later() * call_soon() * call_soon_threadsafe() * run_in_executor() Fix also the error message of add_signal_handler() (fix the name of the function).
* - Issue #22841: Reject coroutines in asyncio add_signal_handler().Guido van Rossum2014-11-141-0/+12
| | | | Patch by Ludovic.Gasc.
* asyncio: Use the new os.set_blocking() function of Python 3.5 if availableVictor Stinner2014-07-291-6/+6
|
* asyncio: sync with TulipVictor Stinner2014-07-231-9/+8
| | | | | * Tulip issue 194: Don't use sys.getrefcount() in unit tests * signal.set_wakeup_fd() can now raise an OSError on Python 3.5
* Python issue #21645, Tulip issue 192: Rewrite signal handlingVictor Stinner2014-07-171-2/+2
| | | | | | | | | | | | | | | | | | | Since Python 3.3, the C signal handler writes the signal number into the wakeup file descriptor and then schedules the Python call using Py_AddPendingCall(). asyncio uses the wakeup file descriptor to wake up the event loop, and relies on Py_AddPendingCall() to schedule the final callback with call_soon(). If the C signal handler is called in a thread different than the thread of the event loop, the loop is awaken but Py_AddPendingCall() was not called yet. In this case, the event loop has nothing to do and go to sleep again. Py_AddPendingCall() is called while the event loop is sleeping again and so the final callback is not scheduled immediatly. This patch changes how asyncio handles signals. Instead of relying on Py_AddPendingCall() and the wakeup file descriptor, asyncio now only relies on the wakeup file descriptor. asyncio reads signal numbers from the wakeup file descriptor to call its signal handler.
* asyncio: Enable the debug mode of event loops when the PYTHONASYNCIODEBUGVictor Stinner2014-06-221-8/+0
| | | | environment variable is set
* asyncio: Refactor tests: add a base TestCase classVictor Stinner2014-06-171-23/+17
|
* Issue #21119: asyncio now closes sockets on errorsVictor Stinner2014-06-031-0/+18
| | | | | | Fix ResourceWarning: create_connection(), create_datagram_endpoint() and create_unix_server() methods of event loop now close the newly created socket on error.
* remove superfluous and useless lineBenjamin Peterson2014-04-161-1/+0
|