chore(ci): move CI to Python 3.14 and bump the HA test harness - #775
Merged
Conversation
pytest-homeassistant-custom-component was frozen at 0.13.205 because that was the last release installable on the CI Python (3.12). Dependabot has been reproposing newer releases that can't resolve at all — 0.13.206+ require >=3.13 and 0.13.317+ require >=3.14 — so the bump PRs fail at pip install rather than on any real signal. Move python-version to 3.14 across tests, lint, data-checks and workflow-lint, and take the harness up to 0.13.348 (HA 2026.7.4). ruff's target-version stays at py312 deliberately: it describes the runtime the shipped integration has to support (hacs.json still declares a 2024.1.0 HA floor), not the interpreter CI happens to run on. Raising it would let ruff rewrite code into 3.14-only syntax. Supersedes #773.
The 0.13.348 harness adds a global guard that fails a test at teardown if anything tried to JSON-serialize a mock, even when the code caught the error. Completion signs the evidence photo through async_sign_path, which reads hass.data[...]; against a bare MagicMock that produces an unserializable JWT payload. sign_photo_url already swallows it and returns the URL unsigned — deliberately, so a signing hiccup can't fail a completion — so the assertions passed and only teardown complained. An empty dict makes the lookup miss cleanly and is closer to a real hass anyway. Behaviour under test is unchanged.
This was referenced Aug 11, 2026
Merged
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.
Why
Dependabot PR #773 (
pytest-homeassistant-custom-component0.13.205 → 0.13.348) cannot pass. It fails at pip install, not on any test signal:CI runs Python 3.12. The harness dropped 3.12 at 0.13.206 (needs >=3.13) and 3.13 at 0.13.317 (needs >=3.14), so every bump Dependabot proposes is unresolvable on the current interpreter.
requirements_test.txtalready documented the pin as "newest release compatible with the CI Python (3.12)" — this raises that ceiling instead of freezing the harness indefinitely.What
python-version: "3.12"→"3.14"intests.yml,lint.yml,data-checks.yml(both jobs) andworkflow-lint.ymlpytest-homeassistant-custom-component0.13.205 → 0.13.348 (HA 2026.7.4), with the pin comment rewritten to record both version floors so the next bump does not repeat thisWhat deliberately did not change
The ruff
target-versionstays atpy312. It describes the runtime the shipped integration must support —hacs.jsonstill declares a2024.1.0HA floor — not the interpreter CI happens to run on. Raising it topy314lets pyupgrade rewrite code into 3.14-only syntax, and it reformats 26 files for no benefit (confirmed locally: main is clean under the same ruff, so the churn comes purely from the flag).Verification
ruff checkandruff format --checkovercustom_components/taskmate tests scripts: cleanSupersedes #773, which should auto-close once this lands.