From 815956b9b85f893e5acd2dd1d8391954b0f93e07 Mon Sep 17 00:00:00 2001 From: Yuanyuan Chen Date: Wed, 1 Oct 2025 18:02:39 +0800 Subject: [PATCH] CHORE Drop Python 3.9, add 3.13 (#2790) --- .github/workflows/tests.yml | 11 ++++------- setup.py | 4 ++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8b468997..655189c7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -40,8 +40,11 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.10", "3.11", "3.12", "3.13"] os: ["ubuntu-latest", "macos-13", "windows-latest"] + exclude: + - os: macos-13 + python-version: "3.13" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 @@ -78,12 +81,6 @@ jobs: pip install setuptools # cpu version of pytorch pip install -e .[test] - - name: Downgrade numpy on MacOS and Windows - # TODO: remove numpy downgrade on MacOS & Windows once torch fixes numpy 2.0 issue - shell: bash - if: matrix.os == 'windows-latest' || matrix.os == 'macos-13' - run: | - pip install --force-reinstall -U "numpy<2.0.0" - name: Test with pytest # MacOS tests are currently too flaky and will fail almost each time. Thus, continue (green checkmark) even if # they fail, but add a notice so that the failure is not completely silent diff --git a/setup.py b/setup.py index c3fa698c..a677afe0 100644 --- a/setup.py +++ b/setup.py @@ -56,7 +56,7 @@ setup( packages=find_packages("src"), package_data={"peft": ["py.typed", "tuners/boft/fbd/fbd_cuda.cpp", "tuners/boft/fbd/fbd_cuda_kernel.cu"]}, entry_points={}, - python_requires=">=3.9.0", + python_requires=">=3.10.0", install_requires=[ "numpy>=1.17", "packaging>=20.0", @@ -78,10 +78,10 @@ setup( "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", - "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 :: Scientific/Engineering :: Artificial Intelligence", ], )