Packaging & linting fixes and general modernisation pass - #267
Open
Gadgetoid wants to merge 10 commits into
Open
Packaging & linting fixes and general modernisation pass#267Gadgetoid wants to merge 10 commits into
Gadgetoid wants to merge 10 commits into
Conversation
- hatchling dynamic optional-dependencies via hatch-requirements-txt - [dependency-groups] dev; ruff import sorting (drop isort/black) - pre-commit + editorconfig; uv-based CI and tox qa - requires-python >= 3.9, classifiers 3.9-3.13 - remove check.sh, requirements-dev.txt, .stickler.yml
'time.time()' uses the system clock, which can jump forwards and backwards, e.g. because the device syncs with a time server. 'time.monotonic()' is stable and will not jump. My specific problem is that I have a picture frame which powers on every so often, fetches another image to display, shows it, and powers off again. It doesn't keep time when powered off (so powers on with the clock in the past), then it syncs with an NTP server at some point shortly after power-on, and the clock jumps forwards. However, this often happens inside the busy polling loop, which means that the loop exits straight away with a timeout. This means that we don't want for the image to be fully displayed before returning.
_refresh_wait arrived with the POF-mid-refresh fix (PR #265) after this branch's time.monotonic() pass, so it still used time.time(). The 65s refresh wait is exactly the loop that must survive a clock jump, so put it on time.monotonic() and give its warnings an explicit stacklevel.
Replaces the raw wait_edge_events + read_edge_events drain in the edge-driven _busy_wait implementations (inky.py, ssd1683, ssd1608, ac073tc1a, uc8159) with gpiodevice.wait_for_edge, preserving each driver's timeout semantics (raise vs warn). Drops the now-unused timedelta import where applicable.
Gadgetoid
force-pushed
the
feature/gpiodevice-edge
branch
from
August 24, 2026 21:03
79d097d to
9acece6
Compare
make check needs an untagged CHANGELOG heading; add 2.4.1. The nopath fixture stripped /usr/lib to hide tkinter, but uv-managed interpreters bundle tkinter elsewhere, so import tkinter still succeeded and the no-tkinter tests hit tkinter.Tk() on a headless runner. Force ImportError via a None entry in sys.modules instead.
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.
Also switches to gpiodevice's new interrupt handling. Needs a release of gpiodevice for CI not to explode.