From ea9963f657bfe5d702d96516390f6176f429489c Mon Sep 17 00:00:00 2001 From: rgaudin Date: Thu, 13 Aug 2026 16:26:40 +0000 Subject: [PATCH 1/4] Update build dependencies --- pyproject.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 25fb59e..08ea085 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,8 @@ [build-system] requires = [ - "setuptools == 83.0.0", - "wheel == 0.47.0", - "cython == 3.2.8", + "setuptools == 84.0.0", + "wheel == 0.48.0", + "cython == 3.2.9", # https://github.com/pypa/cibuildwheel/blob/v2.22/cibuildwheel/resources/constraints.txt "delocate == 0.13.0 ; platform_system=='Windows'", ] @@ -68,9 +68,9 @@ test = [ "libzim[build]", ] build = [ - "setuptools == 83.0.0", - "wheel == 0.47.0", - "cython == 3.2.8", + "setuptools == 84.0.0", + "wheel == 0.48.0", + "cython == 3.2.9", "delocate == 0.13.0 ; platform_system=='Windows'", ] docs = [ From dba73c40d0bd3931506322eb8d2ad3734cf3fad4 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Thu, 13 Aug 2026 16:38:29 +0000 Subject: [PATCH 2/4] Removed support for Python 3.10 (EOL) --- .github/workflows/Tests.yaml | 2 +- CHANGELOG.md | 4 ++++ pyproject.toml | 5 ++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Tests.yaml b/.github/workflows/Tests.yaml index 479feb1..36112e9 100644 --- a/.github/workflows/Tests.yaml +++ b/.github/workflows/Tests.yaml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [macos-14, macos-15, macos-15-intel, windows-2022, windows-2025, ubuntu-22.04, ubuntu-24.04] - python: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"] + python: ["3.11", "3.12", "3.13", "3.14", "3.14t"] steps: - uses: actions/checkout@v6 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c9be8d..e5fb723 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] +### Removed + +- Support for Python 3.10 (EOL) + ## [3.12.0] - 2026-07-20 ### Changed diff --git a/pyproject.toml b/pyproject.toml index 08ea085..234c64d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ build-backend = "setuptools.build_meta" [project] name = "libzim" version = "3.12.1-dev0" -requires-python = ">=3.10,<3.15" +requires-python = ">=3.11,<3.15" description = "A python-facing API for creating and interacting with ZIM files" authors = [ {name = "openZIM", email = "dev@kiwix.org"}, @@ -30,7 +30,6 @@ classifiers = [ "Intended Audience :: Developers", "Programming Language :: Cython", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", @@ -170,7 +169,7 @@ features = ["scripts", "test"] PROFILE = "1" [[tool.hatch.envs.test.matrix]] -python = ["3.10", "3.11", "3.12", "3.13", "3.14"] +python = ["3.11", "3.12", "3.13", "3.14"] [tool.hatch.envs.test.scripts] run = "inv test --args '{args}'" From 470f19e5bd6b1c17b3cd9cccbbe5f0e7ef4efaa1 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Thu, 13 Aug 2026 16:38:41 +0000 Subject: [PATCH 3/4] Build ABI3 wheels --- setup.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/setup.py b/setup.py index 4cd8474..ee9740c 100755 --- a/setup.py +++ b/setup.py @@ -383,6 +383,11 @@ def can_sign_apple(self) -> bool: ] ) + @property + def can_use_limited_api(self) -> bool: + """whether runtime can use ABIv3 (free-threaded cannot)""" + return not self.profiling and not sysconfig.get_config_var("Py_GIL_DISABLED") + config = Config() @@ -400,6 +405,8 @@ def get_cython_extension() -> list[Extension]: ("CYTHON_USE_SYS_MONITORING", "0"), ] compiler_directives.update(linetrace="true") + elif config.can_use_limited_api: + define_macros += [("Py_LIMITED_API", "0x030B0000")] include_dirs: list[str] = [] library_dirs: list[str] = [] @@ -455,6 +462,7 @@ def get_cython_extension() -> list[Extension]: extra_compile_args=extra_compile_args, language="c++", define_macros=define_macros, + py_limited_api=config.can_use_limited_api, ) return cythonize([wrapper_extension], compiler_directives=compiler_directives) @@ -634,4 +642,7 @@ def run(self): "repair_win_wheel": RepairWindowsWheel, }, ext_modules=ext_modules, + options={"bdist_wheel": {"py_limited_api": "cp311"}} + if config.can_use_limited_api + else {}, ) From 0a080042f2825ea4d73a94a64ba7fc71ee2b7f64 Mon Sep 17 00:00:00 2001 From: rgaudin Date: Thu, 13 Aug 2026 17:10:38 +0000 Subject: [PATCH 4/4] Update cibuildwheel --- .github/workflows/CI-wheels.yaml | 2 +- .github/workflows/Publish.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI-wheels.yaml b/.github/workflows/CI-wheels.yaml index d15f086..5bba56e 100644 --- a/.github/workflows/CI-wheels.yaml +++ b/.github/workflows/CI-wheels.yaml @@ -31,7 +31,7 @@ jobs: platforms: all - name: Build wheels - uses: pypa/cibuildwheel@v3.4 + uses: pypa/cibuildwheel@v4.2 - uses: actions/upload-artifact@v7 with: diff --git a/.github/workflows/Publish.yaml b/.github/workflows/Publish.yaml index bf24388..aff9414 100644 --- a/.github/workflows/Publish.yaml +++ b/.github/workflows/Publish.yaml @@ -68,7 +68,7 @@ jobs: security unlock-keychain -p mysecretpassword ${APPLE_SIGNING_KEYCHAIN_PATH} - name: Build wheels - uses: pypa/cibuildwheel@v3.4 + uses: pypa/cibuildwheel@v4.2 - name: Cleanup Apple Keychain if: matrix.os == 'macos-14'