From 13dd6ea973a5d77afce8a2b39a84d60a09c79da4 Mon Sep 17 00:00:00 2001 From: Bilal Retiat Date: Mon, 30 Sep 2024 08:16:09 +0400 Subject: [PATCH] Support Python up to 3.12 and drop 3.7 (#491) * Upgrade pybind11 to v2.12.0 * Add clang and clang-format to Ubuntu requirements * Add Python 3.12 Support and drop Python 3.7 * GitHub Workflows: Upgrade setup-python to v5 * Bazel Build: Fix SEAL checksum * Update TenSEAL version to 0.3.15 --- .github/workflows/bazel_tests.yml | 2 +- .github/workflows/benchmarks.yml | 4 ++-- .github/workflows/pythonpublish-linux.yml | 3 ++- .github/workflows/pythonpublish-macos.yml | 4 ++-- .github/workflows/pythonpublish-windows.yml | 4 ++-- .github/workflows/scripts/install_req_ubuntu.sh | 2 +- .github/workflows/tests.yml | 12 ++++++------ cmake/pybind11.cmake | 2 +- tenseal/deps.bzl | 2 +- tenseal/version.py | 2 +- 10 files changed, 19 insertions(+), 18 deletions(-) diff --git a/.github/workflows/bazel_tests.yml b/.github/workflows/bazel_tests.yml index 85860099..a5ac5848 100644 --- a/.github/workflows/bazel_tests.yml +++ b/.github/workflows/bazel_tests.yml @@ -19,7 +19,7 @@ jobs: with: submodules: true - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 with: python-version: ${{ matrix.python-version }} - name: Run gtest diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 00a5aac4..6b5d936c 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -8,13 +8,13 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: [3.8] + python-version: [3.12] os: [macos-latest, ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 with: python-version: ${{ matrix.python-version }} - name: Prepare ENV diff --git a/.github/workflows/pythonpublish-linux.yml b/.github/workflows/pythonpublish-linux.yml index 2bc973ad..b93e4631 100644 --- a/.github/workflows/pythonpublish-linux.yml +++ b/.github/workflows/pythonpublish-linux.yml @@ -9,10 +9,11 @@ jobs: strategy: matrix: python-version: - - cp37-cp37m - cp38-cp38 - cp39-cp39 - cp310-cp310 + - cp311-cp311 + - cp312-cp312 runs-on: ubuntu-latest container: quay.io/pypa/manylinux2014_x86_64 diff --git a/.github/workflows/pythonpublish-macos.yml b/.github/workflows/pythonpublish-macos.yml index 38226585..dc2421ed 100644 --- a/.github/workflows/pythonpublish-macos.yml +++ b/.github/workflows/pythonpublish-macos.yml @@ -9,7 +9,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] os: [macos-11, macos-12] steps: @@ -17,7 +17,7 @@ jobs: with: submodules: true - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/pythonpublish-windows.yml b/.github/workflows/pythonpublish-windows.yml index 4718f97a..3a997d29 100644 --- a/.github/workflows/pythonpublish-windows.yml +++ b/.github/workflows/pythonpublish-windows.yml @@ -9,14 +9,14 @@ jobs: runs-on: windows-latest strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v2 with: submodules: true - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/scripts/install_req_ubuntu.sh b/.github/workflows/scripts/install_req_ubuntu.sh index dcae95fe..32f91e25 100755 --- a/.github/workflows/scripts/install_req_ubuntu.sh +++ b/.github/workflows/scripts/install_req_ubuntu.sh @@ -3,7 +3,7 @@ set -e sudo apt update -y -sudo apt install curl git build-essential cmake automake libtool libtool-bin -y +sudo apt install curl git build-essential cmake automake libtool libtool-bin clang clang-format -y python -m pip install --upgrade pip pip install -r requirements_dev.txt diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1e2f35e8..bc383383 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,14 +11,14 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: [3.8] + python-version: ['3.8', '3.12'] os: [ubuntu-latest] steps: - uses: actions/checkout@v2 with: submodules: true - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -34,14 +34,14 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] os: [macos-latest, ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v2 with: submodules: true - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 with: python-version: ${{ matrix.python-version }} - name: Check LongPathsEnabled @@ -86,14 +86,14 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] os: [macos-latest, ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v2 with: submodules: true - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 with: python-version: ${{ matrix.python-version }} - name: Prepare ENV diff --git a/cmake/pybind11.cmake b/cmake/pybind11.cmake index 9057643a..f73a849c 100644 --- a/cmake/pybind11.cmake +++ b/cmake/pybind11.cmake @@ -3,7 +3,7 @@ include(FetchContent) FetchContent_Declare( com_pybind_pybind11 GIT_REPOSITORY https://github.com/pybind/pybind11 - GIT_TAG v2.6.2 + GIT_TAG v2.12.0 ) FetchContent_MakeAvailable(com_pybind_pybind11) diff --git a/tenseal/deps.bzl b/tenseal/deps.bzl index 9d77cf1d..31c42883 100644 --- a/tenseal/deps.bzl +++ b/tenseal/deps.bzl @@ -25,7 +25,7 @@ def tenseal_deps(): http_archive( name = "com_microsoft_seal", build_file = "//third_party:seal.BUILD", - sha256 = "cb2d608656c09877e3c9dd260a9887094e4cfa8a9fe4127dac2ade0a4c172122", + sha256 = "af9bf0f0daccda2a8b7f344f13a5692e0ee6a45fea88478b2b90c35648bf2672", strip_prefix = "SEAL-4.1.1", urls = ["https://github.com/microsoft/SEAL/archive/v4.1.1.tar.gz"], ) diff --git a/tenseal/version.py b/tenseal/version.py index dc1bba86..8966e1c9 100644 --- a/tenseal/version.py +++ b/tenseal/version.py @@ -1 +1 @@ -__version__ = "0.3.14" +__version__ = "0.3.15"