Skip to content

fix: lift Python <3.13 cap so the package installs on Python 3.13/3.14#220

Merged
Flix6x merged 3 commits into
mainfrom
fix/lift-python-version-cap
Jul 12, 2026
Merged

fix: lift Python <3.13 cap so the package installs on Python 3.13/3.14#220
Flix6x merged 3 commits into
mainfrom
fix/lift-python-version-cap

Conversation

@Flix6x

@Flix6x Flix6x commented Jul 12, 2026

Copy link
Copy Markdown
Member

Problem

The uv migration (#177) made 0.9.x uninstallable inside Home Assistant, in two ways:

  1. requires-python = ">=3.10, <3.13" — pip honors requires_python, and HA runs Python 3.14 (as of 2026.7). 0.9.0–0.9.2 cannot be installed on Python 3.13+ at all.
  2. Dependency floors that conflict with HA's exact pins (homeassistant/package_constraints.txt):
    • async-timeout>=5.0.1 vs HA 2026.7's async-timeout==4.0.3 → conflict on current HA
    • aiohttp>=3.13.3 vs e.g. HA 2025.1's aiohttp==3.11.11
    • urllib3>=2.7.0 vs older HA's urllib3<2 (and urllib3 is not even a direct dependency — only transitive via requests in the s2 extra)
    • requests>=2.32.5 vs e.g. HA 2025.1's requests==2.32.3

This blocks pinning any 0.9.x release in the FlexMeasures HA integration manifest (context: a pilot had to revert the integration's v0.3.7 over a related dependency mismatch).

Changes

  • requires-python = ">=3.10" (cap dropped), 3.13/3.14 classifiers added
  • Floors relaxed to what the code needs rather than what uv locked at migration time: aiohttp>=3.8.1, async-timeout>=4.0.1, packaging>=23.1, requests>=2.31.0, tzdata>=2023.3; urllib3 floor removed (transitive-only; our dev/test lockfile still resolves a patched version)
  • uv.lock re-resolved (adds 3.13/3.14 wheels; no version bumps)
  • CI: test matrix extended with 3.13 and 3.14; the S2 job now runs on 3.10 and 3.14 (3.14 matching the HA runtime)
  • test_get_sensor_data made robust to pandas ISO-8601-duration rendering and yarl requote differences (it hardcoded one exact URL encoding)

Verification

  • Full suite incl. S2: 183 passed on Python 3.14 against the current lock
  • Full suite incl. S2: 183 passed on Python 3.12 against HA 2025.1-era pins (aiohttp 3.11.11, async-timeout 4.0.3, urllib3 1.26.20, requests 2.32.3, pandas 2.2.3, packaging 23.1), validating the floors are real

Intended to ship as v0.9.3 so the HA integration can pin it.

🤖 Generated with Claude Code

The uv migration (#177) introduced requires-python = ">=3.10, <3.13",
which blocks installation on current Python — notably inside Home
Assistant (Python 3.14), where pip refuses to install the package for
the FlexMeasures HA integration. Lift the cap, declare 3.13/3.14
support, and extend the CI matrix accordingly (S2 suite now also runs
on 3.14, matching the HA runtime).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Signed-off-by: F.N. Claessen <felix@seita.nl>
@coveralls

coveralls commented Jul 12, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 29181797528

Coverage remained the same at 96.359%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 714
Covered Lines: 688
Line Coverage: 96.36%
Coverage Strength: 4.82 hits per line

💛 - Coveralls

Flix6x added 2 commits July 12, 2026 07:36
…sistant

Home Assistant pins these packages to exact versions, so the floors
introduced by the uv migration made 0.9.x uninstallable there:
async-timeout>=5.0.1 conflicts with HA 2026.7 (pins 4.0.3), and
aiohttp>=3.13.3, urllib3>=2.7.0 (<2 on older HA) and requests>=2.32.5
conflict with HA up to ~2025. urllib3 is dropped entirely: it is not a
direct dependency (only transitive via requests in the s2 extra), and
our own dev/test resolution still picks up a patched version via the
lockfile.

test_get_sensor_data now matches the request by regex and compares
query params semantically, since pandas versions differ in how they
render ISO 8601 durations and yarl versions differ in requote behavior.
Verified: full suite passes against HA 2025.1-era pins (aiohttp 3.11.11,
async-timeout 4.0.3, urllib3 1.26, pandas 2.2.3, packaging 23.1) and
against the current lock on Python 3.14.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Signed-off-by: F.N. Claessen <felix@seita.nl>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Signed-off-by: F.N. Claessen <felix@seita.nl>
@Flix6x
Flix6x merged commit 97679c6 into main Jul 12, 2026
17 checks passed
@Flix6x
Flix6x deleted the fix/lift-python-version-cap branch July 12, 2026 10:23
@Flix6x Flix6x self-assigned this Jul 13, 2026
Flix6x added a commit that referenced this pull request Jul 13, 2026
…on Python 3.13/3.14 (#220)

* fix: lift Python <3.13 cap so the package installs on Python 3.13/3.14

The uv migration (#177) introduced requires-python = ">=3.10, <3.13",
which blocks installation on current Python — notably inside Home
Assistant (Python 3.14), where pip refuses to install the package for
the FlexMeasures HA integration. Lift the cap, declare 3.13/3.14
support, and extend the CI matrix accordingly (S2 suite now also runs
on 3.14, matching the HA runtime).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: relax dependency floors that blocked installation inside Home Assistant

Home Assistant pins these packages to exact versions, so the floors
introduced by the uv migration made 0.9.x uninstallable there:
async-timeout>=5.0.1 conflicts with HA 2026.7 (pins 4.0.3), and
aiohttp>=3.13.3, urllib3>=2.7.0 (<2 on older HA) and requests>=2.32.5
conflict with HA up to ~2025. urllib3 is dropped entirely: it is not a
direct dependency (only transitive via requests in the s2 extra), and
our own dev/test resolution still picks up a patched version via the
lockfile.

test_get_sensor_data now matches the request by regex and compares
query params semantically, since pandas versions differ in how they
render ISO 8601 durations and yarl versions differ in requote behavior.
Verified: full suite passes against HA 2025.1-era pins (aiohttp 3.11.11,
async-timeout 4.0.3, urllib3 1.26, pandas 2.2.3, packaging 23.1) and
against the current lock on Python 3.14.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* style: satisfy black

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Signed-off-by: F.N. Claessen <felix@seita.nl>
(cherry picked from commit 97679c6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants