summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
Commit message (Collapse)AuthorAgeFilesLines
* gh-100226: Clarify StreamReader.read behavior (GH-101807)Miss Islington (bot)2023-02-171-8/+9
| | | | | (cherry picked from commit 77d95c83733722ada35eb1ef89ae5b84a51ddd32) Co-authored-by: Jan Gosmann <jan@hyper-world.de>
* gh-101143: Remove references to `TimerHandle` from ↵Miss Islington (bot)2023-01-211-6/+3
| | | | | | | | `asyncio.base_events.BaseEventLoop._add_callback` (GH-101197) (cherry picked from commit 9e947675ae3dc32f5863e5ed3022301cf7fd79b4) Co-authored-by: J. Nick Koston <nick@koston.org> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* [3.10] GH-100573: Fix server hang caused by os.stat() on named pipe ↵Miss Islington (bot)2023-01-131-0/+5
| | | | | | (Windows) (GH-100959) (#101020) (cherry picked from commit 1bc7a736837272b15ad3a7aa472977bc720d1033)
* [3.10] gh-100160: Remove any deprecation warnings in ↵Serhiy Storchaka2023-01-131-15/+0
| | | | | | | | | asyncio.get_event_loop() (GH-100412) (GH-100970) Some deprecation warnings will reappear (in a slightly different form) in 3.12. Co-authored-by: Guido van Rossum <guido@python.org>. (cherry picked from commit 1b2459dc64b1c3eea89312ea9bf422f8d7c75bb2)
* GH-86508: skip binding to local addresses of different family in ↵Miss Islington (bot)2023-01-041-2/+8
| | | | | | | `asyncio.open_connection` (GH-100615) (cherry picked from commit ba8dcdbcab5fd9989be6c9a51002394e782c463c) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* [3.10] gh-93453: Only emit deprecation warning in asyncio.get_event_loop ↵Łukasz Langa2022-12-061-3/+19
| | | | | | | | | | | when a new event loop is created (#100059) It no longer emits a deprecation warning if the current event loop was set. (cherry picked from commit 3fae04b10e2655a20a3aadb5e0d63e87206d0c67) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.10] gh-88863: Clear ref cycles to resolve leak when ↵Dong Uk, Kang2022-11-233-12/+33
| | | | | | | | | asyncio.open_connection raises (GH-95739) (#99722) Break reference cycles to resolve memory leak, by removing local exception and future instances from the frame. (cherry picked from commit 995f6170c78570eca818f7e7dbd8a7661c171a81) Co-authored-by: Dong Uk, Kang <nailbrainz@gmail.com>
* gh-98703: Fix asyncio proactor_events calling _call_connection_lost multiple ↵Miss Islington (bot)2022-10-271-0/+2
| | | | | | | | times (GH-98704) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> (cherry picked from commit 8a755423eba8e19704d96905730cf7f50083eb23) Co-authored-by: Ken Jin <kenjin@python.org>
* GH-89237: fix hang in proactor `subprocess.wait_closed()` (GH-98572)Miss Islington (bot)2022-10-241-1/+3
| | | | | (cherry picked from commit ad1dc3ebb6aadaeeeacde13d4ed2d62bf302bf62) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* bpo-46364: Use sockets for stdin of asyncio only on AIX (GH-30596)Miss Islington (bot)2022-10-131-4/+3
| | | | | | | Signed-off-by: Christoph Hamsen <hamsen.christoph@posteo.de> Co-authored-by: July Tikhonov <july.tikh@gmail.com> (cherry picked from commit c9ed0327a9c741a1808926b409df29467baf303a) Co-authored-by: Christoph Hamsen <37963496+xopham@users.noreply.github.com>
* gh-94732: Fix KeyboardInterrupt race in asyncio run_forever() (GH-97765)Miss Islington (bot)2022-10-031-3/+4
| | | | | | Ensure that the event loop's `_thread_id` attribute and the asyncgen hooks set by `sys.set_asyncgen_hooks()` are always restored no matter where a KeyboardInterrupt exception is raised. (cherry picked from commit 3a49dbb98ccc1b90554ed181386316efa38adfba) Co-authored-by: hetmankp <728670+hetmankp@users.noreply.github.com>
* GH-96827: Don't touch closed loops from executor threads (GH-96837)Miss Islington (bot)2022-09-302-2/+6
| | | | | | | * When chaining futures, skip callback if loop closed. * When shutting down an executor, don't wake a closed loop. (cherry picked from commit e9d63760fea8748638f6e495b5b07bd1805c9591) Co-authored-by: Guido van Rossum <guido@python.org>
* gh-97545: Make Semaphore run faster. (GH-97549)Miss Islington (bot)2022-09-261-21/+17
| | | | | (cherry picked from commit 68c46ae68b6e0c36a12e37285fff9ce0782ed01e) Co-authored-by: Cyker Way <cykerway@gmail.com>
* GH-85760: Fix race in calling process_exited callback too early (GH-97009)Miss Islington (bot)2022-09-221-1/+2
| | | | | (cherry picked from commit 282edd7b2a74c4dfe1bfe3c5b1d30f9c21d554d6) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* gh-90155: Fix bug in asyncio.Semaphore and strengthen FIFO guarantee (GH-93222)Miss Islington (bot)2022-09-221-22/+42
| | | | | | | | | | | The main problem was that an unluckily timed task cancellation could cause the semaphore to be stuck. There were also doubts about strict FIFO ordering of tasks allowed to pass. The Semaphore implementation was rewritten to be more similar to Lock. Many tests for edge cases (including cancellation) were added. (cherry picked from commit 24e03796248ab8c7f62d715c28156abe2f1c0d20) Co-authored-by: Cyker Way <cykerway@gmail.com>
* gh-94972: document that shield users need to keep a reference to their task ↵Miss Islington (bot)2022-09-101-2/+9
| | | | | | | | | (GH-96724) Co-authored-by: Thomas Grainger <tagrain@gmail.com> Co-authored-by: Guido van Rossum <gvanrossum@gmail.com> (cherry picked from commit 6281affee6423296893b509cd78dc563ca58b196) Co-authored-by: Hendrik Makait <hendrik.makait@gmail.com>
* GH-74116: Allow multiple drain waiters for asyncio.StreamWriter (GH-94705)Miss Islington (bot)2022-09-081-19/+16
| | | | | (cherry picked from commit e5b2453e61ba5376831093236d598ef5f9f1de61) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* gh-90467: StreamReaderProtocol - add strong reference to created task (GH-96323)Miss Islington (bot)2022-09-081-1/+3
| | | | | (cherry picked from commit e860e521ec0d84e175269aeb15cf24bd6053ad17) Co-authored-by: Kirill <iam@python273.pw>
* bpo-45924: Fix asyncio incorrect traceback when future's exception is raised ↵Miss Islington (bot)2022-07-111-1/+2
| | | | | | | | | multiple times (GH-30274) (#94748) (cherry picked from commit 86c1df18727568758cc329baddc1836e45664023) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* gh-92841: Fix asyncio's RuntimeError: Event loop is closed (GH-92842) (GH-92904)Miss Islington (bot)2022-06-281-1/+1
| | | | | (cherry picked from commit 33880b4b1c60f54aa9e7fa02698a3c82eafe3dc7) Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* Fix missing `f` prefix on f-strings (GH-91910)Miss Islington (bot)2022-04-271-1/+1
| | | | | (cherry picked from commit f882d33778ee2625ab32d90e28edb6878fb8af93) Co-authored-by: Alexander Shadchin <alexandr.shadchin@gmail.com>
* bpo-27929: resolve names only for AF_INET/AF_INET6 with asyncio (GH-32131)Miss Islington (bot)2022-03-281-1/+2
| | | | | | Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> (cherry picked from commit 5c30388f3c586ba2f33e349e22e5949cb92de621) Co-authored-by: Vincent Bernat <vincent@bernat.ch>
* [3.10] bpo-45997: Fix asyncio.Semaphore re-acquiring order (GH-31910) (#32047)Miss Islington (bot)2022-03-221-6/+10
| | | | | 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>
* bpo-43253: Don't call shutdown() for invalid socket handles (GH-31892)Miss Islington (bot)2022-03-151-1/+1
| | | | | (cherry picked from commit 70155412f1543f100d4aa309b8691cbcabd3e0e1) Co-authored-by: Maximilian Hils <git@maximilianhils.com>
* bpo-46955: Expose asyncio.base_events.Server as asyncio.Server (GH-31760)Miss Islington (bot)2022-03-081-1/+1
| | | | | | | | | 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>
* Inherit asyncio proactor datagram transport from asyncio.DatagramTransport ↵Miss Islington (bot)2022-02-231-1/+2
| | | | | | | | | (GH-31512) (GH-31514) (cherry picked from commit cff4d5c5d29528299ec1ac5b3b3a6f7735577c01) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-46827: pass sock.type to getaddrinfo in sock_connect (GH-31499)Miss Islington (bot)2022-02-221-1/+3
| | | | | | | | 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>
* bpo-46672: fix `NameError` in `asyncio.gather` if type check fails ↵Miss Islington (bot)2022-02-201-1/+2
| | | | | | | | | | (GH-31187) (GH-31440) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> (cherry picked from commit 4ab8167b9c60d1a04b2e3116d0c52db254b68cda) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.10] Raise TypeError if SSLSocket is passed to asyncio transport-based ↵Andrew Svetlov2022-02-202-10/+20
| | | | | | | methods (GH-31442). (GH-31443) (cherry picked from commit 1f9d4c93af380d00bf2e24bc5f5ce662d41504aa) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-46741: Update `asyncio.protocols.BufferedProtocol` docstring (GH-31327) ↵Miss Islington (bot)2022-02-151-4/+0
| | | | | | | | | | (GH-31362) 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> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* bpo-46487: Add `get_write_buffer_limits` to Write and _SSLProtocol ↵Miss Islington (bot)2022-02-012-0/+12
| | | | | | | | 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>
* bpo-26552: Fixed case where failing `asyncio.ensure_future` did not close ↵Kumar Aditya2022-01-291-2/+8
| | | | the coroutine (#30288) (#31003)
* [3.10] bpo-46469: Make asyncio generic classes return GenericAlias ↵Miss Islington (bot)2022-01-223-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | (GH-30777) (#30784) * bpo-46469: Make asyncio generic classes return GenericAlias (GH-30777) * bpo-46469: Make asyncio generic classes return GenericAlias * 📜🤖 Added by blurb_it. * Update Misc/NEWS.d/next/Library/2022-01-22-05-05-08.bpo-46469.plUab5.rst Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> (cherry picked from commit ea5b96842e066623a53015d8b2492ed61a5baf96) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> * Fix tests Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-46278: fix typo introduced in GH-30427 (GH-30430) (GH-30431)Miss Islington (bot)2022-01-061-2/+2
| | | | | | | | Automerge-Triggered-By: GH:asvetlov (cherry picked from commit b50e5e916a05df65ab6a255af7624b751e0fe9d1) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* Reflect 'context' arg in 'AbstractEventLoop.call_*()' methods (GH-30427) ↵Miss Islington (bot)2022-01-061-4/+4
| | | | | | | | | (GH-30428) (cherry picked from commit 3e43fac2503afe219336742b150b3ef6e470686f) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-46239: improve error message when importing `asyncio.windows_events` ↵Miss Islington (bot)2022-01-041-0/+5
| | | | | | | | | (GH-30353) (#30388) (cherry picked from commit 5a2a65096c3ec2d37f33615f2a420d2ffcabecf2) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* bpo-37658: Actually return result in race condition (GH-29202)Miss Islington (bot)2021-11-291-6/+2
| | | | | (cherry picked from commit 934a82623793e9d52b85f74d5395d65927a52205) Co-authored-by: Sam Bull <aa6bs0@sambull.org>
* Cleanup a couple of comments left on PR 28775 post-merge. (GH-29079)Miss Islington (bot)2021-10-201-1/+1
| | | | | (cherry picked from commit 1dfac27dffbe771f9d88bd1726f7362ce0341437) Co-authored-by: Gregory P. Smith <greg@krypto.org>
* bpo-45416: Fix use of asyncio.Condition() with explicit Lock objects (GH-28850)Miss Islington (bot)2021-10-101-2/+0
| | | | | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> (cherry picked from commit 1a7892414e654aa5c99efa31db767baba7f4a424) Co-authored-by: Joongi Kim <joongi@lablup.com>
* [3.10] Fix typos in the Lib directory (GH-28775) (GH-28804)Christian Clauss2021-10-072-3/+3
| | | | | | | | Fix typos in the Lib directory as identified by codespell. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>. (cherry picked from commit 745c9d9dfc1ad6fdfdf1d07420c6273ff67fa5be) Co-authored-by: Christian Clauss <cclauss@me.com>
* Trivial typo in docstring (#27504)Miss Islington (bot)2021-07-311-1/+1
| | | | | | | (cherry picked from commit 4b4227b907a262446b9d276c274feda2590a4e6e) Co-authored-by: Jesús Cea <jcea@jcea.es> Co-authored-by: Jesús Cea <jcea@jcea.es>
* bpo-44740: Lowercase "internet" and "web" where appropriate. (GH-27378) ↵Miss Islington (bot)2021-07-261-1/+1
| | | | | | | | (GH-27380) Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 11749e2dc20ad6a76e9a39e948853e89b2b4bbed) Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* [3.10] bpo-43945: [Enum] reduce scope of new format() behavior (GH-26752) Ethan Furman2021-06-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * [Enum] reduce scope of new format behavior Instead of treating all Enums the same for format(), only user mixed-in enums will be affected. In other words, IntEnum and IntFlag will not be changing the format() behavior, due to the requirement that they be drop-in replacements of existing integer constants. If a user creates their own integer-based enum, then the new behavior will apply: class Grades(int, Enum): A = 5 B = 4 C = 3 D = 2 F = 0 Now: format(Grades.B) -> DeprecationWarning and '4' 3.12: -> no warning, and 'B'. (cherry picked from commit f60b07ab6c943fce084772c3c7731ab3bbd213ff) Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
* bpo-44011: Revert "New asyncio ssl implementation (GH-17975)" (GH-25848)Pablo Galindo2021-05-037-721/+467
| | | | This reverts commit 5fb06edbbb769561e245d0fe13002bab50e2ae60 and all subsequent dependent commits.
* bpo-44011: Fix asyncio tests without ssl module (GH-25840)Christian Heimes2021-05-031-1/+2
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-44011: New asyncio ssl implementation (#17975)Andrew Svetlov2021-05-027-467/+720
|
* bpo-43989: Add signal format specifier for unix_events (GH-25769)Roberto Hueso2021-05-011-2/+2
| | | Add format specifier for IntEnum references to avoid 3.12 deprecation warning.
* bpo-39529: Deprecate creating new event loop in asyncio.get_event_loop() ↵Serhiy Storchaka2021-04-254-27/+44
| | | | | | (GH-23554) asyncio.get_event_loop() emits now a deprecation warning when it creates a new event loop. In future releases it will became an alias of asyncio.get_running_loop().
* bpo-41891: ensure asyncio.wait_for waits for task completion (#22461)Richard Kojedzinszky2020-12-181-1/+4
|
* bpo-38323: Add guard clauses in MultiLoopChildWatcher. (#22756)Chris Jerdonek2020-12-161-14/+18
| | | This is a trivial refactor in preparation for a fix for bpo-38323.