From f86bb3b225ed18496251ca51e748b26923d7c6be Mon Sep 17 00:00:00 2001 From: rgaudin Date: Thu, 10 Oct 2024 11:00:23 +0000 Subject: [PATCH 1/4] Fixed #208: Add support for Python3.13 No code nor dependency change required but we need to build, test and publish it. --- .github/workflows/QA.yaml | 1 + .github/workflows/Tests.yaml | 2 +- pyproject.toml | 7 ++++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/QA.yaml b/.github/workflows/QA.yaml index 0fa0c7e..1706f5f 100644 --- a/.github/workflows/QA.yaml +++ b/.github/workflows/QA.yaml @@ -14,6 +14,7 @@ jobs: - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v5 with: + # to update to 3.13 once it lands in GH image python-version: "3.12" architecture: x64 diff --git a/.github/workflows/Tests.yaml b/.github/workflows/Tests.yaml index 197e01b..7d542c5 100644 --- a/.github/workflows/Tests.yaml +++ b/.github/workflows/Tests.yaml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [macos-13, windows-2022, ubuntu-22.04] - python: ["3.9", "3.10", "3.11", "3.12"] + python: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 diff --git a/pyproject.toml b/pyproject.toml index eb9a1f8..bab0b57 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ build-backend = "setuptools.build_meta" [project] name = "libzim" version = "3.6.0.dev0" -requires-python = ">=3.9,<3.13" +requires-python = ">=3.9,<3.14" description = "A python-facing API for creating and interacting with ZIM files" authors = [ {name = "openZIM", email = "dev@kiwix.org"}, @@ -33,6 +33,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Typing :: Stubs Only", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Operating System :: MacOS", @@ -155,7 +156,7 @@ features = ["scripts", "test"] PROFILE = "1" [[tool.hatch.envs.test.matrix]] -python = ["3.9", "3.10", "3.11", "3.12"] +python = ["3.9", "3.10", "3.11", "3.12", "3.13"] [tool.hatch.envs.test.scripts] run = "inv test --args '{args}'" @@ -316,6 +317,6 @@ exclude_lines = [ [tool.pyright] include = ["libzim", "tests", "tasks.py"] exclude = [".env/**", ".venv/**"] -pythonVersion = "3.12" +pythonVersion = "3.13" typeCheckingMode="basic" disableBytesTypePromotions = true From 5ee519f5df38c475c311f336913d9bc98c4a8f66 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Thu, 10 Oct 2024 11:00:56 +0000 Subject: [PATCH 2/4] Update build/dev dependencies --- pyproject.toml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index bab0b57..bba8e6b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,33 +49,33 @@ scripts = [ "invoke==2.2.0", ] lint = [ - "black==24.8.0", - "ruff==0.6.3", + "black==24.10.0", + "ruff==0.6.9", "libzim", "libzim[build]", ] check = [ - "pyright==1.1.381", + "pyright==1.1.384", "libzim", "libzim[build]", "libzim[test]", "types-setuptools", ] test = [ - "pytest==8.3.2", - "coverage==7.6.1", + "pytest==8.3.3", + "coverage==7.6.2", # for cython coverage plugin "libzim[build]", ] build = [ - "setuptools == 74.1.1", + "setuptools == 75.1.0", "wheel == 0.44.0", "cython == 3.0.11", "delocate == 0.11.0 ; platform_system=='Windows'", ] dev = [ - "pre-commit==3.8.0", - "ipython==8.27.0", + "pre-commit==4.0.1", + "ipython==8.28.0", "types-setuptools", "libzim[scripts]", "libzim[lint]", From f480b33be71f3ef0055b0c4f3a586a5a6b6e8b13 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Thu, 10 Oct 2024 11:07:25 +0000 Subject: [PATCH 3/4] updated CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 984665d..f4f97ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Support for Python 3.13 (#208) + ### Changed - `delocate` dependency only required on Windows platform From f555981d97088c5fa1fdf529d6149217b6bd2484 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Fri, 11 Oct 2024 12:06:50 +0000 Subject: [PATCH 4/4] fixed harmless typo in workflow --- .github/workflows/QA.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/QA.yaml b/.github/workflows/QA.yaml index 1706f5f..3ab023e 100644 --- a/.github/workflows/QA.yaml +++ b/.github/workflows/QA.yaml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python }} + - name: Set up Python uses: actions/setup-python@v5 with: # to update to 3.13 once it lands in GH image