| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
(cherry picked from commit 17ef4319a34f5a2f95e7823dfb5f5b8cff11882d)
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) (#23540)
Co-Authored-By: Tyler Bell <mrbell321@gmail.com>
(cherry picked from commit 8085f742f4adfbc85f13fc734dfab036aa23acfb)
Co-authored-by: Zackery Spytz <zspytz@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) (GH-23105)
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>
|
|
|
|
|
|
|
|
|
| |
0 (GH-21895) (#21967)
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)
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#21965)
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>
|
|
|
|
|
|
|
|
|
|
| |
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-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>
|
|
|
|
|
|
|
|
| |
(as title)
Automerge-Triggered-By: @Mariatta
(cherry picked from commit f2947e354c95d246b1836ac78d4c820c420e259b)
Co-authored-by: Kunal Bhalla <bhalla.kunal@gmail.com>
|
|
|
|
|
|
| |
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 4482337decdbd0c6e2150346a68b3616bda664aa)
Co-authored-by: Lidi Zheng <scallopsky@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Motivation for this PR (comment from @vstinner in bpo issue):
```
Warning seen o AMD64 Ubuntu Shared 3.x buildbot:
https://buildbot.python.org/all/GH-/builders/141/builds/2593
test_devnull_output (test.test_a=syncio.test_subprocess.SubprocessThreadedWatcherTests) ...
Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2)
```
The following implementation details for the new method are TBD:
1) Public vs private
2) Inclusion in `close()`
3) Name
4) Coroutine vs subroutine method
5) *timeout* parameter
If it's a private method, 3, 4, and 5 are significantly less important.
I started with the most minimal implementation that fixes the dangling threads without modifying the regression tests, which I think is particularly important. I typically try to avoid directly modifying existing tests as much as possible unless it's necessary to do so. However, I am open to changing any part of this.
https://bugs.python.org/issue38356
(cherry picked from commit 0ca7cc7fc0518c24dc9b78c38418e6064e64f148)
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
|
|
|
|
|
|
| |
https://bugs.python.org/issue39191.
(cherry picked from commit 10ac0cded26d91c3468e5e5a87cecad7fc0bcebd)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 3a5de511596f17575de082dcb8d43d63b2bd2da9)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 025eeaa19607b2a80c979668dad405f567444573)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
| |
(GH-17311) (#17529)
(cherry picked from commit ab513a38c98695f271e448fe2cb7c5e39eeaaaaf)
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
|
|
|
|
|
|
|
| |
Fix asyncio when the ssl module is missing: only check for
ssl.SSLSocket instance if the ssl module is available.
(cherry picked from commit 82b4950b5e92bec343a436b3f9c116400b66e1b9)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
| |
functions (GH-16457) (#17496)
https://bugs.python.org/issue37404
(cherry picked from commit 892f9e0777f262d366d4747a54c33a1c15a49da6)
Co-authored-by: idomic <michael.ido@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 7ddcd0caa4c2e6b43265df144f59c5aa508a94f2)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
|
| |
if parent `__init__` is not called from a constructor of object derived from `asyncio.Future`
https://bugs.python.org/issue38785
(cherry picked from commit dad6be5ffe48beb74fad78cf758b886afddc7aed)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
| |
bpo-34679, bpo-38563: asyncio.ProactorEventLoop.close() now only calls
signal.set_wakeup_fd() in the main thread.
(cherry picked from commit 1b53a24fb4417c764dd5933bce505f5c94249ca6)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
| |
(cherry picked from commit b23a8423a923077e4f83d3f328bb7542b4c940ed)
Co-authored-by: idomic <michael.ido@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit e407013089259e4c0b271703e1975bbcd578a2d5)
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
|
|
|
|
|
| |
(#16485)
See https://bugs.python.org/issue38242 for more details
|
|
|
|
|
|
|
| |
(GH-16472)
(cherry picked from commit 58498bc7178608b1ab031994ca09c43889ce3e76)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
| |
(GH-16383)
(cherry picked from commit edad4d89e357c92f70c0324b937845d652b20afd)
Co-authored-by: Yury Selivanov <yury@edgedb.com>
|
|
|
|
|
|
|
|
|
|
| |
Add docs about return and raise exception on asyncio.run
https://bugs.python.org/issue38260
Automerge-Triggered-By: @asvetlov
(cherry picked from commit 17deb16883fa574a86e42551cc37f044182347ad)
Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
* bpo-38148: Add slots to asyncio transports
* Update Misc/NEWS.d/next/Library/2019-09-13-08-55-43.bpo-38148.Lnww6D.rst
Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
(cherry picked from commit 9eb35ab0d71a6bd680e84fa0f828cb634e72b681)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
* This just copies the docs from `StreamWriter` and `StreamReader`.
* Add docstring for asyncio functions.
https://bugs.python.org/issue36889
Automerge-Triggered-By: @asvetlov
(cherry picked from commit d31b31516c71890e8735606aec1dbf2bfb8fd6be)
Co-authored-by: Xtreak <tir.karthi@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit a488879cbaf4b8b52699cadccf73bb4c271bcb29)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
| |
https://bugs.python.org/issue36373
(cherry picked from commit 7264e92b718d307cc499b2f10eab7644b00f0499)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
|
| |
feed_eof(), feed_data(), set_exception(), and set_transport() are prefixed with underscore now.
https://bugs.python.org/issue38066
(cherry picked from commit 12c122ae958a55c9874ed4c7d7805ceb084411d7)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[queue] (GH-13950)
This PR deprecate explicit loop parameters in all public asyncio APIs
This issues is split to be easier to review.
fourth step: queue.py
https://bugs.python.org/issue36373
(cherry picked from commit 9008be303a89bfab8c3314c6a42330b5523adc8b)
Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[locks] (GH-13920)
This PR deprecate explicit loop parameters in all public asyncio APIs
This issues is split to be easier to review.
Third step: locks.py
https://bugs.python.org/issue36373
(cherry picked from commit 537877d85d1c27d2c2f5189e39da64a7a0c413d3)
Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 39d87b54715197ca9dcb6902bb43461c0ed701a2)
Co-authored-by: Min ho Kim <minho42@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
thread (GH-15492)
* Restore running proactor event loop from non-main thread
Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
(cherry picked from commit 1c0600998681295735a18690fae184b0c9a4ca51)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 96e12d5f4f3c5a20986566038ee763dff3c228a1)
Co-authored-by: Min ho Kim <minho42@gmail.com>
|
|
|
|
|
|
|
| |
non-main thread (GH-14344)
(cherry picked from commit 0d671c04c39b52e44597491b893eb0b6c86b3d45)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 97d15b1ee06ce80c4dbda91fb538a89bbcb2bed9)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
| |
(GH-14076) (GH-14102)
(cherry picked from commit 0237265e8287141c40faa8719da3a2d21d511d0d)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
| |
fallback mode. (GH-14075)
(cherry picked from commit ef2152354f03a165c5e3adb53e2276934fabd50a)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
|
| |
If internal tasks weak set is changed by another thread during iteration.
https://bugs.python.org/issue36607
(cherry picked from commit 65aa64fae89a24491aae84ba0329eb8f3c68c389)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
|
| |
(GH-13834)
https://bugs.python.org/issue34767
(cherry picked from commit 9aa78566fbeeb8cdaa669ad22f92cf63765f4135)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[streams] (GH-13671)
This PR deprecate explicit loop parameters in all public asyncio APIs
This issues is split to be easier to review.
Second step: streams.py
https://bugs.python.org/issue36373
(cherry picked from commit 6d64a8f49eb321116f585c4b036c81bb976d2d5c)
Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
|
|
|
|
|
| |
(GH-13786)" (#13802)
This reverts commit 0f0a30f4da4b529e0f7df857b9f575b231b32758.
|