Repository navigation
uv.lock: Pyjoyment of Git main at b6d623e, and a timer of uvloop not due before its time - #8
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Tests
|
…modules of asyncio libuv counts a timer in whole milliseconds of a clock that it rounds down, so a timer of uvloop was due up to a millisecond early by time.monotonic, which failed the tests of Pyjo.Steps of Pyjoyment now and then. _Loop.call_later rounds the delay up, as MagicStack/uvloop#755 does. event_loop_modules stays the one of Pyjo.Reactor.Asyncio: the loop of uvloop makes no frames of Python below a callback (#7). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Documentation build overview
|
This was referenced Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
uv.locktakes Pyjoyment of Gitmainat b6d623e, with pyjoyment/Pyjoyment#534, which #7 needs. Its new tests ofPyjo.Stepsfailed on the reactor now and then, as a timer of uvloop was due up to a millisecond early, which_Loopfixes.Closes #7
Changes
uv.lock: Pyjoyment 5fe4702 → b6d623e of Gitmain, among others:event_loop_modulesofPyjo.Reactor, and finalizers deferred below the frames of a reactor of another distribution or of its event loopPyjo.Steps, whose tests measure aSleepwithtime.monotonicPyjo/Reactor/Uvloop.py:_Loop.call_later, whichcall_atof uvloop calls too, rounds the delay up to a millisecond and adds one. libuv counts a timer in whole milliseconds ofuv_now, its clock rounded down, so a timer, asasyncio.sleep, was due up to 1 ms before its time bytime.monotonic, where the loop of asyncio is never early: on CIt/docs/Steps.pyfailed on Python 3.12 andt/Pyjo/Steps.pyon 3.13. That is uvloop may sleep less thannfor asyncio.sleep(n) MagicStack/uvloop#739, which Fix timers firing up to 1ms early MagicStack/uvloop#755 fixes the same way, not released yet.t/Reactor_Uvloop.py: a subtest of 150 timers of 2 ms each, of the reactor,call_later,call_atandasyncio.sleep, which started anywhere within a millisecond; it failed on every run before the fix on macOS, with 1.16 ms the shortest.AGENTS.md: the rounding of the timers, and whyevent_loop_modulesstays('asyncio', 'selectors')(event_loop_modules of Pyjo.Reactor, so that finalizers defer their cleanups below the frames of the event loop #7): the loop of uvloop is compiled with Cython and makes no frames of Python, and below the code thatuvloop.runruns, the one place with frames ofuvloop/__init__.py, isasyncio/runners.py.Validation
t/of the repository withPYTHONDEVMODE=1PYTHONDEVMODE=1, on macOS: 434 files, 7320 tests passPyjo.Reactor._finalizeover that suite: no frame of uvloop below any of its 4265 calls in 198 processes,t/stdlib/IOLoop_gc.pyamong themtrunk check, and the documentation withsphinx-build -WTestspasses🤖 Generated with Claude Code