Skip to content

ci: modernize test workflow and fix Python 3.12+ compatibility#153

Open
ChristophNoetel wants to merge 1 commit into
dtcooper:masterfrom
ChristophNoetel:ci/modernize-workflow
Open

ci: modernize test workflow and fix Python 3.12+ compatibility#153
ChristophNoetel wants to merge 1 commit into
dtcooper:masterfrom
ChristophNoetel:ci/modernize-workflow

Conversation

@ChristophNoetel
Copy link
Copy Markdown

Summary

Modernize the CI workflow and fix setup.py to work on current Python versions.

Changes

Workflow:

  • Update actions/checkout v2 to v4, actions/setup-python v2 to v5
  • Drop EOL Python versions (3.7 EOL Jun 2023, 3.8 EOL Oct 2024)
  • Add Python 3.12 and 3.13 to the test matrix
  • Remove unnecessary system package (libgirepository1.0-dev)
  • Use fail-fast: false so all matrix jobs run to completion
  • Simplify test runner to unittest discover (matches existing test structure)

setup.py:

  • Replace distutils with setuptools (distutils removed in Python 3.12, PEP 632)
  • Bump python_requires to >=3.9
  • Add PyPI classifiers for supported versions

Testing

All 29 existing tests pass on Python 3.13 locally. No functional changes to the library.

Motivation

The current CI cannot run on Python 3.12+ due to the distutils removal, and the GitHub Actions used are deprecated (v2). This gets CI green again on modern Python.

- Update actions/checkout@v2 → v4, actions/setup-python@v2 → v5
- Drop EOL Python versions (3.7, 3.8) — both reached end-of-life
- Add Python 3.12 and 3.13 to the test matrix
- Replace distutils with setuptools in setup.py (distutils removed in 3.12)
- Bump python_requires to >=3.9
- Add PyPI classifiers for supported Python versions
- Remove unnecessary system package (libgirepository1.0-dev)
- Use fail-fast: false so all matrix jobs complete
- Simplify test step to use unittest discover (matches existing test structure)

All 29 existing tests pass on Python 3.13.
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