Skip to content

dynamically test Python versions based on Python version pins in metadata #325

@zacharyburnett

Description

@zacharyburnett

Currently, the Python versions defined in our CI workflows are defined by passing a static list of envs to .github/workflows/tox.yml. These need to be manually updated when 1) new Python versions are released as latest, and 2) we drop support for old versions of Python.

Possibly as an alternative to envs:, we could add a flag (supported_pythons?) that does the following:

  1. retrieve the oldest and latest major versions of Python supported by the project, based on pins in pyproject.toml project.requires-python
    • to start, this only needs to consider the metadata of the top-level project, but perhaps we could also scan dependencies?
  2. build a matrix on-the-fly of each major version of Python between the oldest and latest. For instance, if the oldest supported version of the package is Python 3.11, and the latest is Python 3.14, then the test matrix would be 3.11, 3.12, 3.13, 3.14

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