From e5e28acec6c59f4b0dba8f25bb0af7b0466b285f Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Tue, 24 Feb 2026 08:40:51 +0100 Subject: [PATCH 1/3] PEP 735 compliance: dependency groups Only for development and build time dependencies, not run time depdendencies that are meant to be published with the package. --- .devcontainer/post_create.sh | 2 +- .github/workflows/tests.yml | 4 ++-- Makefile | 4 ++-- README.rst | 2 +- pyproject.toml | 14 ++++++++------ 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.devcontainer/post_create.sh b/.devcontainer/post_create.sh index d85a821be8..df73095285 100644 --- a/.devcontainer/post_create.sh +++ b/.devcontainer/post_create.sh @@ -9,6 +9,6 @@ pip install --upgrade \ setuptools \ setuptools_scm \ wheel -pip install -e '.[dev]' +pip install -e . --group dev pre-commit install --install-hooks diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 891c15f1de..53f19a294a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -55,7 +55,7 @@ jobs: python --version # just to check python -m pip install --upgrade pip wheel # upgrade to latest pip find 3.5 wheels; wheel to avoid errors pip install --upgrade "setuptools!=47.2.0" docutils setuptools_scm[toml] twine - pip install -e ".[dev]" # install the codespell dev packages + pip install -e . --group dev # install the codespell dev packages - run: pip install aspell-python-py3 if: startsWith(matrix.os, 'ubuntu') - run: codespell --help @@ -87,6 +87,6 @@ jobs: - name: Install general dependencies run: pip install --upgrade pip wheel # upgrade to latest pip find 3.5 wheels; wheel to avoid errors - name: Install codespell dependencies - run: pip install -e ".[dev]" + run: pip install -e . --group dev - uses: codespell-project/sort-problem-matcher@v1 - run: make check-dictionaries diff --git a/Makefile b/Makefile index fdbad92948..d281d73921 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ check-dictionaries: sort-dictionaries @if command -v pytest > /dev/null; then \ pytest codespell_lib/tests/test_dictionary.py; \ else \ - echo "Test dependencies not present, install using 'pip install -e \".[dev]\"'"; \ + echo "Test dependencies not present, install using 'pip install -e . --group dev'"; \ exit 1; \ fi @@ -50,7 +50,7 @@ pytest: sort-dictionaries @if command -v pytest > /dev/null; then \ pytest codespell_lib; \ else \ - echo "Test dependencies not present, install using 'pip install -e \".[dev]\"'"; \ + echo "Test dependencies not present, install using 'pip install -e . --group dev'"; \ exit 1; \ fi diff --git a/README.rst b/README.rst index a9562e8f2b..54c230fa1a 100644 --- a/README.rst +++ b/README.rst @@ -306,7 +306,7 @@ You can install required dependencies for development by running the following w .. code-block:: sh - pip install -e ".[dev]" + pip install -e . --group dev To run tests against the codebase run: diff --git a/pyproject.toml b/pyproject.toml index da0d7b3291..3f39623776 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,6 +30,14 @@ dependencies = [] dynamic = ["version"] [project.optional-dependencies] +hard-encoding-detection = [ + "chardet" +] +toml = [ + "tomli; python_version < '3.11'" +] + +[dependency-groups] dev = [ "build", "chardet", @@ -42,12 +50,6 @@ dev = [ "tomli", "twine" ] -hard-encoding-detection = [ - "chardet" -] -toml = [ - "tomli; python_version < '3.11'" -] types = [ "chardet>=5.1.0", "mypy", From 9394fc4b40ef1d743b31479e2ea2341e6e6a316d Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Tue, 24 Feb 2026 08:42:14 +0100 Subject: [PATCH 2/3] No need to explicitly avoid setuptools 47.2.0 It's an old version from 2020, the current version is 82.0.0. Besides we require setuptools > 77. --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 53f19a294a..acdea2cc81 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -54,7 +54,7 @@ jobs: run: | python --version # just to check python -m pip install --upgrade pip wheel # upgrade to latest pip find 3.5 wheels; wheel to avoid errors - pip install --upgrade "setuptools!=47.2.0" docutils setuptools_scm[toml] twine + pip install --upgrade setuptools docutils setuptools_scm[toml] twine pip install -e . --group dev # install the codespell dev packages - run: pip install aspell-python-py3 if: startsWith(matrix.os, 'ubuntu') From aa5a71816f0385a14c6059ed1fed409bbf77523a Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Tue, 24 Feb 2026 08:50:39 +0100 Subject: [PATCH 3/3] What was this wheels/wheel thing? Besides there's no version 3.5, the current version is 0.46.3. --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index acdea2cc81..a3edc6cd22 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -53,7 +53,7 @@ jobs: shell: bash -e {0} run: | python --version # just to check - python -m pip install --upgrade pip wheel # upgrade to latest pip find 3.5 wheels; wheel to avoid errors + python -m pip install --upgrade pip wheel pip install --upgrade setuptools docutils setuptools_scm[toml] twine pip install -e . --group dev # install the codespell dev packages - run: pip install aspell-python-py3 @@ -85,7 +85,7 @@ jobs: with: persist-credentials: false - name: Install general dependencies - run: pip install --upgrade pip wheel # upgrade to latest pip find 3.5 wheels; wheel to avoid errors + run: pip install --upgrade pip wheel - name: Install codespell dependencies run: pip install -e . --group dev - uses: codespell-project/sort-problem-matcher@v1