aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/asyncio
Commit message (Collapse)AuthorAge
* gh-86513: improve docs of loop.call_exception_handler (#132466)Kumar Aditya2025-04-13
|
* gh-130322: drop deprecation of `asyncio.set_event_loop` (#132349)Kumar Aditya2025-04-12
|
* gh-132307: Remove unnecessary check in `asyncio/base_events.py` (#132324)Stan Ulbrych2025-04-10
|
* gh-131325: fix sendfile fallback implementation to drain data after writing ↵Kumar Aditya2025-03-18
| | | | to transport (#131376)
* gh-128002: use efficient linked list implementation for eager tasks in ↵Kumar Aditya2025-03-03
| | | | asyncio (#130518)
* gh-129874: avoid mixing pure python and C impl in eager execution (#130515)Kumar Aditya2025-02-24
|
* gh-128231: Use `runcode()` return value for failing early (GH-129488)Bartosz Sławecki2025-02-24
|
* gh-129898: per-thread current task implementation in asyncio (#129899)Kumar Aditya2025-02-19
| | | | | | | Store the current running task on the thread state, it makes it thread safe for the free-threading build and while improving performance as there is no lock contention, this effectively makes it lock free. When accessing the current task of the current running loop in current thread, no locking is required and can be acessed without locking. In the rare case of accessing current task of a loop running in a different thread, the stop the world pauses is used in free-threading builds to stop all other running threads and find the task for the specified loop. This also makes it easier for external introspection to find the current task, and now it will be always correct.
* gh-130145: fix `loop.run_forever` when loop is already running (#130146)Kumar Aditya2025-02-15
|
* gh-129874: avoid mixing pure python and C implementation of asyncio (#129875)Kumar Aditya2025-02-09
|
* gh-115514: Fix incomplete writes after close while using ssl in asyncio(#128037)Vojtěch Boček2025-02-02
| | | Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-129403: Fix `ValueError` messages in `asyncio.Barrier` and ↵Stan Ulbrych2025-01-30
| | | | | `threading.Barrier` (#129419) Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
* gh-129195: use `future_add_to_awaited_by/future_discard_from_awaited_by` in ↵Thomas Grainger2025-01-26
| | | | | `asyncio.staggered.staggered_race` (#129253) Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-128479: fix asyncio staggered race leaking tasks, and logging unhandled ↵Thomas Grainger2025-01-23
| | | | | exception.append exception (#128475) Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
* GH-91048: Add utils for capturing async call stack for asyncio programs and ↵Yury Selivanov2025-01-22
| | | | | | | | | | | enable profiling (#124640) Signed-off-by: Pablo Galindo <pablogsal@gmail.com> Co-authored-by: Pablo Galindo <pablogsal@gmail.com> Co-authored-by: Kumar Aditya <kumaraditya@python.org> Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com> Co-authored-by: Jacob Coffee <jacob@z7x.org> Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* gh-128588: gh-128550: remove eager tasks optimization that missed and ↵Thomas Grainger2025-01-20
| | | | | introduced incorrect cancellations (#129063) Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-128308: pass `**kwargs` to asyncio task_factory (#128768)Thomas Grainger2025-01-20
| | | Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-128916: Do not set `SO_REUSEPORT` on non-`AF_INET*` sockets (GH-128933)Michał Górny2025-01-17
| | | | | | | | | | | | | | | * gh-128916: Do not set `SO_REUSEPORT` on non-`AF_INET*` sockets Do not attempt to set ``SO_REUSEPORT`` on sockets of address familifies other than ``AF_INET`` and ``AF_INET6``, as it is meaningless with these address families, and the call with fail with Linux kernel 6.12.9 and newer. * Apply suggestions from code review Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk> --------- Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
* Fix typo in `Lib/asyncio/futures.py` (#128819)Wang Ran (汪然)2025-01-15
|
* gh-128552: fix refcycles in eager task creation (#128553)Thomas Grainger2025-01-07
|
* gh-128559: Remove typing import from asyncio.timeouts (#128560)Michael H2025-01-06
|
* gh-128340: add thread safe handle for `loop.call_soon_threadsafe` (#128369)Kumar Aditya2025-01-06
| | | Adds `_ThreadSafeHandle` to be used for callbacks scheduled with `loop.call_soon_threadsafe`.
* gh-127529: Correct asyncio's `accept_connection` behaviour for handling ↵jb21702025-01-03
| | | | | `ConnectionAbortedError` (#127532) Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* Mention loop_factory argument in docstring for asyncio.run() (#128288)Andrew Svetlov2024-12-27
|
* gh-127949: deprecate `asyncio.set_event_loop` (#128218)Kumar Aditya2024-12-24
| | | Deprecate `asyncio.set_event_loop` to be removed in Python 3.16.
* gh-127949: deprecate asyncio policy classes (#128216)Kumar Aditya2024-12-24
|
* gh-127949: deprecate `asyncio.get_event_loop_policy` (#128053)Kumar Aditya2024-12-18
| | | This deprecates `asyncio.get_event_loop_policy` and will be removed in Python 3.16.
* gh-127949: deprecate `asyncio.set_event_loop_policy` (#128024)Kumar Aditya2024-12-18
| | | | First step towards deprecating the asyncio policy system. This deprecates `asyncio.set_event_loop_policy` and will be removed in Python 3.16.
* gh-127655: Ensure `_SelectorSocketTransport.writelines` pauses the protocol ↵J. Nick Koston2024-12-06
| | | | | | | if needed (#127656) Ensure `_SelectorSocketTransport.writelines` pauses the protocol if it reaches the high water mark as needed. Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-126353: remove implicit creation of loop from `asyncio.get_event_loop` ↵Kumar Aditya2024-11-04
| | | | | (#126354) Remove implicit creation of loop from `asyncio.get_event_loop`. This is a step forward of deprecating the policy system of asyncio.
* gh-118950: Fix SSLProtocol.connection_lost not being called when OSError is ↵Javad Shafique2024-10-24
| | | | | | | thrown (#118960) Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-124958: Revert "gh-125472: Revert "gh-124958: fix asyncio.TaskGroup and ↵Thomas Grainger2024-10-14
| | | | | | | | | _PyFuture refcycles ... (#125486) * Revert "gh-125472: Revert "gh-124958: fix asyncio.TaskGroup and _PyFuture refcycles (#12… (#125476)" This reverts commit e99650b80ace3893c2a80b3f2a4aca99cb305191. * fix incompatability with gh-124392
* gh-125472: Revert "gh-124958: fix asyncio.TaskGroup and _PyFuture refcycles ↵Kirill Podoprigora2024-10-14
| | | | | | | (#12… (#125476) Revert "gh-124958: fix asyncio.TaskGroup and _PyFuture refcycles (#124959)" This reverts commit d5dbbf4372cd3dbf3eead1cc70ddc4261c061fd9.
* gh-124958: fix asyncio.TaskGroup and _PyFuture refcycles (#124959)Thomas Grainger2024-10-14
|
* gh-124309: fix staggered race on eager tasks (#124847)Thomas Grainger2024-10-11
| | | | | | | This patch is entirely by Thomas and Peter Co-authored-by: Thomas Grainger <tagrain@gmail.com> Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
* gh-124858: fix happy eyeballs refcyles (#124859)Thomas Grainger2024-10-02
|
* gh-124594: Create and reuse the same context for the entire asyncio REPL ↵Bartosz Sławecki2024-10-01
| | | | | session (#124595) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* gh-124309: Revert eager task factory fix to prevent breaking downstream ↵Peter Bierma2024-09-30
| | | | | | | | | | | (#124810) * Revert "GH-124639: add back loop param to staggered_race (#124700)" This reverts commit e0a41a5dd12cb6e9277b05abebac5c70be684dd7. * Revert "gh-124309: Modernize the `staggered_race` implementation to support eager task factories (#124390)" This reverts commit de929f353c413459834a2a37b2d9b0240673d874.
* GH-124639: add back loop param to staggered_race (#124700)Kumar Aditya2024-09-29
|
* gh-120284: Enhance `asyncio.run` to accept awaitable objects (#120566)Ron Frederick2024-09-26
| | | | Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-124309: Modernize the `staggered_race` implementation to support eager ↵Peter Bierma2024-09-26
| | | | | | | | task factories (#124390) Co-authored-by: Thomas Grainger <tagrain@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Carol Willing <carolcode@willingconsulting.com> Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-120221: Support KeyboardInterrupt in asyncio REPL (#123795)Łukasz Langa2024-09-06
| | | | | | | | | This switches the main pyrepl event loop to always be non-blocking so that it can listen to incoming interruptions from other threads. This also resolves invalid display of exceptions from other threads (gh-123178). This also fixes freezes with pasting and an active input hook.
* gH-80788: remove old weakset workaround for thread safety (#123388)Kumar Aditya2024-08-27
|
* Fix typo mentioning threads instead of tasks (#123203)Kevin Evans2024-08-23
|
* gh-122858: Deprecate `asyncio.iscoroutinefunction` (#122875)Wulian2024-08-11
| | | | | Deprecate `asyncio.iscoroutinefunction` in favor of `inspect.iscoroutinefunction`. Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-121913: Use str(exc) instead of exc.strerror in `asyncio.base_events` ↵AN Long2024-07-25
| | | | (#122269)
* gh-121957: Emit audit events for `python -i` and `python -m asyncio` (GH-121958)Łukasz Langa2024-07-22
| | | | Relatedly, emit the `cpython.run_startup` event from the Python version of `PYTHONSTARTUP` handling.
* gh-121790: Fix interactive console initialization (#121793)Milan Oberkirch2024-07-16
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* fix outdated comments in asyncio (#121783)Kumar Aditya2024-07-15
|
* gh-121711: Set `-m asyncio` return_code to 1 for ENOTTY (#121714)Milan Oberkirch2024-07-13
| | | Set return_code to 1 for ENOTTY