| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
(cherry picked from commit 6acb32fac3511c1d5500cac66f1d6397dcdab835)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Ee Durbin <ee@python.org>
|
|
|
|
|
|
|
| |
ensure that the given socket is in non-blocking mode (GH-119519) (#119913)
(cherry picked from commit cf3bba3f0671d2c9fee099e3ab0f78b98b176131)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
|
|
|
|
|
|
|
| |
(GH-32011) (GH-117209)
(cherry picked from commit f11d0d8be8af28e1368c3c7c116218cf65ddf93e)
Co-authored-by: Erik Soma <stillusingirc@gmail.com>
|
|
|
| |
Manual backport of gh-116774.
|
|
|
|
| |
Co-authored-by: cui fliter <imcusg@gmail.com>
(cherry picked from commit e7ba6e9dbe5433b4a0bcb0658da6a68197c28630)
|
|
|
|
|
|
|
| |
BaseEventLoop.shutdown_default_executor (GH-115622) (#115641)
(cherry picked from commit 53d5e67804227d541ed2f9e8efea8de5d70cb1ec)
Co-authored-by: Jamie Phan <jamie@ordinarylab.dev>
|
|
|
|
|
|
|
|
|
| |
(#114980)
Also improve exception message.
(cherry picked from commit 94ec2b9c9ce898723c3fe61fbc64d6c8f4f68700)
Co-authored-by: Donghee Na <donghee.na92@gmail.com>
|
|
|
|
|
|
|
|
| |
(#114829)
gh-109534: fix reference leak when SSL handshake fails (GH-114074)
(cherry picked from commit 80aa7b3688b8fdc85cd53d4113cb5f6ce5500027)
Co-authored-by: Jamie Phan <jamie@ordinarylab.dev>
|
|
|
|
|
|
|
|
| |
asyncio.BaseEventLoop.create_server() (GH-114420) (GH-114441)
(cherry picked from commit a53e56e7d88b4f2a2943c9f191024198009fcf9e)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#114046)
Some of the asyncio SSL changes in GH-31275 [1] were taken from
v0.16.0 of the uvloop project [2]. In order to comply with the MIT
license, we need to just need to document the copyright information.
[1]: https://github.com/python/cpython/pull/31275
[2]: https://github.com/MagicStack/uvloop/tree/v0.16.0
(cherry picked from commit dce30c9cbc212e5455e100f35ac6afeb30dfd23e)
|
|
|
|
|
|
|
| |
is cancelled (GH-113690) (#113713)
(cherry picked from commit 4681a5271a8598b46021cbc556ac8098ab8a1d81)
Co-authored-by: Guido van Rossum <guido@python.org>
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-113334) (#113339)
When wrapped, `_SSLProtocolTransport._force_close(exc)` is called just like in the unwrapped scenario `_SelectorTransport._force_close(exc)` or `_ProactorBasePipeTransport._force_close(exc)` would be called, except here the exception needs to be passed through the `SSLProtocol._abort()` method, which didn't accept an exception object.
This commit ensures that this path works, in the same way that the uvloop implementation of SSLProto passes on the exception (on which the current implementation of SSLProto is based).
(cherry picked from commit 1ff02385944924db7e683a607da2882462594764)
Co-authored-by: Martijn Pieters <mj@zopatista.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-111983) (#112142)
* [3.12] gh-109538: Avoid RuntimeError when StreamWriter is deleted with closed loop (GH-111983)
Issue a ResourceWarning instead.
(cherry picked from commit e0f512797596282bff63260f8102592aad37cdf1)
gh-109538: Avoid RuntimeError when StreamWriter is deleted with closed loop (#111983)
Issue a ResourceWarning instead.
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
(cherry picked from commit e0f512797596282bff63260f8102592aad37cdf1)
* Fix missing warnings import
|
|
|
|
|
|
| |
client_connected_cb (GH-111601) (#111632)
Call loop exception handler for exceptions in `client_connected_cb` of `asyncio.start_server` so that applications can handle it..
(cherry picked from commit 229f44d353c71185414a072017f46f125676bdd6)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#111424)
gh-79033: Try to fix asyncio.Server.wait_closed() again (GH-111336)
* Try to fix asyncio.Server.wait_closed() again
I identified the condition that `wait_closed()` is intended
to wait for: the server is closed *and* there are no more
active connections.
When this condition first becomes true, `_wakeup()` is called
(either from `close()` or from `_detach()`) and it sets `_waiters`
to `None`. So we just check for `self._waiters is None`; if it's
not `None`, we know we have to wait, and do so.
A problem was that the new test introduced in 3.12 explicitly
tested that `wait_closed()` returns immediately when the server
is *not* closed but there are currently no active connections.
This was a mistake (probably a misunderstanding of the intended
semantics). I've fixed the test, and added a separate test that
checks exactly for this scenario.
I also fixed an oddity where in `_wakeup()` the result of the
waiter was set to the waiter itself. This result is not used
anywhere and I changed this to `None`, to avoid a GC cycle.
* Update Lib/asyncio/base_events.py
---------
(cherry picked from commit 26553695592ad399f735d4dbaf32fd871d0bb1e1)
Co-authored-by: Guido van Rossum <guido@python.org>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
|
|
|
|
|
|
|
|
|
|
| |
(GH-110884) (#111412)
- `ThreadedChildWatcher.close()` is now *officially* a no-op; `_join_threads()` never did anything.
- Threads created by that class are now named `asyncio-waitpid-NNN`.
- `test.test_asyncio.utils.TestCase.close_loop()` now waits for the child watcher's threads, but not forever; if a thread hangs, it raises `RuntimeError`.
(cherry picked from commit c3bb10c9303503e7b55a7bdf9acfa6b3bcb699c6)
Co-authored-by: Guido van Rossum <guido@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-111111) (GH-111171)
asyncio.TaskGroup and asyncio.Timeout classes now raise proper RuntimeError
if they are improperly used.
* When they are used without entering the context manager.
* When they are used after finishing.
* When the context manager is entered more than once (simultaneously or
sequentially).
* If there is no current task when entering the context manager.
They now remain in a consistent state after an exception is thrown,
so subsequent operations can be performed correctly (if they are allowed).
(cherry picked from commit 6c23635f2b7067ef091a550954e09f8b7c329e3f)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: James Hilton-Balfe <gobot1234yt@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 596589104fe5a4d90cb145b2cc69b71cc9aa9f07)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
|
|
|
|
|
|
|
|
|
| |
(GH-109910) (#109992)
gh-109955 : Update state transition comments for asyncio.Task (GH-109910)
(cherry picked from commit 45cf5b0c69bb5c51f33fc681d90c45147e311ddf)
Co-authored-by: Kristján Valur Jónsson <sweskman@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
(GH-108528) (#109941)
Remove loop from docstring for asyncio.streams.open_connection (GH-108528)
(cherry picked from commit e721f7a95186452339dc9e57630d639d549b2521)
Co-authored-by: Tom Gillespie <tgbugs@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
gh-109709: Fix asyncio test_stdin_broken_pipe() (GH-109710)
Replace harcoded sleep of 500 ms with synchronization using a pipe.
Fix also Process._feed_stdin(): catch also BrokenPipeError on
stdin.write(input), not only on stdin.drain().
(cherry picked from commit cbbdf2c1440c804adcfc32ea0470865b3b3b8eb2)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-109431) (#109609)
gh-108973: Fix asyncio test_subprocess_consistent_callbacks() (GH-109431)
SubprocessProtocol process_exited() method can be called before
pipe_data_received() and pipe_connection_lost() methods. Document it
and adapt the test for that.
Revert commit 282edd7b2a74c4dfe1bfe3c5b1d30f9c21d554d6.
_child_watcher_callback() calls immediately _process_exited(): don't
add an additional delay with call_soon(). The reverted change didn't
make _process_exited() more determistic: it can still be called
before pipe_connection_lost() for example.
(cherry picked from commit ced6924630037f1e5b3d1dbef2b600152fb07fbb)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Davide Rizzo <sorcio@gmail.com>
|
|
|
|
|
|
| |
Fix patchcheck for `asyncio.tasks` (GH-108159)
(cherry picked from commit b1e5d2c601bbd3d435b60deef4818f3622bdfca3)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
|
|
|
|
|
|
|
|
|
| |
is not closed by application (GH-107650) (#107656)
GH-106684: raise `ResourceWarning` when `asyncio.StreamWriter` is not closed (GH-107650)
(cherry picked from commit 41178e41995992bbe417f94bce158de93f9e3188)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
|
|
|
|
|
| |
gh-106634: Corrected minor asyncio doc issues (GH-106671)
(cherry picked from commit 4b4a5b70aa8d47b1e2a0582b741c31b786da762a)
Co-authored-by: Chris Brett <chrisbrett665@gmail.com>
|
|
|
|
|
|
|
|
| |
close(). (GH-106504) (#106514)
gh-106503: asyncio._SelectorSocketTransport: fix cyclic reference on close(). (GH-106504)
(cherry picked from commit 3e5ce7968f5ab715f649e296e1f6b499621b8091)
Co-authored-by: Andrew Geng <pteromys@gmail.com>
|
|
|
|
|
|
|
|
|
| |
(GH-106090) (#106098)
gh-106075: add `asyncio.taskgroups.__all__` to `asyncio.__all__` (GH-106090)
(cherry picked from commit a12e8ffb49e05a1d1874389318911ce9685db232)
Co-authored-by: James Webber <jamestwebber@users.noreply.github.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
|
|
|
| |
(#104586)
|
| |
|
|
|
|
| |
Instead, add docstring to create_eager_task_factory.
|
|
|
|
| |
eagerly (#104138)
|
|
|
|
|
| |
eagerly (#104140)
Co-authored-by: Carl Meyer <carl@oddbird.net>
|
|
|
|
| |
Co-authored-by: Jacob Bower <jbower@meta.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
|
|
|
|
|
|
|
| |
subprocess's communicate(None) closes stdin of the child process, after
sending no (extra) data. Make asyncio variant do the same.
This fixes issues with processes that waits for EOF on stdin before
continuing.
|
|
|
|
|
| |
`asyncio`. (#17425)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
|
|
|
| |
data is still pending (#103463)
|
|
|
|
|
|
|
| |
Also use `raise TimeOut from <CancelledError instance>` so that the CancelledError is set
in the `__cause__` field rather than in the `__context__` field.
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
|
| |
(#102811)
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
| |
`asyncio.iscoroutine` (#102749)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
| |
|
| |
|
|
|
|
| |
(#102398)
|
| |
|
|
|
| |
Changes `asyncio.wait_for` to use `asyncio.timeout` as its underlying implementation.
|
|
|
|
|
| |
`asyncio.StreamWriter.start_tls` (#101335)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
|
|
|
|
| |
`asyncio.base_events.BaseEventLoop._add_callback` (#101197)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Partially revert changes made in GH-93453.
asyncio.DefaultEventLoopPolicy.get_event_loop() now emits a
DeprecationWarning and creates and sets a new event loop instead of
raising a RuntimeError if there is no current event loop set.
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
|
|
|
|
| |
`asyncio.open_connection` (#100615)
|
|
|
|
|
| |
asyncio (#31871)
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
|