Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CI-wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 8 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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'",
]
Expand All @@ -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"},
Expand All @@ -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",
Expand Down Expand Up @@ -68,9 +67,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 = [
Expand Down Expand Up @@ -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}'"
Expand Down
11 changes: 11 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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] = []
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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 {},
)
Loading