summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/base_events.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-45129 Remove deprecated reuse_address (GH-28207)Hugo van Kemenade2021-09-081-25/+2
| | | | | | | | Due to significant security concerns, the reuse_address parameter of asyncio.loop.create_datagram_endpoint, deprecated in Python 3.9, is now removed. This is because of the behavior of the socket option SO_REUSEADDR in UDP. Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-44740: Lowercase "internet" and "web" where appropriate. (#27378)Mariusz Felisiak2021-07-261-1/+1
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-43234: Prohibit non-ThreadPoolExecutor in loop.set_default_executor ↵Illia Volochii2021-07-011-5/+1
| | | | (GH-24540)
* bpo-44011: Revert "New asyncio ssl implementation (GH-17975)" (GH-25848)Pablo Galindo2021-05-031-34/+9
| | | | This reverts commit 5fb06edbbb769561e245d0fe13002bab50e2ae60 and all subsequent dependent commits.
* bpo-44011: New asyncio ssl implementation (#17975)Andrew Svetlov2021-05-021-9/+34
|
* bpo-42392: Remove loop parameter from asyncio.tasks and asyncio.subprocess ↵Yurii Karabas2020-11-281-5/+4
| | | | (GH-23521)
* bpo-41332: Added missing connect_accepted_socket() to AbstractEventLoop ↵Alex Grönholm2020-11-261-8/+0
| | | | | | (GH-21533) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> Co-authored-by: Kyle Stanley <aeros167@gmail.com>
* bpo-39609: set the thread_name_prefix for the default asyncio executor ↵Markus Mohrhard2020-02-271-1/+3
| | | | | (GH-18458) Just a small debugging improvement to identify the asyncio executor threads.
* bpo-39191: Fix RuntimeWarning in asyncio test (GH-17863)Andrew Svetlov2020-01-071-3/+3
| | | https://bugs.python.org/issue39191
* Fix #39191: Don't spawn a task before failing (#17796)Andrew Svetlov2020-01-041-3/+7
|
* bpo-37228: Fix loop.create_datagram_endpoint()'s usage of SO_REUSEADDR (#17311)Kyle Stanley2019-12-091-7/+18
|
* bpo-34037: Fix test_asyncio failure and add loop.shutdown_default_executor() ↵Kyle Stanley2019-09-191-0/+29
| | | | (GH-15735)
* Use threadpool for reading from file in sendfile fallback mode (#14076)Andrew Svetlov2019-06-151-1/+1
|
* bpo-37279: Fix asyncio sendfile support when extra data are sent in ↵Andrew Svetlov2019-06-151-2/+2
| | | | fallback mode. (GH-14075)
* Revert "bpo-34037, asyncio: add BaseEventLoop.wait_executor_on_close ↵Łukasz Langa2019-06-041-3/+1
| | | | | (GH-13786)" (#13802) This reverts commit 0f0a30f4da4b529e0f7df857b9f575b231b32758.
* bpo-34037, asyncio: add BaseEventLoop.wait_executor_on_close (GH-13786)Victor Stinner2019-06-031-1/+3
| | | | | | | Add BaseEventLoop.wait_executor_on_close attribute: true by default. loop.close() now waits for the default executor to finish by default. Set loop.wait_executor_on_close attribute to False to not wait for the executor.
* bpo-35246: fix support for path-like args in asyncio subprocess (GH-13628)依云2019-05-291-5/+0
| | | | | | | | | Drop isinstance checks from create_subprocess_exec function and let subprocess module do them. https://bugs.python.org/issue35246 https://bugs.python.org/issue35246
* bpo-36686: Improve the documentation of the std* params in ↵sbstp2019-05-271-1/+18
| | | | | loop.subprocess_exec (GH-13586) https://bugs.python.org/issue36686
* 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-7/+0
| | | https://bugs.python.org/issue37035
* bpo-32528: Make asyncio.CancelledError a BaseException. (GH-13528)Yury Selivanov2019-05-271-5/+11
| | | | | | | | | | | | | | | 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-35545: Fix asyncio discarding IPv6 scopes (GH-11271)Erwan Le Pape2019-05-171-3/+3
| | | | | | | | This PR proposes a solution to [bpo-35545](https://bugs.python.org/issue35545) by adding an optional `flowinfo` and `scopeid` to `asyncio.base_events._ipaddr_info` to carry the full address information into `_ipaddr_info` and avoid discarding IPv6 specific information. Changelog entry & regression tests to come. https://bugs.python.org/issue35545
* bpo-31922: Do not connect UDP sockets when broadcast is allowed (GH-423)Vincent Michel2019-05-071-1/+2
| | | | | | | | | | | | *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
* bpo-33530: Implement Happy Eyeballs in asyncio, v2 (GH-7237)twisteroid ambassador2019-05-051-36/+89
| | | | | | | | | | Added two keyword arguments, `delay` and `interleave`, to `BaseEventLoop.create_connection`. Happy eyeballs is activated if `delay` is specified. We now have documentation for the new arguments. `staggered_race()` is in its own module, but not exported to the main asyncio package. https://bugs.python.org/issue33530
* bpo-34139: Remove unix datagram socket from FS before binding (GH-8323)Quentin Dawans2019-04-091-0/+14
| | | https://bugs.python.org/issue34139
* asyncio: use dict instead of OrderedDict (GH-11710)Inada Naoki2019-02-051-1/+1
|
* 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-0/+11
|
* bpo-35202: Remove unused imports in Lib directory (GH-10450)Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి)2018-11-151-1/+0
|
* bpo-34769: Thread safety for _asyncgen_finalizer_hook(). (GH-9716)twisteroid ambassador2018-10-091-4/+1
|
* bpo-34849: Don't log wating for selector.select in asyncio loop iteration ↵Andrew Svetlov2018-09-301-22/+1
| | | | | | | | | | (GH-9641) The waiting is pretty normal for any asyncio program, logging its time just adds a noise to logs without any useful information provided. https://bugs.python.org/issue34849
* bpo-34630: Skip logging SSL certificate errors by asyncio code (GH-9169)Andrew Svetlov2018-09-121-0/+3
|
* bpo-34622: Extract asyncio exceptions into a separate module (GH-9141)Andrew Svetlov2018-09-111-5/+6
|
* bpo-34270: Make it possible to name asyncio tasks (GH-8547)Alex Grönholm2018-08-081-2/+4
| | | Co-authored-by: Antti Haapala <antti.haapala@anttipatterns.com>
* bpo-34263 Cap timeout submitted to epoll/select etc. to one day. (GH-8532)MartinAltmayer2018-07-311-1/+4
|
* bpo-34075: Deprecate non-ThreadPoolExecutor in loop.set_default_executor() ↵Elvis Pranskevichus2018-07-301-0/+6
| | | | | | | (GH-8533) Various asyncio internals expect that the default executor is a `ThreadPoolExecutor`, so deprecate passing anything else to `loop.set_default_executor()`.
* bpo-27500: Fix static version of getaddrinfo to resolve IPv6 (GH-7993)Yury Selivanov2018-06-291-4/+10
|
* bpo-30805: Avoid race condition with debug logging (GH-7545)Yury Selivanov2018-06-081-2/+4
| | | Supersedes https://github.com/python/cpython/pull/2490
* bpo-33769: start_tls: Fix error message; cancel callbacks on error (GH-7403)Yury Selivanov2018-06-051-3/+5
| | | In addition to that, mark SSLTransport as "closed" in its "abort()" method to prevent bogus warnings.
* bpo-33734: asyncio/ssl: a bunch of bugfixes (#7321)Yury Selivanov2018-06-041-1/+6
| | | | | | | * Fix AttributeError (not all SSL exceptions have 'errno' attribute) * Increase default handshake timeout from 10 to 60 seconds * Make sure start_tls can be cancelled correctly * Make sure any error in SSLProtocol gets propagated (instead of just being logged)
* bpo-33674: Pause the transport as early as possible (#7192)Yury Selivanov2018-05-291-2/+5
|
* bpo-32410: Avoid blocking on file IO in sendfile fallback code (GH-7172)Yury Selivanov2018-05-281-2/+5
|
* bpo-33654: Support BufferedProtocol in set_protocol() and start_tls() (GH-7130)Yury Selivanov2018-05-281-1/+6
| | | | | | | | | | | 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-32327: Revert loop.run_in_executor behaviour: return a Future. (#5392)Yury Selivanov2018-01-281-2/+2
| | | | I've run some tests on 3.7 asyncio and it appears that too many things assume that run_in_executor returns a Future.
* bpo-32622: Enforce sendfile fallback policy for FALLBACK transports (#5364)Yury Selivanov2018-01-271-1/+6
|
* bpo-32622: Implement loop.sendfile() (#5271)Andrew Svetlov2018-01-271-0/+142
|
* bpo-32662: Implement Server.start_serving() and Server.serve_forever() (#5312)Yury Selivanov2018-01-251-20/+82
| | | | | | | | | | | | | * bpo-32662: Implement Server.start_serving() and Server.serve_forever() New methods: * Server.start_serving(), * Server.serve_forever(), and * Server.is_serving(). Add 'start_serving' keyword parameter to loop.create_server() and loop.create_unix_server().
* bpo-32436: Implement PEP 567 (#5027)Yury Selivanov2018-01-231-10/+11
|
* bpo-32314: Fix asyncio.run() to cancel runinng tasks on shutdown (#5262)Yury Selivanov2018-01-211-15/+10
|
* bpo-32591: Add native coroutine origin tracking (#5250)Nathaniel J. Smith2018-01-211-33/+16
| | | | | | * Add coro.cr_origin and sys.set_coroutine_origin_tracking_depth * Use coroutine origin information in the unawaited coroutine warning * Stop using set_coroutine_wrapper in asyncio debug mode * In BaseEventLoop.set_debug, enable debugging in the correct thread