Skip to content

feat: require Python 3.11 or later - #152

Draft
bluetoothbot wants to merge 2 commits into
Bluetooth-Devices:mainfrom
bluetoothbot:koan/require-python-3.11
Draft

bluetoothbot wants to merge 2 commits into
Bluetooth-Devices:mainfrom
bluetoothbot:koan/require-python-3.11

Conversation

@bluetoothbot

@bluetoothbot bluetoothbot commented Oct 24, 2026 •

Copy link
Copy Markdown

What: Raise the supported Python floor from ^3.9 to >=3.11 so it matches what CI actually tests.

Why:

  • The wheel currently advertises Requires-Python: >=3.9,<4.0, but the CI matrix is 3.11–3.13. 3.9 and 3.10 have never been tested here.
  • 3.9 has been EOL since October 2025, and 3.10 reaches EOL this month. The sibling Bluetooth-Devices parsers already require 3.10 or 3.11+, and Home Assistant requires 3.13.
  • It also unblocks perf: add slots=True to value and device dataclasses #142: dataclass(slots=True) needs Python 3.10+, so that PR would break the 3.9 support this package currently claims.

How:

  • pyproject.toml: python = ">=3.11". The built wheel now has Requires-Python: >=3.11 and auto classifiers for 3.11–3.14.
  • poetry.lock: only python-versions and content-hash change, and no package versions move. I computed the hash offline with Poetry's own Locker._get_content_hash(). As a check, the same call on main reproduces the hash committed there exactly. poetry check --lock passes, and fails if the hash is wrong. Any future poetry lock will also drop the now-unreachable <3.11 entries (exceptiongroup, zipp, importlib-metadata).
  • .readthedocs.yml: 3.9/ubuntu-20.04 → 3.13/ubuntu-24.04. Without this, RTD's pip install .[docs] on 3.9 would reject the package and the docs build would fail.
  • .pre-commit-config.yaml: pyupgrade --py37-plus → --py311-plus. The only rewrite it makes is List[Any] → list[Any] in docs/source/conf.py, which is committed separately.

Testing:

Release note for the maintainer: I used feat: (minor bump), matching how bluetooth-adapters and bluetooth-auto-recovery dropped 3.9. If you'd rather mark the floor change as breaking, change it to feat!:.

🤖 Generated with Claude Code

pyproject.toml declared `python = "^3.9"`, so the published wheel
advertises Requires-Python >=3.9,<4.0, but CI has only tested 3.11-3.13.
Python 3.9 reached end of life in October 2025 and 3.10 does so this
month; the sibling Bluetooth-Devices parsers that consume this library
already require 3.10/3.11+, and Home Assistant requires 3.13.

- pyproject.toml: python = ">=3.11" (matches the CI floor). Poetry now
  emits Requires-Python >=3.11 and classifiers 3.11-3.14.
- poetry.lock: python-versions and content-hash updated. The hash was
  computed with Poetry's own Locker._get_content_hash() (the same call
  reproduces main's committed hash exactly); `poetry check --lock`
  passes. No package versions change.
- .readthedocs.yml: build on Python 3.13 / ubuntu-24.04 instead of
  3.9 / ubuntu-20.04. With the new floor, RTD's `pip install .[docs]`
  on 3.9 would reject the package before Sphinx runs.
- .pre-commit-config.yaml: pyupgrade --py311-plus (was --py37-plus);
  it produces no rewrites on the current tree.
@codecov

codecov Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.37%. Comparing base (31bd826) to head (325152c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #152   +/-   ##
=======================================
  Coverage   94.37%   94.37%           
=======================================
  Files          12       12           
  Lines         480      480           
  Branches        5        5           
=======================================
  Hits          453      453           
  Misses         26       26           
  Partials        1        1           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
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.

1 participant