aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/asyncio/selector_events.py
Commit message (Collapse)AuthorAge
* gh-90871: fix connection backlog offset in asyncio (gh-134392)Christian Harries2025-05-21
| | | | Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-115514: Fix incomplete writes after close while using ssl in asyncio(#128037)Vojtěch Boček2025-02-02
| | | Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-127529: Correct asyncio's `accept_connection` behaviour for handling ↵jb21702025-01-03
| | | | | `ConnectionAbortedError` (#127532) Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-127655: Ensure `_SelectorSocketTransport.writelines` pauses the protocol ↵J. Nick Koston2024-12-06
| | | | | | | if needed (#127656) Ensure `_SelectorSocketTransport.writelines` pauses the protocol if it reaches the high water mark as needed. Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-113538: Add asycio.Server.{close,abort}_clients (redo) (#116784)Pierre Ossman (ThinLinc team)2024-03-18
| | | | | | | These give applications the option of more forcefully terminating client connections for asyncio servers. Useful when terminating a service and there is limited time to wait for clients to finish up their work. This is a do-over with a test fix for gh-114432, which was reverted.
* gh-113538: Revert "gh-113538: Add asycio.Server.{close,abort}_clients ↵Guido van Rossum2024-03-12
| | | | | | | | | | (#114432)" (#116632) Revert "gh-113538: Add asycio.Server.{close,abort}_clients (#114432)" Reason: The new test doesn't always pass: https://github.com/python/cpython/pull/116423#issuecomment-1989425489 This reverts commit 1d0d49a7e86257ff95b4de0685e6997d7533993c.
* gh-113538: Add asycio.Server.{close,abort}_clients (#114432)Pierre Ossman (ThinLinc team)2024-03-11
| | | | | | These give applications the option of more forcefully terminating client connections for asyncio servers. Useful when terminating a service and there is limited time to wait for clients to finish up their work.
* gh-113812: Allow DatagramTransport.sendto to send empty data (#115199)Jamie Phan2024-02-16
| | | | Also include the UDP packet header sizes (8 bytes per packet) in the buffer size reported to the flow control subsystem.
* gh-109534: fix reference leak when SSL handshake fails (#114074)Jamie Phan2024-01-31
|
* gh-112989: asyncio: Reduce overhead to connect sockets with ↵J. Nick Koston2023-12-12
| | | | | | SelectorEventLoop (#112991) _ensure_fd_no_transport had a KeyError in the success path
* gh-106527: asyncio: optimize to add/remove readers and writers (#106528)J. Nick Koston2023-07-22
|
* gh-106503: asyncio._SelectorSocketTransport: fix cyclic reference on ↵Andrew Geng2023-07-07
| | | | close(). (#106504)
* gh-103607: Fix `pause_reading` to work when called from `connection_made` in ↵Itayazolay2023-04-27
| | | | | `asyncio`. (#17425) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* gh-103462: Ensure SelectorSocketTransport.writelines registers a writer when ↵Ali-Akber Saifee2023-04-13
| | | | data is still pending (#103463)
* GH-91166: Implement zero copy writes for `SelectorSocketTransport` in ↵Kumar Aditya2022-12-24
| | | | | asyncio (#31871) Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
* gh-100348: Fix ref cycle in `asyncio._SelectorSocketTransport` with ↵Richard Kojedzinszky2022-12-20
| | | | `_read_ready_cb` (#100349)
* gh-88863: Clear ref cycles to resolve leak when asyncio.open_connection ↵Dong Uk, Kang2022-11-22
| | | | | | | raises (#95739) Break reference cycles to resolve memory leak, by removing local exception and future instances from the frame
* GH-90352: fix _SelectorDatagramTransport to inherit from DatagramTransport ↵Kumar Aditya2022-10-29
| | | | (#98844)
* GH-88968: Reject socket that is already used as a transport (#98010)Guido van Rossum2022-10-07
|
* gh-91487: Optimize asyncio UDP speed (GH-91488)msoxzw2022-04-15
| | | | | | | 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-27929: resolve names only for AF_INET/AF_INET6 with asyncio (GH-32131)Vincent Bernat2022-03-29
| | | Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* Drop accidentally added whitespaces in asyncio internals (GH-31900)Andrew Svetlov2022-03-15
|
* bpo-46805: Add low level UDP socket functions to asyncio (GH-31455)Alex Grönholm2022-03-13
|
* bpo-46827: pass sock.type to getaddrinfo in sock_connect (GH-31499)Thomas Grainger2022-02-22
| | | | | Co-authored-by: Thomas Grainger <tagrain@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* Raise TypeError if SSLSocket is passed to asyncio transport-based methods ↵Andrew Svetlov2022-02-20
| | | | (GH-31442)
* bpo-44011: New asyncio ssl implementation (#31275)Kumar Aditya2022-02-15
| | | | | | | | | | | * 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>
* bpo-44011: Revert "New asyncio ssl implementation (GH-17975)" (GH-25848)Pablo Galindo2021-05-03
| | | | This reverts commit 5fb06edbbb769561e245d0fe13002bab50e2ae60 and all subsequent dependent commits.
* bpo-44011: New asyncio ssl implementation (#17975)Andrew Svetlov2021-05-03
|
* bpo-39651: Fix asyncio proactor _write_to_self() (GH-22197)Victor Stinner2020-09-12
| | | | | Fix a race condition in the call_soon_threadsafe() method of asyncio.ProactorEventLoop: do nothing if the self-pipe socket has been closed.
* bpo-41317: Remove reader on cancellation in asyncio.loop.sock_accept() (#21595)Alex Grönholm2020-07-23
|
* bpo-30064: Fix asyncio loop.sock_* race condition issue (#20369)Fantix King2020-05-27
|
* bpo-39006: Fix asyncio when the ssl module is missing (GH-17524)Victor Stinner2019-12-09
| | | | Fix asyncio when the ssl module is missing: only check for ssl.SSLSocket instance if the ssl module is available.
* bpo-37404: Raising value error if an SSLSocket is passed to asyncio ↵idomic2019-12-07
| | | | | functions (GH-16457) https://bugs.python.org/issue37404
* bpo-37027: Return a proxy socket object from transp.get_extra_info('socket') ↵Yury Selivanov2019-05-27
| | | | | | | | | | (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-27
| | | https://bugs.python.org/issue37035
* bpo-32528: Make asyncio.CancelledError a BaseException. (GH-13528)Yury Selivanov2019-05-27
| | | | | | | | | | | | | | | 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-35589: Prevent buffer copy in sock_sendall() (GH-11418)Andrew Svetlov2019-05-16
| | | | | | No NEWs is needed since the problem was introduced on master only and never released. https://bugs.python.org/issue35589
* bpo-31922: Do not connect UDP sockets when broadcast is allowed (GH-423)Vincent Michel2019-05-07
| | | | | | | | | | | | *Moved from python/asyncio#493.* This PR fixes issue python/asyncio#480, as explained in [this comment](https://github.com/python/asyncio/issues/480#issuecomment-278703828). The `_SelectorDatagramTransport.sendto` method has to be modified ~~so `_sock.sendto` is used in all cases (because it is tricky to reliably tell if the socket is connected or not). Could that be an issue for connected sockets?~~ *EDIT* ... so `_sock.send` is used only if `_sock` is connected. It also protects `socket.getsockname` against `OSError` in `_SelectorTransport`. This might happen on Windows if the socket is not connected (e.g. for UDP broadcasting). https://bugs.python.org/issue31922
* asyncio: __del__() keep reference to warnings.warn (GH-11491)Victor Stinner2019-01-10
| | | | | | | | | | | | | | | * 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-35380: Enable TCP_NODELAY for proactor event loop (#10867)Andrew Svetlov2018-12-03
|
* bpo-30064: Refactor sock_* asyncio API (#10419)Andrew Svetlov2018-11-12
|
* bpo-33654: Support BufferedProtocol in set_protocol() and start_tls() (GH-7130)Yury Selivanov2018-05-28
| | | | | | | | | | | 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-31647: Fix write_eof() after close() for SelectorSocketTransport (GH-7149)twisteroid ambassador2018-05-28
| | | | | Fixed bug where calling write_eof() on a _SelectorSocketTransport after it's already closed raises AttributeError.
* bpo-33263: Fix FD leak in _SelectorSocketTransport (GH-6450)Vlad Starostin2018-05-21
| | | | | | | | | * bpo-33263 Fix FD leak in _SelectorSocketTransport. (GH-6450) Under particular circumstances _SelectorSocketTransport can try to add a reader even the transport is already being closed. This can lead to FD leak and invalid stated of the following connections. Fixed the SelectorSocketTransport to add the reader only if the trasport is still active.
* bpo-32251: Implement asyncio.BufferedProtocol. (#4755)Yury Selivanov2018-01-28
|
* bpo-32622: Implement loop.sendfile() (#5271)Andrew Svetlov2018-01-27
|
* bpo-32436: Implement PEP 567 (#5027)Yury Selivanov2018-01-22
|
* bpo-23749: Implement loop.start_tls() (#5039)Yury Selivanov2017-12-30
|
* bpo-29970: Add timeout for SSL handshake in asyncioNeil Aspinall2017-12-19
| | | | 10 seconds by default.
* bpo-27456: Simplify sock type checks (#4922)Yury Selivanov2017-12-19
| | | | Recent sock.type fix (see bug 32331) makes sock.type checks simpler in asyncio.