diff --git a/pyproject.toml b/pyproject.toml index 1e1b124..2a1d826 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ name = "aeg" dynamic = ["version"] description = "AEGIS encryption easy to use Python binding. Wheels for major platforms." readme = {file = "README.md", content-type = "text/markdown"} -requires-python = ">=3.10" +requires-python = ">=3.12" classifiers = [ "Development Status :: 5 - Production/Stable", "Programming Language :: Python :: Implementation :: CPython", diff --git a/setup.py b/setup.py index 2f4840f..98583c9 100644 --- a/setup.py +++ b/setup.py @@ -37,6 +37,6 @@ if __name__ == "__main__": setup( cffi_modules=["setup.py:ffibuilder"], 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 {} ), ) diff --git a/src/aeg/util.py b/src/aeg/util.py index 2469e47..1998efc 100644 --- a/src/aeg/util.py +++ b/src/aeg/util.py @@ -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. """ -from typing import Protocol +from collections.abc import Buffer from ._loader import ffi __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: """Return the integer address of the start of a cffi array object.""" diff --git a/tools/release.py b/tools/release.py index 7bb0d7f..7ab02fe 100755 --- a/tools/release.py +++ b/tools/release.py @@ -23,20 +23,16 @@ ABI3_BUILD_VERSION = "3.14+gil" # All GIL-enabled Python versions covered by the ABI3 wheel ABI3_COVERED_VERSIONS = [ - "3.10", - "3.11", "3.12", "3.13+gil", "3.14+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 = [ "3.14t", "3.15t", - "pypy3.10", - "pypy3.11", ] # 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: """Get the glob pattern for finding a wheel file.""" 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 - return "aeg-*-cp310-abi3-*.whl" - elif py_version.startswith("pypy"): - # PyPy wheels use pp3XX format - return f"aeg-*-pp{py_version.replace('pypy', '').replace('.', '')}-*.whl" + return "aeg-*-cp312-abi3-*.whl" elif py_version.endswith("t"): # Free-threaded Python wheels use cpXXX-cpXXXt format (e.g., cp314-cp314t) 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()): 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) wheels = list(dist_dir.glob(wheel_pattern)) if not wheels: