| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
(cherry picked from commit f882d33778ee2625ab32d90e28edb6878fb8af93)
Co-authored-by: Alexander Shadchin <alexandr.shadchin@gmail.com>
|
|
|
|
|
|
| |
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
(cherry picked from commit 5c30388f3c586ba2f33e349e22e5949cb92de621)
Co-authored-by: Vincent Bernat <vincent@bernat.ch>
|
|
|
|
|
|
| |
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>.
(cherry picked from commit 32e77154ddfc514a3144d5912bffdd957246fd6c)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 70155412f1543f100d4aa309b8691cbcabd3e0e1)
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
|
|
|
|
|
|
|
|
|
| |
This change aligns the documentation at https://docs.python.org/3/library/asyncio-eventloop.htmlGH-asyncio.Server
with the actual implementation
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
(cherry picked from commit da80d6b2f3beff519cb1457d5e055168c89f7224)
Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>
|
|
|
|
|
|
|
| |
(GH-31512)
(cherry picked from commit cff4d5c5d29528299ec1ac5b3b3a6f7735577c01)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
|
| |
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>
(cherry picked from commit 8fb94893e4a870ed3533e80c4bc2f1ebf1cfa9e7)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
|
|
|
|
|
|
|
| |
methods (GH-31442) (GH-31444)
(cherry picked from commit 1f9d4c93af380d00bf2e24bc5f5ce662d41504aa)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
| |
(GH-31187) (GH-31441)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
| |
The docstring for `BufferedProtocol` states that the class is still an "experimental API", but it has been considered stable since 3.8.
(cherry picked from commit 1d81fdc4c004511c25f74db0e04ddbbb8a04ce6d)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
|
|
|
| |
transports (GH-30958)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 64568acbd88a88d54ac9b8215447f88280448dd5)
Co-authored-by: Emiya <importz750@gmail.com>
|
|
|
|
|
| |
(GH-30785)
Automerge-Triggered-By: GH:asvetlov
|
|
|
|
|
|
| |
Automerge-Triggered-By: GH:asvetlov
(cherry picked from commit b50e5e916a05df65ab6a255af7624b751e0fe9d1)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
| |
(#30429)
(cherry picked from commit 3e43fac2503afe219336742b150b3ef6e470686f)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
| |
(GH-30353)
(cherry picked from commit 5a2a65096c3ec2d37f33615f2a420d2ffcabecf2)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
| |
(GH-30265)
(cherry picked from commit a23ab7b6d8b3ae3a47747c0c4bceb2370cc48dcc)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
|
|
|
|
|
|
| |
(cherry picked from commit 934a82623793e9d52b85f74d5395d65927a52205)
Co-authored-by: Sam Bull <aa6bs0@sambull.org>
Co-authored-by: Sam Bull <aa6bs0@sambull.org>
|
|
|
|
|
| |
(cherry picked from commit 1dfac27dffbe771f9d88bd1726f7362ce0341437)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
|
|
|
|
|
|
|
| |
Fix typos in the Lib directory as identified by codespell.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 745c9d9dfc1ad6fdfdf1d07420c6273ff67fa5be)
Automerge-Triggered-By: GH:JulienPalard
|
|
|
|
|
|
| |
Deprecation warnings about the loop argument were incorrectly emitted
in cases when the loop argument was used inside the asyncio library,
not from user code.
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
|
|
| |
(cherry picked from commit 4b4227b907a262446b9d276c274feda2590a4e6e)
Co-authored-by: Jesús Cea <jcea@jcea.es>
Co-authored-by: Jesús Cea <jcea@jcea.es>
|
|
|
|
|
|
|
| |
(cherry picked from commit 17ef4319a34f5a2f95e7823dfb5f5b8cff11882d)
Co-authored-by: Richard Kojedzinszky <rkojedzinszky@users.noreply.github.com>
Co-authored-by: Richard Kojedzinszky <rkojedzinszky@users.noreply.github.com>
|
|
|
|
|
|
| |
This is a trivial refactor in preparation for a fix for bpo-38323.
(cherry picked from commit 66d3b589c44fcbcf9afe1e442d9beac3bd8bcd34)
Co-authored-by: Chris Jerdonek <chris.jerdonek@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
(GH-21925) (GH-23539)
Co-Authored-By: Tyler Bell <mrbell321@gmail.com>
(cherry picked from commit 8085f742f4adfbc85f13fc734dfab036aa23acfb)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GH- Improve asyncio.wait function
The original code creates the futures set two times.
We can create this set before, avoiding the second creation.
This new behaviour [breaks the aiokafka library](https://github.com/aio-libs/aiokafka/pull/672), because it gives an iterator to that function, so the second iteration become empty.
Automerge-Triggered-By: GH:1st1
(cherry picked from commit 7e5ef0a5713f968f6e942566c78bf57ffbef01de)
Co-authored-by: Diogo Dutra <diogodutradamata@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-23020)
The overflow occurs under some circumstances when a task or future
recursively returns itself.
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
(cherry picked from commit 42d873c63aa9d160c132be4a34599531574db12c)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
iterables (GH-23073)
People call wait() and as_completed() with various non-set iterables,
a list should be the most common but there are others as well[1].
Considering typeshed also documents wait()[2] and as_completed()[3]
as accepting arbitrary iterables I think it's a good idea to document
the status quo better.
[1] https://github.com/aio-libs/aiokafka/pull/672
[2] https://github.com/python/typeshed/blob/620989bac572f30349b95590ebe81a73ce0fe862/stdlib/3/asyncio/tasks.pyiGH-L161
[3] https://github.com/python/typeshed/blob/620989bac572f30349b95590ebe81a73ce0fe862/stdlib/3/asyncio/tasks.pyiGH-L40
(cherry picked from commit 3d86d090dcbbdfdd3e5a5951cab30612d6131222)
Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
|
|
|
|
|
|
|
|
| |
Fix a race condition in the call_soon_threadsafe() method of
asyncio.ProactorEventLoop: do nothing if the self-pipe socket has
been closed.
(cherry picked from commit 1b0f0e3d7d03155da1cf9769a847874d559e57e3)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-41696: Fix handling of debug mode in asyncio.run
This allows PYTHONASYNCIODEBUG or -X dev to enable asyncio debug mode
when using asyncio.run
* 📜🤖 Added by blurb_it.
Co-authored-by: hauntsaninja <>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 0770ad948cb6d9f7f6c4002efd83e27c27069808)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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.
(cherry picked from commit ea5a6363c3f8cc90b7c0cc573922b10f296073b6)
Co-authored-by: Ben Darnell <ben@bendarnell.com>
Co-authored-by: Ben Darnell <ben@bendarnell.com>
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-21964)
Currently, if `asyncio.wait_for()` itself is cancelled it will always
raise `CancelledError` regardless if the underlying task is still
running. This is similar to a race with the timeout, which is handled
already.
(cherry picked from commit a2118a14627256197bddcf4fcecad4c264c1e39d)
Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-21895) (GH-21963)
When I was fixing bpo-32751 back in GH-7216 I missed the case when
*timeout* is zero or negative. This takes care of that.
Props to @aaliddell for noticing the inconsistency.
(cherry picked from commit c517fc712105c8e5930cb42baaebdbe37fc3e15f)
Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
|
|
|
|
|
|
|
|
|
|
| |
Fix grammar in BaseTransport.close docstring.
https://bugs.python.org/issue41572
Signed-off-by: Cleber Rosa <crosa@redhat.com>
(cherry picked from commit 1afb42cfa82dad0ddd726f59c6c5fcb3962314db)
Co-authored-by: Cleber Rosa <cleber.gnu@gmail.com>
|
|
|
|
|
|
|
|
|
| |
not a coroutine (GH-21852)
asyncio.AbstractEventLoop.run_in_executor should be a method that returns an asyncio Future, not an async method.
This matches the concrete implementations, and the documentation better.
(cherry picked from commit 29f84294d88ec493c2de9d6e8dbc12fae3778771)
Co-authored-by: James Weaver <james.barrett@bbc.co.uk>
|
|
|
|
|
|
|
|
| |
On Windows, fix asyncio recv_into() return value when the socket/pipe
is closed (BrokenPipeError): return 0 rather than an empty byte
string (b'').
(cherry picked from commit 602a971a2af3a685d625c912c400cadd452718b1)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
| |
(GH-21595)
(cherry picked from commit 0dd98c2d00a75efbec19c2ed942923981bc06683)
Co-authored-by: Alex Grönholm <alex.gronholm@nextday.fi>
|
|
|
|
|
|
|
|
|
|
| |
(GH-15312)
These changes updates the doc to comprehensively mention the behaviour of gather.cancel()
Automerge-Triggered-By: @asvetlov
(cherry picked from commit d42528a3a2c7d79fd2e6c9f2a02f3ce12d44c8cc)
Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com>
|
|
|
|
|
|
|
| |
asyncio.Task.all_tasks() (GH-20874)
(cherry picked from commit 004e64e8059fe68a72890314673282f2e60d5ce1)
Co-authored-by: Rémi Lapeyre <remi.lapeyre@lenstra.fr>
|
|
|
|
|
|
|
|
| |
When I wrote the documentation for `asyncio.to_thread()`, I mistakenly assumed that `return await loop.run_in_executor(...)` within an async def function would return a Future. In reality, it returns a coroutine.
This likely won't affect typical usage of `asyncio.to_thread()`, but it's important for the documentation to be correct here. In general, we also tend to avoid returning futures from high-level APIs in asyncio.
(cherry picked from commit 2b201369b435a4266bda5b895e3b615dbe28ea6e)
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 210a137396979d747c2602eeef46c34fc4955448)
Co-authored-by: Fantix King <fantix.king@gmail.com>
|
|
|
|
|
|
|
|
| |
Allows contextvars from the main thread to be accessed in the separate thread used in `asyncio.to_thread()`. See the [discussion](https://github.com/python/cpython/pull/20143GH-discussion_r427808225) in GH-20143 for context.
Automerge-Triggered-By: @aeros
(cherry picked from commit 0f56263e62ba91d0baae40fb98947a3a98034a73)
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
|
|
|
|
|
|
|
|
| |
(as title)
Automerge-Triggered-By: @Mariatta
(cherry picked from commit f2947e354c95d246b1836ac78d4c820c420e259b)
Co-authored-by: Kunal Bhalla <bhalla.kunal@gmail.com>
|
|
|
|
|
|
|
|
| |
Implements `asyncio.to_thread`, a coroutine for asynchronously running IO-bound functions in a separate thread without blocking the event loop. See the discussion starting from [here](https://github.com/python/cpython/pull/18410GH-issuecomment-628930973) in GH-18410 for context.
Automerge-Triggered-By: @aeros
(cherry picked from commit cc2bbc2227c3f5ed9d8f6b3bd052e6f9e68279d2)
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
|
|
|
|
|
| |
When an asyncio.Task is cancelled, the exception traceback now
starts with where the task was first interrupted. Previously,
the traceback only had "depth one."
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-20054)
Currently, if asyncio.wait_for() timeout expires, it cancels
inner future and then always raises TimeoutError. In case
those future is task, it can handle cancelation mannually,
and those process can lead to some other exception. Current
implementation silently loses thoses exception.
To resolve this, wait_for will check was the cancelation
successfull or not. In case there was exception, wait_for
will reraise it.
Co-authored-by: Roman Skurikhin <roman.skurikhin@cruxlab.com>
|
| |
|
| |
|
|
|
|
| |
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|