CHORE Drop Python 3.9, add 3.13 (#2790)

This commit is contained in:
Yuanyuan Chen
2025-10-01 18:02:39 +08:00
committed by GitHub
parent ffa971a68c
commit 815956b9b8
2 changed files with 6 additions and 9 deletions

View File

@ -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

View File

@ -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",
],
)