Repository navigation
Tests: a sleep of Pyjo.Steps measured by time.monotonic of Windows before Python 3.13, a tick of 15.6 milliseconds - #558
Merged
Merged
Conversation
…fore Python 3.13, a tick of 15.6 milliseconds Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Tests
|
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.
The sleeps of
t/Pyjo/Steps.py, blocking and non-blocking, failed on Pyjo.Reactor.Winloop with Python 3.12 on Windows, in the dispatch of its Tests with Pyjoyment ofmain(run):slept, blockingandslept, non-blocking, while 3.13 and later passed.time.monotonicof Windows before Python 3.13 isGetTickCount64, whose resolution is 15.6 milliseconds, so a time that it measures may be a tick short, even oftime.sleep, which is never early; Python 3.13 changed it toQueryPerformanceCounter. The jobs of Windows of Pyjoyment run the Python of mise only, so they do not see it. The cause is the clock of the test, not Pyjoyment.Changes
t/Pyjo/Steps.py: the sleeps take the resolution oftime.monotonicfromtime.get_clock_infooff their bound, a tick of 15.6 milliseconds on Windows before Python 3.13 and less than a microsecond elsewhere, with the margin of Tests: a sleep of Pyjo.Steps on an event loop of libuv, whose timer may be due a millisecond early #553 for the timers of libuv.t/docs/Steps.pyis skipped on Windows.t/stdlib/Reactor_Asyncio.pyhas a margin of 10 milliseconds, less than a tick, and has not failed, so it stays.Validation
t/Pyjo/Steps.pywithPYTHONDEVMODE=1on the default reactor, Pyjo.Reactor.Poll, Pyjo.Reactor.Asyncio and Pyjo.Reactor.Uvloop, on macOStrunk checkpyjoyment-refof this branch, Python 3.12 on Windows🤖 Generated with Claude Code