Skip to content

[CI] Tests only run on Python 3.10 while the package supports 3.10+ #156

Description

@V2arK

setup.py declares python_requires=">=3.10" and the wheel is py3-none-any,
so the supported range is 3.10 through whatever is current. CI only ever runs
3.10.

Workflow Python
unit_tests.yml 3.10
lint.yml 3.10
publish.yml 3.11

Support for 3.12 was widened deliberately: #87 was a user reporting they could
not install the package, and #88 (2025-03-18) changed python_requires from
"<3.12" to ">=3.10". That PR touched setup.py only — CI was never
extended to cover the versions we had just started supporting.

The concrete miss

centml/sdk/utils/client_certs.py called datetime.utcnow() from June 2024
until #154 landed this week. CPython started emitting a DeprecationWarning
for it in 3.12, so:

  • a developer running 3.12 locally saw four warnings per certificate generation
  • CI on 3.10 saw none, every run, for fifteen months

A user on 3.12 with -W error or pytest's filterwarnings = error would have
hit a hard failure that CI could not have caught.

Suggestion

Give the test workflow a matrix so the declared floor and the versions users
actually run are both exercised:

strategy:
  matrix:
    python-version: ["3.10", "3.12"]
steps:
  - uses: actions/setup-python@v3
    with:
      python-version: ${{ matrix.python-version }}

3.13 is worth considering too. Lint and typecheck are lower value to matrix —
they mostly re-check the same source — but the test job is where a
version-specific behaviour difference would surface.

Worth noting separately: publish.yml builds on 3.11, a version no job ever
tests on. Harmless for a pure-Python py3-none-any wheel, but it means the
published artefact is produced by an interpreter that never ran the suite.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions