summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/windows_events.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-127949: deprecate asyncio policy classes (#128216)Kumar Aditya2024-12-241-5/+5
|
* gh-91227: Ignore ERROR_PORT_UNREACHABLE in proactor recvfrom() (#32011)Erik Soma2024-03-231-12/+17
|
* gh-116773: Ensure overlapped objects on Windows are not deallocated too ↵jkriegshauser2024-03-201-7/+7
| | | | early by asyncio (GH-116774)
* gh-110771: Decompose run_forever() into parts (#110773)Russell Keith-Magee2023-10-131-18/+19
| | | Effectively introduce an unstable, private (really: protected) API for subclasses that want to override `run_forever()`.
* gh-94597: Add asyncio.EventLoop (#110723)Thomas Grainger2023-10-121-1/+2
| | | This is needed to pave the way for deprecating and eventually killing the event loop policy system (which is over-engineered and rarely used).
* GH-100573: Fix server hang caused by os.stat() on named pipe (Windows) (#100959)Guido van Rossum2023-01-131-0/+5
|
* gh-88863: Clear ref cycles to resolve leak when asyncio.open_connection ↵Dong Uk, Kang2022-11-221-1/+7
| | | | | | | raises (#95739) Break reference cycles to resolve memory leak, by removing local exception and future instances from the frame
* Bpo-41246: IOCP Proactor avoid callback code duplication (#21399)Tony Solomonik2022-10-131-65/+17
| | | Use the same callback function for overlapped operations recv, recv_into, recvfrom, sendto, send, and sendfile inside IocpProactor.
* bpo-46805: Add low level UDP socket functions to asyncio (GH-31455)Alex Grönholm2022-03-131-0/+20
|
* bpo-46310: simplify `for` loop in `asyncio/windows_events` (GH-30334)Nikita Sobolev2022-01-111-1/+1
|
* bpo-46239: improve error message when importing `asyncio.windows_events` ↵Nikita Sobolev2022-01-041-0/+5
| | | | (GH-30353)
* bpo-46238: reuse `_winapi` constants in `asyncio.windows_events` (GH-30352)Nikita Sobolev2022-01-041-3/+3
|
* bpo-39010: Fix errors logged on proactor loop restart (#22017)Ben Darnell2020-08-311-2/+6
| | | | | | Stopping and restarting a proactor event loop on windows can lead to spurious errors logged (ConnectionResetError while reading from the self pipe). This fixes the issue by ensuring that we don't attempt to start multiple copies of the self-pipe reading loop.
* bpo-41467: Fix asyncio recv_into() on Windows (GH-21720)Victor Stinner2020-08-041-1/+1
| | | | | On Windows, fix asyncio recv_into() return value when the socket/pipe is closed (BrokenPipeError): return 0 rather than an empty byte string (b'').
* bpo-31033: Add a msg argument to Future.cancel() and Task.cancel() (GH-19979)Chris Jerdonek2020-05-151-4/+4
|
* bpo-29883: Asyncio proactor udp (GH-13440)Andrew Svetlov2019-05-281-0/+46
| | | | | | Follow-up for #1067 https://bugs.python.org/issue29883
* bpo-36889: Merge asyncio streams (GH-13251)Andrew Svetlov2019-05-271-1/+1
| | | https://bugs.python.org/issue36889
* bpo-32528: Make asyncio.CancelledError a BaseException. (GH-13528)Yury Selivanov2019-05-271-1/+3
| | | | | | | | | | | | | | | This will address the common mistake many asyncio users make: an "except Exception" clause breaking Tasks cancellation. In addition to this change, we stop inheriting asyncio.TimeoutError and asyncio.InvalidStateError from their concurrent.futures.* counterparts. There's no point for these exceptions to share the inheritance chain. In 3.9 we'll focus on implementing supervisors and cancel scopes, which should allow better handling of all exceptions, including SystemExit and KeyboardInterrupt
* bpo-11555: Enhance IocpProactor.close() log again (GH-11563)Victor Stinner2019-01-151-3/+2
| | | | Add repr(self) to the log to display the number of pending overlapped in the log.
* bpo-34323: Enhance IocpProactor.close() log (GH-11555)Victor Stinner2019-01-151-3/+15
| | | | | IocpProactor.close() now uses time to decide when to log: wait 1 second before the first log, then log every second. Log also the number of seconds since close() was called.
* IocpProactor: prevent modification if closed (GH-11494)Victor Stinner2019-01-101-6/+22
| | | | | | * _wait_for_handle(), _register() and _unregister() methods of IocpProactor now raise an exception if closed * Add "closed" to IocpProactor.__repr__() * Simplify IocpProactor.close()
* bpo-23057: Use 'raise' to emulate ctrl-c in proactor tests (#11274)Vladimir Matveev2019-01-051-0/+5
|
* bpo-23057: add loop self socket as wakeup fd for signals (#11135)Vladimir Matveev2018-12-181-0/+10
|
* bpo-34687: Make asynico use ProactorEventLoop by default (GH-9538)Victor Stinner2018-09-251-1/+1
|
* bpo-34622: Extract asyncio exceptions into a separate module (GH-9141)Andrew Svetlov2018-09-111-2/+3
|
* bpo-33792: Add selector and proactor windows policies (GH-7487)Yury Selivanov2018-06-081-3/+8
|
* bpo-32622: Native sendfile on windows (#5565)Andrew Svetlov2018-02-251-0/+22
| | | * Support sendfile on Windows Proactor event loop naively.
* bpo-32622: Implement loop.sendfile() (#5271)Andrew Svetlov2018-01-271-3/+6
|
* Fix couple typos (#4839)Andrew Svetlov2017-12-131-1/+1
|
* bpo-32262: Fix codestyle; use f-strings formatting where necessary. (#4775)Yury Selivanov2017-12-101-9/+10
|
* bpo-32193: Convert asyncio to async/await usage (#4753)Andrew Svetlov2017-12-081-27/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-32154: Remove asyncio.selectors (#4605)Victor Stinner2017-11-281-1/+1
| | | | | | | | | | | | * Remove asyncio.selectors and asyncio._overlapped symbols from the namespace of the asyncio module * Replace "from asyncio import selectors" with "import selectors" * Replace "from asyncio import _overlapped" with "import _overlapped" asyncio.selectors was added to support Python 3.3, which doesn't have selectors in its standard library, and Python 3.4 in the same code base. Same rationale for asyncio._overlapped. Python 3.3 reached its end of life, and asyncio is no more maintained as a third party module on PyPI.
* asyncio: use directly socket.socketpair() (#4597)Victor Stinner2017-11-281-6/+0
| | | | | Since Python 3.5, socket.socketpair() is also available on Windows, and so can be used directly, rather than using asyncio.windows_utils.socketpair().
* bpo-31819: Add AbstractEventLoop.sock_recv_into() (#4051)Antoine Pitrou2017-10-191-0/+22
| | | | | | | | * bpo-31819: Add AbstractEventLoop.sock_recv_into() * Add NEWS * Add doc
* Issue #28448: Fix C implemented asyncio.Future didn't work on WindowsINADA Naoki2016-10-211-2/+7
|
* Issue #27041: asyncio: Add loop.create_future methodYury Selivanov2016-05-161-2/+2
|
* Correct “an” → “a” with “Unicode”, “user”, “UTF”, etcMartin Panter2016-04-151-1/+1
| | | | This affects documentation, code comments, and a debugging messages.
* asyncio: async() function is deprecated in favour of ensure_future().Yury Selivanov2015-05-111-1/+1
|
* Issue #23353, asyncio: Workaround CPython bug #23353Victor Stinner2015-02-021-2/+9
| | | | | Don't use yield/yield-from in an except block of a generator. Store the exception and handle it outside the except block.
* Issue #23347, asyncio: Make BaseSubprocessTransport.wait() privateVictor Stinner2015-01-291-1/+1
|
* asyncio: sync with TulipVictor Stinner2015-01-291-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* asyncio, Tulip issue 204: Fix IocpProactor.recv()Victor Stinner2015-01-261-7/+13
| | | | | | | | | If ReadFile() fails with ERROR_BROKEN_PIPE, the operation is not pending: don't register the overlapped. I don't know if WSARecv() can fail with ERROR_BROKEN_PIPE. Since Overlapped.WSARecv() already handled ERROR_BROKEN_PIPE, let me guess that it has the same behaviour than ReadFile().
* Issue #23095, asyncio: Fix _WaitHandleFuture.cancel()Victor Stinner2015-01-261-20/+17
| | | | | If UnregisterWaitEx() fais with ERROR_IO_PENDING, it doesn't mean that the wait is unregistered yet. We still have to wait until the wait is cancelled.
* Issue #23293, asyncio: Rewrite IocpProactor.connect_pipe() as a coroutineVictor Stinner2015-01-261-21/+18
| | | | | | | Use a coroutine with asyncio.sleep() instead of call_later() to ensure that the schedule call is cancelled. Add also a unit test cancelling connect_pipe().
* asyncio: Fix ProactorEventLoop.start_serving_pipe()Victor Stinner2015-01-261-1/+13
| | | | | If a client connected before the server was closed: drop the client (close the pipe) and exit.
* Issue #23293, asyncio: Cleanup IocpProactor.close()Victor Stinner2015-01-261-6/+1
| | | | | The special case for connect_pipe() is not more needed. connect_pipe() doesn't use overlapped operations anymore.
* asyncio, Tulip issue 204: Fix IocpProactor.accept_pipe()Victor Stinner2015-01-221-24/+17
| | | | | | | | Overlapped.ConnectNamedPipe() now returns a boolean: True if the pipe is connected (if ConnectNamedPipe() failed with ERROR_PIPE_CONNECTED), False if the connection is in progress. This change removes multiple hacks in IocpProactor.
* Issue #23293, asyncio: Rewrite IocpProactor.connect_pipe()Victor Stinner2015-01-221-17/+26
| | | | | | | | Add _overlapped.ConnectPipe() which tries to connect to the pipe for asynchronous I/O (overlapped): call CreateFile() in a loop until it doesn't fail with ERROR_PIPE_BUSY. Use an increasing delay between 1 ms and 100 ms. Remove Overlapped.WaitNamedPipeAndConnect() which is no more used.
* asyncio: IocpProactor.close() doesn't cancel anymore futures which are alreadyVictor Stinner2015-01-221-3/+7
| | | | cancelled
* Issue #23095, asyncio: IocpProactor.close() must not cancel pendingVictor Stinner2015-01-211-0/+6
| | | | _WaitCancelFuture futures