From 7dd3d808f3b148a0caac434977973554f75a3f0f Mon Sep 17 00:00:00 2001 From: Alban Diquet Date: Tue, 24 Dec 2024 11:22:46 +0100 Subject: [PATCH] [#121]Remove support for Python 3.8 and add support for Python 3.13 Fix upload-artifact Update cibuildwheel Update dev dependencies Fix CI fix Remove broken build Fix upload-artifact config --- .github/workflows/build_wheels.yml | 15 ++++++++------- .github/workflows/run_tests.yml | 4 ++-- README.md | 2 +- build_macos_arm64_wheels.sh | 2 +- pyproject.toml | 2 +- requirements-dev.txt | 7 ++++--- setup.py | 6 +++--- 7 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index b97ef55..92f2540 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -12,8 +12,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - # macos-13 is an intel runner, macos-14 is apple silicon - os: [ubuntu-22.04, macos-13, macos-14, windows-2022] + # macos-14 is apple silicon + os: [ubuntu-22.04, macos-14, windows-2022] steps: - uses: actions/checkout@v4 @@ -38,12 +38,12 @@ jobs: python-version: '3.10' - name: Install cibuildwheel - run: python -m pip install "cibuildwheel>=2.17,<2.18" + run: python -m pip install "cibuildwheel>=2.22,<2.23" - name: Build wheels run: python -m cibuildwheel --output-dir wheelhouse env: - CIBW_BUILD: "cp38-* cp39-* cp310-* cp311-* cp312-*" + CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-*" CIBW_SKIP: "*-win32 pp* *-musllinux_i686" # Skip win32, PyPy and muslinux32 builds # Build wheels for Apple x86_64 only; we use another workflow for Apple arm64 CIBW_ARCHS_MACOS: "native" @@ -52,13 +52,14 @@ jobs: CIBW_MANYLINUX_I686_IMAGE: manylinux2014 # The C libraries (OpenSSL and Zlib) only need to be built once per OS # as they are not tied to a specific Python version - CIBW_BEFORE_ALL: "python -m pip install invoke && invoke build.deps" + CIBW_BEFORE_ALL: "python -m pip install setuptools invoke && invoke build.deps" CIBW_BEFORE_ALL_WINDOWS: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" && python -m pip install invoke && invoke build.deps' # However the nassl C extension is by design tied to a specific Python version - CIBW_BEFORE_BUILD: "python -m pip install invoke && invoke build.nassl" + CIBW_BEFORE_BUILD: "python -m pip install setuptools invoke && invoke build.nassl" CIBW_TEST_REQUIRES: "pytest" CIBW_TEST_COMMAND: "python -m pytest {project}/tests" - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: + name: ${{ matrix.os }}-wheels path: ./wheelhouse/*.whl diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 957ffd0..1f09650 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -9,10 +9,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.12 + - name: Set up Python 3.13 uses: actions/setup-python@v5 with: - python-version: "3.12" + python-version: "3.13" - name: Install Python dependencies run: | diff --git a/README.md b/README.md index a20e423..12c8225 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ nassl [![PyPI wheel](https://img.shields.io/pypi/wheel/nassl.svg)](https://pypi.org/project/nassl/) [![PyPI version](https://img.shields.io/pypi/pyversions/nassl.svg)](https://pypi.org/project/nassl/) -Experimental OpenSSL wrapper for Python 3.8+ and [SSLyze](https://github.com/nabla-c0d3/sslyze). +Experimental OpenSSL wrapper for Python 3.9+ and [SSLyze](https://github.com/nabla-c0d3/sslyze). **Do NOT use for anything serious**. This code has not been properly tested/reviewed and is not production ready. diff --git a/build_macos_arm64_wheels.sh b/build_macos_arm64_wheels.sh index 1eeb0c0..d361096 100755 --- a/build_macos_arm64_wheels.sh +++ b/build_macos_arm64_wheels.sh @@ -1,7 +1,7 @@ #!/bin/bash # Python 3.9+ arm64 is required -python -m pip install "cibuildwheel>=2.17,<2.18" +python -m pip install "cibuildwheel>=2.22,<2.23" export CIBW_ARCHS_MACOS="arm64" export CIBW_BEFORE_ALL='python -m pip install invoke && invoke build.deps' diff --git a/pyproject.toml b/pyproject.toml index 6b9a145..6d0101d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ line-length = 120 [tool.mypy] -python_version = "3.8" +python_version = "3.9" ignore_missing_imports = true strict_optional = true disallow_untyped_defs = true diff --git a/requirements-dev.txt b/requirements-dev.txt index 8c07ece..4c35c1b 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,7 @@ -mypy==1.8 +mypy==1.14 invoke>=2,<3 -pytest>=7.4,<8 +pytest>=8,<9 twine pytest-cov -ruff==0.2.2 \ No newline at end of file +ruff==0.8.4 +setuptools diff --git a/setup.py b/setup.py index d0b4cfb..46c99c9 100644 --- a/setup.py +++ b/setup.py @@ -28,22 +28,22 @@ "nassl.ocsp_response", "nassl.cert_chain_verifier", ], - "description": "Experimental OpenSSL wrapper for Python 3.8+ and SSLyze.", + "description": "Experimental OpenSSL wrapper for Python 3.9+ and SSLyze.", "author": __author__, "author_email": "nabla.c0d3@gmail.com", "url": "https://github.com/nabla-c0d3/nassl", - "python_requires": ">=3.8", + "python_requires": ">=3.9", "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "Natural Language :: French", "License :: OSI Approved :: GNU Affero General Public License v3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: System :: Networking", "Topic :: System :: Monitoring", "Topic :: System :: Networking :: Monitoring",