From c772a0050e4e55d2a849124b540a67a75fd5a3c3 Mon Sep 17 00:00:00 2001 From: "bar.harel" Date: Sat, 16 Aug 2025 15:39:46 +0100 Subject: [PATCH 1/2] doc fix --- Doc/library/asyncio-eventloop.rst | 12 ++++++++++++ .../2025-08-16-15-36-30.gh-issue-127859.CdXB5S.rst | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 Misc/NEWS.d/next/Documentation/2025-08-16-15-36-30.gh-issue-127859.CdXB5S.rst diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst index 9561c40776f01c..0ccc7a2b4482ec 100644 --- a/Doc/library/asyncio-eventloop.rst +++ b/Doc/library/asyncio-eventloop.rst @@ -304,6 +304,12 @@ clocks to track time. custom :class:`contextvars.Context` for the *callback* to run in. The current context is used when no *context* is provided. + .. note:: + + For performance, callbacks scheduled with :meth:`loop.call_later` + may run up to one clock-resolution early (see + ``time.get_clock_info('monotonic').resolution``). + .. versionchanged:: 3.7 The *context* keyword-only parameter was added. See :pep:`567` for more details. @@ -324,6 +330,12 @@ clocks to track time. An instance of :class:`asyncio.TimerHandle` is returned which can be used to cancel the callback. + .. note:: + + For performance, callbacks scheduled with :meth:`loop.call_at` + may run up to one clock-resolution early (see + ``time.get_clock_info('monotonic').resolution``). + .. versionchanged:: 3.7 The *context* keyword-only parameter was added. See :pep:`567` for more details. diff --git a/Misc/NEWS.d/next/Documentation/2025-08-16-15-36-30.gh-issue-127859.CdXB5S.rst b/Misc/NEWS.d/next/Documentation/2025-08-16-15-36-30.gh-issue-127859.CdXB5S.rst new file mode 100644 index 00000000000000..1aa8d4edc7a0ec --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2025-08-16-15-36-30.gh-issue-127859.CdXB5S.rst @@ -0,0 +1,2 @@ +:meth:`asyncio.loop.call_at` and :meth:`asyncio.loop.call_later` now +correctly state that they may wake up early. Patch by Bar Harel. From b87f7c10e3a9463474341b990da2508db5bd4152 Mon Sep 17 00:00:00 2001 From: Bar Harel Date: Sun, 17 Aug 2025 16:35:07 +0100 Subject: [PATCH 2/2] Delete Misc/NEWS.d/next/Documentation/2025-08-16-15-36-30.gh-issue-127859.CdXB5S.rst --- .../2025-08-16-15-36-30.gh-issue-127859.CdXB5S.rst | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 Misc/NEWS.d/next/Documentation/2025-08-16-15-36-30.gh-issue-127859.CdXB5S.rst diff --git a/Misc/NEWS.d/next/Documentation/2025-08-16-15-36-30.gh-issue-127859.CdXB5S.rst b/Misc/NEWS.d/next/Documentation/2025-08-16-15-36-30.gh-issue-127859.CdXB5S.rst deleted file mode 100644 index 1aa8d4edc7a0ec..00000000000000 --- a/Misc/NEWS.d/next/Documentation/2025-08-16-15-36-30.gh-issue-127859.CdXB5S.rst +++ /dev/null @@ -1,2 +0,0 @@ -:meth:`asyncio.loop.call_at` and :meth:`asyncio.loop.call_later` now -correctly state that they may wake up early. Patch by Bar Harel.