feat: Enforce Python 3.8+ requirement and add multi-version CI testing

- Add python_requires=">=3.8" to setup.py to enforce minimum version at install time
- Update README to explicitly document Python 3.8+ requirement
- Add CI matrix to test lint/build on Python 3.8-3.14 (7 versions)
- Aligns with actual usage patterns (~99% of downloads on Python 3.8+)
- Prevents future PRs from inadvertently using incompatible syntax

This change protects users by preventing installation on unsupported Python
versions and ensures contributors can see version requirements clearly.
This commit is contained in:
Rodos
2025-11-04 10:07:22 +11:00
parent d244de1952
commit cd23dd1a16
3 changed files with 6 additions and 2 deletions

View File

@@ -15,6 +15,9 @@ jobs:
lint: lint:
name: lint name: lint
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
steps: steps:
- name: Checkout repository - name: Checkout repository
@@ -24,7 +27,7 @@ jobs:
- name: Setup Python - name: Setup Python
uses: actions/setup-python@v6 uses: actions/setup-python@v6
with: with:
python-version: "3.12" python-version: ${{ matrix.python-version }}
cache: "pip" cache: "pip"
- run: pip install -r release-requirements.txt && pip install wheel - run: pip install -r release-requirements.txt && pip install wheel
- run: flake8 --ignore=E501,E203,W503 - run: flake8 --ignore=E501,E203,W503

View File

@@ -9,8 +9,8 @@ The package can be used to backup an *entire* `Github <https://github.com/>`_ or
Requirements Requirements
============ ============
- Python 3.8 or higher
- GIT 1.9+ - GIT 1.9+
- Python
Installation Installation
============ ============

View File

@@ -50,5 +50,6 @@ setup(
long_description=open_file("README.rst").read(), long_description=open_file("README.rst").read(),
long_description_content_type="text/x-rst", long_description_content_type="text/x-rst",
install_requires=open_file("requirements.txt").readlines(), install_requires=open_file("requirements.txt").readlines(),
python_requires=">=3.8",
zip_safe=True, zip_safe=True,
) )