Repository navigation
Update minimum python version (3.9) in pyproject.toml and docs - #740
Closed
hikinggrass wants to merge 2 commits into
Closed
hikinggrass wants to merge 2 commits into
hikinggrass wants to merge 2 commits into
Conversation
Signed-off-by: Kai-Uwe Hermann <kai-uwe.hermann@pionix.de>
Contributor
Author
|
I just saw the commit that added sphinx 8.x as a dependency mentioning python 3.11 as a minimum for development going forward. Then this should probably just be reflected in the docs. Looks like the CI Tests for 3.8 etc. currently also use 3.12 (eg https://github.com/mobilityhouse/ocpp/actions/runs/16022303628/job/45201948389 ) maybe that's why this wasn't detected yet |
Collaborator
|
@hikinggrass thanks for this can you run |
mdwcrft
added a commit
that referenced
this pull request
Oct 2, 2026
…from tests (#768) ### The problem The CI matrix has not been testing the Python versions it claims to. The `setup-python-build-env` composite action installs Poetry via `pipx`, and Poetry then builds the project virtualenv from **pipx's own interpreter**, not the one selected by `actions/setup-python`. Every matrix job — including the "3.8" one — has actually been running against the runner's default Python (3.12). This was spotted by @hikinggrass in the #740 discussion, with a job run demonstrating it: https://github.com/mobilityhouse/ocpp/actions/runs/16022303628/job/45201948389 Practical consequence: the matrix has never genuinely verified support below 3.11, which is how the classifier/`requires_python` drift shipped in 2.1.0 without any red CI. ### The fix **`.github/workflows/pull-request.yml`** - After `setup-python`, run `poetry env use "$(which python)"` so the project venv is built from the matrix interpreter - Add a **verification step** that asserts `sys.version_info` inside the venv matches `matrix.version` — the matrix can no longer silently lie; if the binding ever regresses, the job fails loudly - Trim the matrix to `3.11 / 3.12 / 3.13` — the range `pyproject.toml` actually declares (`^3.11`). The 3.8–3.10 jobs are removed rather than fixed because, once honest, they *cannot* pass today (`poetry install` refuses interpreters outside the project's range). They return in the follow-up to #740 when the floor is genuinely lowered. - Split lint out of the matrix: a single `lint` job on 3.13 runs black/isort/flake8; matrix jobs run only the test suite. Lint results don't vary by interpreter, and this also unblocks the #740 follow-up where lint tools (black 26 ≥3.10, sphinx ≥3.11) won't be installed on older-Python jobs. **`Makefile`** - `tests` split into `lint` and `unit-tests` targets; `make tests` runs both, so local usage is unchanged **`.github/workflows/publish-to-pypi.yml`** - Pinned interpreter bumped 3.10 → 3.13 — it was *below* the package's own `^3.11` floor and only worked via the same pipx accident — and Poetry is bound with `poetry env use` the same way ### Verification - `make tests` (lint + 181 tests) passes locally through the new targets - The interpreter assertion one-liner validated standalone - This PR's own CI run exercises the new workflow ### Sequencing This is deliberately infrastructure-only — no `pyproject.toml` changes. It merges first so the matrix is trustworthy *before* the Python-floor change: the follow-up to #740 (lower floor to `^3.9`, lockfile regen, dev-dependency markers) will extend the matrix to 3.9/3.10, and its green checks will then actually mean the suite runs on those interpreters. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
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.
Changes included in this PR
Current behavior
pyproject.tomlstate that a minimum of python 3.8 is supportedtool.poetry.dependenciesrequires python 3.11pip index versions ocppand not being available to install (by default) ob Ubuntu 22.04, which ships python 3.10New behavior
Impact
Checklist