From 213306069f055b3eaab679e6517034306902981f Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 21 May 2025 22:42:58 +0000 Subject: [PATCH] Update Python environment to 3.13 and refresh dependencies This commit updates the project to officially support Python 3.13. Key changes include: - Added Python 3.13 classifier to `pyproject.toml`. - Updated Ruff linting target to `py313` in `pyproject.toml`. - Set Python version in the GitHub Actions `build.yaml` workflow to "3.13". - Updated the test matrix in `test.yaml` to use stable Python "3.13" instead of "3.13-dev". - Updated development dependencies to their latest versions: - Cython (3.0.10 -> 3.1.1) - Pytest (8.2.1 -> 8.3.5) - Ruff (0.4.6 -> 0.11.10) - Setuptools (70.0.0 -> 80.8.0) - Ensured `chardet` is at its latest version (5.2.0). - Updated pinned Cython version in `cibuildwheel` configuration in `pyproject.toml`. These changes ensure the project is tested and built with the latest Python version and utilizes up-to-date development tooling. --- .github/workflows/build.yaml | 2 +- .github/workflows/test.yml | 2 +- pyproject.toml | 15 ++++++++------- requirements-dev.txt | 8 ++++---- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9ec0c69..7ea7e09 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -26,7 +26,7 @@ jobs: - uses: actions/setup-python@v5 with: - python-version: "3.x" + python-version: "3.13" cache: "pip" - name: Install dependencies diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 11b26bd..e0f8893 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: os: ["ubuntu-latest", "windows-latest", "macos-latest"] - py: ["3.13-dev", "3.12", "3.11", "3.10", "3.9"] + py: ["3.13", "3.12", "3.11", "3.10", "3.9"] runs-on: ${{ matrix.os }} name: Run test with Python ${{ matrix.py }} on ${{ matrix.os }} diff --git a/pyproject.toml b/pyproject.toml index adbd622..1065982 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,6 +17,7 @@ classifiers = [ 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', ] requires-python = ">= 3.9" dynamic = ["version"] @@ -33,17 +34,17 @@ version = { attr = "cchardet.__version__" } [tool.rye] dev-dependencies = [ - "chardet>=5.2.0", - "cython>=3.0.10", - "setuptools>=70.0.0", - "pytest>=8.2.1", - "ruff>=0.4.6", + "chardet==5.2.0", + "cython==3.1.1", + "setuptools==80.8.0", + "pytest==8.3.5", + "ruff==0.11.10", ] [tool.ruff] exclude = ["src/ext"] line-length = 100 -target-version = "py39" +target-version = "py313" lint.select = ["E", "F", "I", "N"] format.quote-style = "double" format.indent-style = "space" @@ -52,7 +53,7 @@ format.indent-style = "space" skip = "pp* cp36-* cp37-* cp38-*" archs = "auto" before-build = [ - "pip install cython==3.0.10", + "pip install cython==3.1.1", "cython {project}/src/cchardet/_cchardet.pyx", ] diff --git a/requirements-dev.txt b/requirements-dev.txt index 896c27f..a5f4430 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,5 +1,5 @@ chardet==5.2.0 -cython==3.0.10 -pytest==8.2.1 -ruff==0.4.6 -setuptools==70.0.0 +cython==3.1.1 +pytest==8.3.5 +ruff==0.11.10 +setuptools==80.8.0