summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/selector_events.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-44011: Revert "New asyncio ssl implementation (GH-17975)" (GH-25848)Pablo Galindo2021-05-031-20/+11
| | | | This reverts commit 5fb06edbbb769561e245d0fe13002bab50e2ae60 and all subsequent dependent commits.
* bpo-44011: New asyncio ssl implementation (#17975)Andrew Svetlov2021-05-021-11/+20
|
* bpo-39651: Fix asyncio proactor _write_to_self() (GH-22197)Victor Stinner2020-09-121-8/+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-41317: Remove reader on cancellation in asyncio.loop.sock_accept() (#21595)Alex Grönholm2020-07-231-7/+6
|
* bpo-30064: Fix asyncio loop.sock_* race condition issue (#20369)Fantix King2020-05-271-16/+25
|
* bpo-39006: Fix asyncio when the ssl module is missing (GH-17524)Victor Stinner2019-12-091-10/+10
| | | | 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-071-0/+10
| | | | | functions (GH-16457) https://bugs.python.org/issue37404
* 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-20/+56
| | | | | | | | | | | | | | | 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-161-7/+10
| | | | | | 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-071-6/+11
| | | | | | | | | | | | *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-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-35380: Enable TCP_NODELAY for proactor event loop (#10867)Andrew Svetlov2018-12-031-12/+1
|
* bpo-30064: Refactor sock_* asyncio API (#10419)Andrew Svetlov2018-11-121-40/+49
|
* bpo-33654: Support BufferedProtocol in set_protocol() and start_tls() (GH-7130)Yury Selivanov2018-05-281-8/+20
| | | | | | | | | | | 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-281-1/+1
| | | | | 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-211-3/+9
| | | | | | | | | * 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-281-16/+68
|
* bpo-32622: Implement loop.sendfile() (#5271)Andrew Svetlov2018-01-271-0/+39
|
* bpo-32436: Implement PEP 567 (#5027)Yury Selivanov2018-01-231-2/+2
|
* bpo-23749: Implement loop.start_tls() (#5039)Yury Selivanov2017-12-301-0/+2
|
* bpo-29970: Add timeout for SSL handshake in asyncioNeil Aspinall2017-12-191-14/+26
| | | | 10 seconds by default.
* bpo-27456: Simplify sock type checks (#4922)Yury Selivanov2017-12-191-1/+1
| | | | Recent sock.type fix (see bug 32331) makes sock.type checks simpler in asyncio.
* bpo-32356: idempotent pause_/resume_reading; new is_reading method. (#4914)Yury Selivanov2017-12-181-8/+7
|
* bpo-27456: Ensure TCP_NODELAY is set on linux (#4231)Yury Selivanov2017-12-161-1/+1
|
* bpo-32327: Convert asyncio functions documented as coroutines to coroutines. ↵Yury Selivanov2017-12-151-20/+10
| | | | (#4872)
* bpo-32262: Fix codestyle; use f-strings formatting where necessary. (#4775)Yury Selivanov2017-12-101-26/+26
|
* bpo-32193: Convert asyncio to async/await usage (#4753)Andrew Svetlov2017-12-081-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-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-248/+0
| | | | | | | | | | * Drop legacy SSL transport * Drop unused import * Fix Windows tests * Drop never executed on Python 3.4+ code
* bpo-32015: Asyncio looping during simultaneously socket read/write an… (#4386)Andrey Egorov2017-11-141-19/+18
| | | | | | | | | | | | * bpo-32015: Asyncio cycling during simultaneously socket read/write and reconnection * Tests fix * Tests fix * News add * Add new unit tests
* bpo-28369: Enhance transport socket check in add_reader/writer (#4365)Yury Selivanov2017-11-131-1/+9
|
* bpo-31819: Add AbstractEventLoop.sock_recv_into() (#4051)Antoine Pitrou2017-10-191-0/+35
| | | | | | | | * bpo-31819: Add AbstractEventLoop.sock_recv_into() * Add NEWS * Add doc
* bpo-29617: Remove Python 3.3 support from asyncio (GH-232)INADA Naoki2017-04-251-10/+5
|
* Merge 3.5 (issue #28369)Yury Selivanov2016-10-051-48/+79
|\
| * Issue #28369: Raise an error when transport's FD is used with add_readerYury Selivanov2016-10-051-48/+79
| |
* | Merge 3.5 (issue #28176)Yury Selivanov2016-09-151-17/+10
|\ \ | |/
| * Issue #28176: Fix callbacks race in asyncio.SelectorLoop.sock_connect.Yury Selivanov2016-09-151-17/+10
| |
* | Merge 3.5 (issue #27906)Yury Selivanov2016-09-151-33/+40
|\ \ | |/
| * Issue #27906: Fix socket accept exhaustion during high TCP traffic.Yury Selivanov2016-09-151-33/+40
| | | | | | | | Patch by Kevin Conway.
* | Merge 3.5 (issue #27456)Yury Selivanov2016-09-121-0/+16
|\ \ | |/
| * Issue #27456: asyncio: Set TCP_NODELAY by default.Yury Selivanov2016-09-121-0/+16
| |
* | Merge 3.5 (asyncio)Yury Selivanov2016-09-121-0/+6
|\ \ | |/
| * asyncio: Add set_protocol / get_protocol methods to TransportsYury Selivanov2016-09-121-0/+6
| |
* | Merge 3.5 (asyncio)Yury Selivanov2016-06-281-1/+2
|\ \ | |/
| * asyncio: Use socket specs for getaddrinfo() in sock_connect()Yury Selivanov2016-06-281-1/+2
| | | | | | | | Patch by Martin Richard. GH PR #365.
* | Merge 3.5 (issue #27223)Yury Selivanov2016-06-111-0/+11
|\ \ | |/
| * Issue #27223: aio: Fix _read_ready and _write_ready to respect _conn_lost.Yury Selivanov2016-06-111-0/+11
| | | | | | | | Patch by Łukasz Langa.