From 1fbbb6e4f0836550e558693a7d06262e1bcd6718 Mon Sep 17 00:00:00 2001 From: Celina Hanouti Date: Mon, 28 Oct 2024 12:09:17 +0100 Subject: [PATCH] Support python 3.13 (#2636) * Run CI on python 3.13 * Fix gradio version --- .github/workflows/build_repocard_examples.yaml | 2 +- .github/workflows/python-tests.yml | 8 +++++--- docs/source/cn/installation.md | 2 +- docs/source/de/installation.md | 2 +- docs/source/en/installation.md | 2 +- docs/source/fr/installation.md | 2 +- docs/source/hi/installation.md | 2 +- docs/source/ko/installation.md | 2 +- setup.py | 1 + 9 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_repocard_examples.yaml b/.github/workflows/build_repocard_examples.yaml index feea0aa9f1..7cfcf37ea9 100644 --- a/.github/workflows/build_repocard_examples.yaml +++ b/.github/workflows/build_repocard_examples.yaml @@ -17,7 +17,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.12 + python-version: 3.13 # Install dependencies - name: Configure and install dependencies diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 25dc2c0583..8c3a5ca81c 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -21,15 +21,15 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.12"] + python-version: ["3.8", "3.13"] test_name: [ "Repository only", "Everything else", - "torch_latest", + ] include: - - python-version: "3.12" # LFS not ran on 3.8 + - python-version: "3.13" # LFS not ran on 3.8 test_name: "lfs" - python-version: "3.8" test_name: "fastai" @@ -41,6 +41,8 @@ jobs: test_name: "tensorflow" - python-version: "3.8" # test torch~=1.11 on python 3.8 only. test_name: "Python 3.8, torch_1.11" + - python-version: "3.12" # test torch latest on python 3.12 only. + test_name: "torch_latest" steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} diff --git a/docs/source/cn/installation.md b/docs/source/cn/installation.md index 2b3003e977..c800b4b173 100644 --- a/docs/source/cn/installation.md +++ b/docs/source/cn/installation.md @@ -97,7 +97,7 @@ cd huggingface_hub pip install -e . ``` -这些命令将你克隆存储库的文件夹与你的 Python 库路径链接起来。Python 现在将除了正常的库路径之外,还会在你克隆到的文件夹中查找。例如,如果你的 Python 包通常安装在`./.venv/lib/python3.12/site-packages/`中,Python 还会搜索你克隆的文件夹`./huggingface_hub/` +这些命令将你克隆存储库的文件夹与你的 Python 库路径链接起来。Python 现在将除了正常的库路径之外,还会在你克隆到的文件夹中查找。例如,如果你的 Python 包通常安装在`./.venv/lib/python3.13/site-packages/`中,Python 还会搜索你克隆的文件夹`./huggingface_hub/` ## 通过 conda 安装 diff --git a/docs/source/de/installation.md b/docs/source/de/installation.md index 8cb6ae3f31..3ba965bd4b 100644 --- a/docs/source/de/installation.md +++ b/docs/source/de/installation.md @@ -90,7 +90,7 @@ cd huggingface_hub pip install -e . ``` -Diese Befehle verknüpfen den Ordner, in den Sie das Repository geklont haben, mit Ihren Python-Bibliothekspfaden. Python wird nun zusätzlich zu den normalen Bibliothekspfaden im geklonten Ordner suchen. Wenn Ihre Python-Pakete normalerweise in `./.venv/lib/python3.12/site-packages/` installiert sind, wird Python auch den geklonten Ordner `./huggingface_hub/` durchsuchen. +Diese Befehle verknüpfen den Ordner, in den Sie das Repository geklont haben, mit Ihren Python-Bibliothekspfaden. Python wird nun zusätzlich zu den normalen Bibliothekspfaden im geklonten Ordner suchen. Wenn Ihre Python-Pakete normalerweise in `./.venv/lib/python3.13/site-packages/` installiert sind, wird Python auch den geklonten Ordner `./huggingface_hub/` durchsuchen. ## Installieren mit conda diff --git a/docs/source/en/installation.md b/docs/source/en/installation.md index 89ddaff0d9..9af8a32676 100644 --- a/docs/source/en/installation.md +++ b/docs/source/en/installation.md @@ -104,7 +104,7 @@ pip install -e . These commands will link the folder you cloned the repository to and your Python library paths. Python will now look inside the folder you cloned to in addition to the normal library paths. -For example, if your Python packages are typically installed in `./.venv/lib/python3.12/site-packages/`, +For example, if your Python packages are typically installed in `./.venv/lib/python3.13/site-packages/`, Python will also search the folder you cloned `./huggingface_hub/`. ## Install with conda diff --git a/docs/source/fr/installation.md b/docs/source/fr/installation.md index 219808f823..15fb47a9f8 100644 --- a/docs/source/fr/installation.md +++ b/docs/source/fr/installation.md @@ -104,7 +104,7 @@ pip install -e . Python regardera maintenant à l'intérieur du dossier dans lequel vous avez cloné le dépôt en plus des chemins de librairie classiques. Par exemple, si vos packages Python sont installés dans -`./.venv/lib/python3.12/site-packages/`, Python regardera aussi dans le dossier que vous avez +`./.venv/lib/python3.13/site-packages/`, Python regardera aussi dans le dossier que vous avez cloné `./huggingface_hub/`. ## Installation avec conda diff --git a/docs/source/hi/installation.md b/docs/source/hi/installation.md index 4587838950..4d16d6624b 100644 --- a/docs/source/hi/installation.md +++ b/docs/source/hi/installation.md @@ -103,7 +103,7 @@ pip install -e . ये कमांड उस फ़ोल्डर को लिंक करेंगे जिसे आपने रिपॉजिटरी में क्लोन किया है और आपके पायथन लाइब्रेरी पथ। पाइथॉन अब सामान्य लाइब्रेरी पथों के अलावा आपके द्वारा क्लोन किए गए फ़ोल्डर के अंदर भी देखेगा। -उदाहरण के लिए, यदि आपके पायथन पैकेज आमतौर पर `./.venv/lib/python3.12/site-packages/` में स्थापित हैं, +उदाहरण के लिए, यदि आपके पायथन पैकेज आमतौर पर `./.venv/lib/python3.13/site-packages/` में स्थापित हैं, पायथन आपके द्वारा क्लोन किए गए फ़ोल्डर `./huggingface_hub/` को भी खोजेगा। ## कोंडा के साथ स्थापित करें diff --git a/docs/source/ko/installation.md b/docs/source/ko/installation.md index b70808b3b7..720346b1a1 100644 --- a/docs/source/ko/installation.md +++ b/docs/source/ko/installation.md @@ -94,7 +94,7 @@ pip install -e . 이렇게 클론한 레포지토리 폴더와 Python 경로를 연결합니다. 이제 Python은 일반적인 라이브러리 경로 외에도 복제된 폴더 내부를 찾습니다. -예를 들어 파이썬 패키지가 일반적으로 `./.venv/lib/python3.12/site-packages/`에 설치되어 있다면, Python은 복제된 폴더 `./huggingface_hub/`도 검색하게 됩니다. +예를 들어 파이썬 패키지가 일반적으로 `./.venv/lib/python3.13/site-packages/`에 설치되어 있다면, Python은 복제된 폴더 `./huggingface_hub/`도 검색하게 됩니다. ## conda로 설치하기 [[install-with-conda]] diff --git a/setup.py b/setup.py index 33f6db4559..9d69ad35c4 100644 --- a/setup.py +++ b/setup.py @@ -134,6 +134,7 @@ def get_version() -> str: "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", ], include_package_data=True,