Skip to content

chore: make Python 3.11 the consistently declared minimum - #782

Open
mdwcrft wants to merge 2 commits into
masterfrom
chore/python-311-minimum
Open

mdwcrft wants to merge 2 commits into
masterfrom
chore/python-311-minimum

Conversation

@mdwcrft

@mdwcrft mdwcrft commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Since 2.1.0, pyproject.toml has required python = "^3.11", but the rest of the repo disagrees:

  • The classifiers still list 3.8, 3.9 and 3.10.
  • docs/source/installation.rst says "Python 3.7 or higher".

This mismatch is what #740 reported: on 3.10 (for example Ubuntu 22.04), pip silently skips 2.1.0 even though the metadata and docs say 3.10 is supported.

Decision: keep the 3.11 minimum rather than lowering it

#740 proposed lowering the minimum to 3.9. We're not doing that:

  • 3.9 reached end-of-life in October 2025, and 3.10 reaches it in October 2026.
  • Lowering the minimum would mean dependency markers and keeping old tooling working (sphinx 8 needs ≥3.11, black 26 needs ≥3.10) for interpreters that no longer get security fixes.
  • Users on older Pythons can still install older ocpp releases, because pip only picks releases whose requires-python matches the running interpreter.

Policy, now written in the docs: support every CPython version that has not reached end-of-life. Add new versions when they're released, and drop a version in the first minor release after it reaches end-of-life.

Changes

  • pyproject.toml:

    • Classifiers are now 3.11–3.14 plus Python :: 3 :: Only.
    • Removed a stale comment about Python 3.8 and asynctest.
  • docs/source/installation.rst: changed to "Python 3.11 or higher" and added a "Supported Python versions" section with the policy above.

  • .github/workflows/pull-request.yml: added 3.14 to the test matrix (the matrix checks the interpreter since ci: run the test matrix on the actual matrix interpreter, split lint from tests #768). The lint job now runs on 3.14.

  • .github/workflows/publish-to-pypi.yml: publishes using 3.14.

  • poetry.lock: bumped rpds-py 0.20.1 → 2026.6.3 (a transitive dependency via jsonschema/referencing) and markupsafe 3.0.2 → 3.0.4. Neither old version has 3.14 wheels, and building rpds-py from source fails on 3.14 because its bundled PyO3 only supports up to 3.13. No direct dependencies changed.

Verification

  • make tests (lint + 184 tests) passes locally in fresh Poetry venvs bound to 3.11 and 3.14, with the interpreter and the rpds-py version confirmed inside each venv.
  • On 3.14, pytest-asyncio 0.26 emits asyncio.*_event_loop_policy deprecation warnings. They come from the test dependency, not from ocpp, and can be handled in a separate dev-dependency bump.
  • The built wheel's metadata has Requires-Python: >=3.11,<4.0 and classifiers for 3.11–3.14 only.

Supersedes #740.

🤖 Generated with Claude Code

requires-python has been ^3.11 since 2.1.0, but the classifiers still
advertised 3.8-3.10 and the docs said 3.7+. Align everything on 3.11+:

- classifiers: drop 3.8-3.10, add 3.14 and "3 :: Only"
- docs: state 3.11+ and document the supported-versions policy
  (follow CPython EOL)
- CI: add 3.14 to the test matrix; lint and publish run on 3.14
- drop a stale comment about Python 3.8/asynctest

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
rpds-py 0.20.1 (transitive via jsonschema/referencing) and markupsafe
3.0.2 ship no cp314 wheels; rpds-py's source build fails on 3.14
because its bundled PyO3 tops out at 3.13. Bump to versions with
3.14 wheels.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant