Skip to content

chore(ci): move CI to Python 3.14 and bump the HA test harness - #775

Merged
tempus2016 merged 2 commits into
mainfrom
chore/ci-python-314
Aug 11, 2026
Merged

chore(ci): move CI to Python 3.14 and bump the HA test harness#775
tempus2016 merged 2 commits into
mainfrom
chore/ci-python-314

Conversation

@tempus2016

Copy link
Copy Markdown
Owner

Why

Dependabot PR #773 (pytest-homeassistant-custom-component 0.13.205 → 0.13.348) cannot pass. It fails at pip install, not on any test signal:

ERROR: No matching distribution found for pytest-homeassistant-custom-component==0.13.348

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.txt already 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" in tests.yml, lint.yml, data-checks.yml (both jobs) and workflow-lint.yml
  • pytest-homeassistant-custom-component 0.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 this

What deliberately did not change

The ruff target-version stays at py312. It describes the runtime the shipped integration must support — hacs.json still declares a 2024.1.0 HA floor — not the interpreter CI happens to run on. Raising it to py314 lets 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

  • Full suite locally: 1540 passed (Python 3.11, matching the count on main)
  • ruff check and ruff format --check over custom_components/taskmate tests scripts: clean
  • The 3.14 run is what this PR exists to prove — merge is gated on the "Run tests" check going green here

Supersedes #773, which should auto-close once this lands.

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.
@github-actions github-actions Bot added the ci CI, workflows, and tooling label Aug 11, 2026
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.
@github-actions github-actions Bot added the tests Test suite label Aug 11, 2026
@tempus2016
tempus2016 merged commit 3c73cef into main Aug 11, 2026
15 checks passed
@tempus2016
tempus2016 deleted the chore/ci-python-314 branch August 11, 2026 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI, workflows, and tooling tests Test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant