Require Python 3.12+; drop PyPy and 3.10/3.11 wheel builds

- requires-python >= 3.12; abi3 limited API tag cp310 -> cp312
- util.Buffer now imported directly from collections.abc (no fallback)
- release.py: ABI3 wheel covers 3.12-3.15; PyPy wheels dropped (PyPy
  has no 3.12 support yet)
This commit is contained in:
LeoVasanko committed 2026-10-04 05:42:22 +00:00
1 parent 199dfe7bd9
commit 972c3053d9
4 files changed
+7 -21

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ name = "aeg"
dynamic = ["version"] dynamic = ["version"]
description = "AEGIS encryption easy to use Python binding. Wheels for major platforms." description = "AEGIS encryption easy to use Python binding. Wheels for major platforms."
readme = {file = "README.md", content-type = "text/markdown"} readme = {file = "README.md", content-type = "text/markdown"}
requires-python = ">=3.10" requires-python = ">=3.12"
classifiers = [ classifiers = [
"Development Status :: 5 - Production/Stable", "Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: CPython",
+1 -1
View File
@@ -37,6 +37,6 @@ if __name__ == "__main__":
setup( setup(
cffi_modules=["setup.py:ffibuilder"], cffi_modules=["setup.py:ffibuilder"],
options=( options=(
{"bdist_wheel": {"py_limited_api": "cp310"}} if not is_free_threaded else {} {"bdist_wheel": {"py_limited_api": "cp312"}} if not is_free_threaded else {}
), ),
) )
+1 -8
View File
@@ -4,19 +4,12 @@ Currently provides Python-side aligned allocation helpers that avoid relying
on libc/posix_memalign. Memory is owned by Python; C code only borrows it. on libc/posix_memalign. Memory is owned by Python; C code only borrows it.
""" """
from typing import Protocol from collections.abc import Buffer
from ._loader import ffi from ._loader import ffi
__all__ = ["new_aligned_struct", "aligned_address", "Buffer", "nonce_increment", "wipe"] __all__ = ["new_aligned_struct", "aligned_address", "Buffer", "nonce_increment", "wipe"]
try:
from collections.abc import Buffer # type: ignore
except ImportError:
# Fallback for Python < 3.12
class Buffer(Protocol):
def __buffer__(self, flags: int) -> memoryview: ...
def aligned_address(obj) -> int: def aligned_address(obj) -> int:
"""Return the integer address of the start of a cffi array object.""" """Return the integer address of the start of a cffi array object."""
+4 -11
View File
@@ -23,20 +23,16 @@ ABI3_BUILD_VERSION = "3.14+gil"
# All GIL-enabled Python versions covered by the ABI3 wheel # All GIL-enabled Python versions covered by the ABI3 wheel
ABI3_COVERED_VERSIONS = [ ABI3_COVERED_VERSIONS = [
"3.10",
"3.11",
"3.12", "3.12",
"3.13+gil", "3.13+gil",
"3.14+gil", "3.14+gil",
"3.15+gil", "3.15+gil",
] ]
# Non-ABI3 wheels: each needs its own build (free-threaded and PyPy) # Non-ABI3 wheels: each needs its own build (free-threaded)
NON_ABI3_VERSIONS = [ NON_ABI3_VERSIONS = [
"3.14t", "3.14t",
"3.15t", "3.15t",
"pypy3.10",
"pypy3.11",
] ]
# All versions for testing and benchmarking # All versions for testing and benchmarking
@@ -159,12 +155,9 @@ def normalize_line_endings(repo_root: Path):
def get_wheel_pattern(py_version: str, abi3: bool = False) -> str: def get_wheel_pattern(py_version: str, abi3: bool = False) -> str:
"""Get the glob pattern for finding a wheel file.""" """Get the glob pattern for finding a wheel file."""
if abi3: if abi3:
# ABI3 wheels always use cp310-abi3 tag (minimum supported version) # ABI3 wheels always use cp312-abi3 tag (minimum supported version)
# regardless of which Python version was used to build # regardless of which Python version was used to build
return "aeg-*-cp310-abi3-*.whl" return "aeg-*-cp312-abi3-*.whl"
elif py_version.startswith("pypy"):
# PyPy wheels use pp3XX format
return f"aeg-*-pp{py_version.replace('pypy', '').replace('.', '')}-*.whl"
elif py_version.endswith("t"): elif py_version.endswith("t"):
# Free-threaded Python wheels use cpXXX-cpXXXt format (e.g., cp314-cp314t) # Free-threaded Python wheels use cpXXX-cpXXXt format (e.g., cp314-cp314t)
base_version = py_version.replace(".", "").replace("t", "") base_version = py_version.replace(".", "").replace("t", "")
@@ -183,7 +176,7 @@ def build_abi3_wheel(dist_dir: Path, py_version: str) -> Path | None:
if not run_command(cmd, env=get_build_env()): if not run_command(cmd, env=get_build_env()):
return None return None
# Find the ABI3 wheel (always tagged cp310-abi3 regardless of build Python version) # Find the ABI3 wheel (always tagged cp312-abi3 regardless of build Python version)
wheel_pattern = get_wheel_pattern(py_version, abi3=True) wheel_pattern = get_wheel_pattern(py_version, abi3=True)
wheels = list(dist_dir.glob(wheel_pattern)) wheels = list(dist_dir.glob(wheel_pattern))
if not wheels: if not wheels: