summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/proactor_events.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-99941: Ensure that asyncio.Protocol.data_received receives immutable ↵DarioDaF2022-12-101-1/+2
| | | | bytes (#100053)
* gh-98703: Fix asyncio proactor_events calling _call_connection_lost multiple ↵Ken Jin2022-10-271-0/+2
| | | | | times (GH-98704) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* GH-89237: fix hang in proactor `subprocess.wait_closed()` (#98572)Kumar Aditya2022-10-241-1/+3
|
* Revert "gh-87079: Warn on unintended signal wakeup fd override in `asyncio` ↵Guido van Rossum2022-09-171-12/+2
| | | | | | | (#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-2/+12
| | | 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-92841: Fix asyncio's RuntimeError: Event loop is closed (GH-92842)Oleg Iarygin2022-05-171-1/+1
|
* gh-91487: Optimize asyncio UDP speed (GH-91488)msoxzw2022-04-151-1/+4
| | | | | | | Fix #91487 When transferring a small file, e.g. 256 KiB, the speed of this PR is comparable. However, if a large file, e.g. 65536 KiB, is transferred, asyncio UDP will be over 100 times faster than the original. The speed is presumably significantly faster if a larger file is transferred, e.g. 1048576 KiB. Automerge-Triggered-By: GH:gpshead
* bpo-43253: Don't call shutdown() for invalid socket handles (GH-31892)Maximilian Hils2022-03-151-1/+1
|
* bpo-46805: Add low level UDP socket functions to asyncio (GH-31455)Alex Grönholm2022-03-131-0/+12
|
* Inherit asyncio proactor datagram transport from asyncio.DatagramTransport ↵Andrew Svetlov2022-02-221-1/+2
| | | | (#31512)
* bpo-44011: New asyncio ssl implementation (#31275)Kumar Aditya2022-02-151-4/+8
| | | | | | | | | | | * bpo-44011: New asyncio ssl implementation Co-Authored-By: Andrew Svetlov <andrew.svetlov@gmail.com> * fix warning * fix typo Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* Fix typos in multiple files (GH-26689)Binbin2021-06-131-1/+1
| | | Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-44011: Revert "New asyncio ssl implementation (GH-17975)" (GH-25848)Pablo Galindo2021-05-031-8/+4
| | | | This reverts commit 5fb06edbbb769561e245d0fe13002bab50e2ae60 and all subsequent dependent commits.
* bpo-44011: New asyncio ssl implementation (#17975)Andrew Svetlov2021-05-021-4/+8
|
* bpo-39651: Fix asyncio proactor _write_to_self() (GH-22197)Victor Stinner2020-09-121-1/+10
| | | | | Fix a race condition in the call_soon_threadsafe() method of asyncio.ProactorEventLoop: do nothing if the self-pipe socket has been closed.
* bpo-39010: Fix errors logged on proactor loop restart (#22017)Ben Darnell2020-08-311-0/+8
| | | | | | 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-41273: asyncio's proactor read transport's better performance by using ↵Tony Solomonik2020-07-141-19/+21
| | | | | | | | | | | | | | | recv_into instead of recv (#21442) * bpo-41273: Proactor transport read loop to use recv_into By using recv_into instead of recv we do not allocate a new buffer each time _loop_reading calls recv. This betters performance for any stream using proactor (basically any asyncio stream on windows). * bpo-41273: Double proactor read transport buffer size By doubling the read buffer size we get better performance.
* Remove binding of captured exceptions when not used to reduce the chances of ↵Pablo Galindo2019-11-191-1/+1
| | | | | | | creating cycles (GH-17246) Capturing exceptions into names can lead to reference cycles though the __traceback__ attribute of the exceptions in some obscure cases that have been reported previously and fixed individually. As these variables are not used anyway, we can remove the binding to reduce the chances of creating reference cycles. See for example GH-13135
* bpo-34679: ProactorEventLoop only uses set_wakeup_fd() in main thread (GH-16901)Victor Stinner2019-10-231-3/+3
| | | | bpo-34679, bpo-38563: asyncio.ProactorEventLoop.close() now only calls signal.set_wakeup_fd() in the main thread.
* bpo-34679: Restore instantiation Windows IOCP event loop from non-main ↵Andrew Svetlov2019-08-261-1/+4
| | | | | | | | thread (#15492) * Restore running proactor event loop from non-main thread Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
* bpo-29883: Asyncio proactor udp (GH-13440)Andrew Svetlov2019-05-281-16/+153
| | | | | | Follow-up for #1067 https://bugs.python.org/issue29883
* bpo-37027: Return a proxy socket object from transp.get_extra_info('socket') ↵Yury Selivanov2019-05-271-2/+3
| | | | | | | | | | (GH-13530) Return a safe to use proxy socket object from `transport.get_extra_info('socket')` https://bugs.python.org/issue37027
* bpo-37035: Don't log OSError (GH-13548)Andrew Svetlov2019-05-271-1/+1
| | | https://bugs.python.org/issue37035
* bpo-32528: Make asyncio.CancelledError a BaseException. (GH-13528)Yury Selivanov2019-05-271-3/+9
| | | | | | | | | | | | | | | 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-23846: Fix ProactorEventLoop._write_to_self() (GH-11566)Victor Stinner2019-01-151-1/+7
| | | | | | asyncio.ProactorEventLoop now catchs and logs send errors when the self-pipe is full: BaseProactorEventLoop._write_to_self() now catchs and logs OSError exceptions, as done by BaseSelectorEventLoop._write_to_self().
* asyncio: __del__() keep reference to warnings.warn (GH-11491)Victor Stinner2019-01-101-3/+2
| | | | | | | | | | | | | | | * asyncio: __del__() keep reference to warnings.warn The __del__() methods of asyncio classes now keep a strong reference to the warnings.warn() to be able to display the ResourceWarning warning in more cases. Ensure that the function remains available if instances are destroyed late during Python shutdown (while module symbols are cleared). * Rename warn parameter to _warn "_warn" name is a hint that it's not the regular warnings.warn() function.
* bpo-35682: Fix _ProactorBasePipeTransport._force_close() (GH-11462)Victor Stinner2019-01-081-1/+1
| | | | | | | bpo-32622, bpo-35682: Fix asyncio.ProactorEventLoop.sendfile(): don't attempt to set the result of an internal future if it's already done. Fix asyncio _ProactorBasePipeTransport._force_close(): don't set the result of _empty_waiter if it's already done.
* bpo-23057: add loop self socket as wakeup fd for signals (#11135)Vladimir Matveev2018-12-181-1/+4
|
* bpo-35380: Enable TCP_NODELAY for proactor event loop (#10867)Andrew Svetlov2018-12-031-1/+5
|
* bpo-34622: Extract asyncio exceptions into a separate module (GH-9141)Andrew Svetlov2018-09-111-5/+6
|
* bpo-33833: Fix ProactorSocketTransport AssertionError (#7893)twisteroid ambassador2018-07-301-0/+4
|
* bpo-33694: Fix typo in helper function name (GH-7522)Victor Stinner2018-06-081-1/+1
| | | | | | _feed_data_to_bufferred_proto() renamed to _feed_data_to_buffered_proto() ("bufferred" => "buffered"). Typo spotted by Nathaniel J. Smith.
* bpo-33694: Fix race condition in asyncio proactor (GH-7498)Victor Stinner2018-06-071-125/+53
| | | | | | | | | | | | | | | | The cancellation of an overlapped WSARecv() has a race condition which causes data loss because of the current implementation of proactor in asyncio. No longer cancel overlapped WSARecv() in _ProactorReadPipeTransport to work around the race condition. Remove the optimized recv_into() implementation to get simple implementation of pause_reading() using the single _pending_data attribute. Move _feed_data_to_bufferred_proto() to protocols.py. Remove set_protocol() method which became useless.
* bpo-33654: Support BufferedProtocol in set_protocol() and start_tls() (GH-7130)Yury Selivanov2018-05-281-11/+41
| | | | | | | | | | | In this commit: * Support BufferedProtocol in set_protocol() and start_tls() * Fix proactor to cancel readers reliably * Update tests to be compatible with OpenSSL 1.1.1 * Clarify BufferedProtocol docs * Bump TLS tests timeouts to 60 seconds; eliminate possible race from start_serving * Rewrite test_start_tls_server_1
* bpo-26819: Prevent proactor double read on resume (#6921)CtrlZvi2018-05-201-1/+7
| | | | | | | | | | The proactor event loop has a race condition when reading with pausing/resuming. `resume_reading()` unconditionally schedules the read function to read from the current future. If `resume_reading()` was called before the previously scheduled done callback fires, this results in two attempts to get the data from the most recent read and an assertion failure. This commit tracks whether or not `resume_reading` needs to reschedule the callback to restart the loop, preventing a second attempt to read the data.
* bpo-32622: Native sendfile on windows (#5565)Andrew Svetlov2018-02-251-1/+69
| | | * Support sendfile on Windows Proactor event loop naively.
* bpo-32251: Implement asyncio.BufferedProtocol. (#4755)Yury Selivanov2018-01-281-20/+117
|
* bpo-32622: Implement loop.sendfile() (#5271)Andrew Svetlov2018-01-271-1/+8
|
* bpo-23749: Implement loop.start_tls() (#5039)Yury Selivanov2017-12-301-0/+2
|
* bpo-29970: Make ssh_handshake_timeout None by default (#4939)Andrew Svetlov2017-12-201-2/+2
| | | | | * 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-29970: Add timeout for SSL handshake in asyncioNeil Aspinall2017-12-191-7/+13
| | | | 10 seconds by default.
* bpo-29711: Fix stop_serving in proactor loop kill all listening servers (#431)Julien Duponchelle2017-12-191-1/+3
|
* bpo-32356: idempotent pause_/resume_reading; new is_reading method. (#4914)Yury Selivanov2017-12-181-8/+7
|
* bpo-32327: Convert asyncio functions documented as coroutines to coroutines. ↵Yury Selivanov2017-12-151-10/+10
| | | | (#4872)
* bpo-32262: Fix codestyle; use f-strings formatting where necessary. (#4775)Yury Selivanov2017-12-101-13/+14
|
* asyncio: use directly socket.socketpair() (#4597)Victor Stinner2017-11-281-4/+1
| | | | | 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-32069: Drop legacy SSL transport (#4451)Andrew Svetlov2017-11-181-5/+0
| | | | | | | | | | * Drop legacy SSL transport * Drop unused import * Fix Windows tests * Drop never executed on Python 3.4+ code
* bpo-31819: Add AbstractEventLoop.sock_recv_into() (#4051)Antoine Pitrou2017-10-191-0/+3
| | | | | | | | * bpo-31819: Add AbstractEventLoop.sock_recv_into() * Add NEWS * Add doc
* Fix TypeError is asyncio/proactor_events (#993)Jim Fasarakis-Hilliard2017-06-101-2/+3
|
* bpo-29617: Remove Python 3.3 support from asyncio (GH-232)INADA Naoki2017-04-251-10/+5
|