From 148b3b3780986999ed21650685ccd8adfc2017ac Mon Sep 17 00:00:00 2001 From: Xi Xu Date: Sat, 11 Apr 2026 21:20:53 +0800 Subject: [PATCH] ci: add Python 3.14 support --- .github/workflows/ci.yml | 2 +- CONTRIBUTING.md | 6 +++--- README.md | 2 +- README.zh.md | 2 +- docs/development.md | 4 ++-- docs/index.md | 2 +- pyproject.toml | 1 + tests/unit/test_project_metadata.py | 22 ++++++++++++++++++++++ 8 files changed, 32 insertions(+), 9 deletions(-) create mode 100644 tests/unit/test_project_metadata.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 63b3c12..6237f92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ["3.12", "3.13"] + python-version: ["3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v6 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 745427e..0c4e954 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,7 +23,7 @@ This project follows the principles of respectful collaboration. Please be kind, ### Prerequisites -- Python 3.12 or higher +- Python 3.12 or higher (tested on 3.12-3.14) - Git - Basic knowledge of tar archives and compression @@ -198,7 +198,7 @@ This project uses [Ruff](https://docs.astral.sh/ruff/) for linting and formattin Settings are defined in `pyproject.toml`: - Line length: 88 characters -- Target Python version: 3.12+ +- Target Python version: 3.12+ (tested on 3.12-3.14) - Import sorting with isort - Quote style: double quotes @@ -356,7 +356,7 @@ When suggesting features: ### Compatibility -- Support Python 3.12+ +- Support Python 3.12+ with CI coverage for 3.12-3.14 - Test on multiple platforms (Windows, macOS, Linux) - Consider different filesystem behaviors - Maintain backwards compatibility when possible diff --git a/README.md b/README.md index bb87ee5..7916d45 100644 --- a/README.md +++ b/README.md @@ -453,7 +453,7 @@ except KeyboardInterrupt: ## 📋 Requirements -- 🐍 Python 3.12 or higher +- 🐍 Python 3.12 or higher (tested on 3.12-3.14) - 📦 zstandard >= 0.19.0 ## 🛠️ Development diff --git a/README.zh.md b/README.zh.md index 1834bcf..347a84f 100644 --- a/README.zh.md +++ b/README.zh.md @@ -451,7 +451,7 @@ except KeyboardInterrupt: ## 📋 系统要求 -- 🐍 Python 3.12 或更高版本 +- 🐍 Python 3.12 或更高版本(已测试 3.12-3.14) - 📦 zstandard >= 0.19.0 ## 🛠️ 开发指南 diff --git a/docs/development.md b/docs/development.md index cba7241..8ecd60b 100644 --- a/docs/development.md +++ b/docs/development.md @@ -116,7 +116,7 @@ ruff format --check src tests Settings are defined in `pyproject.toml`: - Line length: 88 characters -- Target Python version: 3.12+ +- Target Python version: 3.12+ (tested on 3.12-3.14) - Import sorting with isort - Quote style: double quotes @@ -315,7 +315,7 @@ docs(readme): update installation instructions ### Compatibility -- Support Python 3.12+ +- Support Python 3.12+ with CI coverage for 3.12-3.14 - Test on multiple platforms (Windows, macOS, Linux) - Consider different filesystem behaviors - Maintain backwards compatibility when possible diff --git a/docs/index.md b/docs/index.md index baa036c..1e4730b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -183,5 +183,5 @@ Licensed under the [BSD 3-Clause](https://github.com/xixu-me/tzst/blob/main/LICE ## Requirements -- Python 3.12 or higher +- Python 3.12 or higher (tested on 3.12-3.14) - zstandard >= 0.19.0 diff --git a/pyproject.toml b/pyproject.toml index e3ea38f..1854085 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,6 +18,7 @@ classifiers = [ "Operating System :: OS Independent", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Topic :: System :: Archiving :: Compression", "Topic :: Software Development :: Libraries :: Python Modules", ] diff --git a/tests/unit/test_project_metadata.py b/tests/unit/test_project_metadata.py new file mode 100644 index 0000000..717e9b3 --- /dev/null +++ b/tests/unit/test_project_metadata.py @@ -0,0 +1,22 @@ +"""Project metadata and CI support tests.""" + +import tomllib +from pathlib import Path + +REPO_ROOT = Path(__file__).resolve().parents[2] + + +def test_pyproject_declares_python_314_classifier(): + """Package metadata should advertise Python 3.14 support.""" + pyproject = tomllib.loads((REPO_ROOT / "pyproject.toml").read_text("utf-8")) + + classifiers = pyproject["project"]["classifiers"] + + assert "Programming Language :: Python :: 3.14" in classifiers + + +def test_ci_matrix_includes_python_314(): + """Main test workflow should run on Python 3.14.""" + workflow = (REPO_ROOT / ".github" / "workflows" / "ci.yml").read_text("utf-8") + + assert 'python-version: ["3.12", "3.13", "3.14"]' in workflow