Skip to content

Move setuptools to testing requirements - #9818

Merged
browniebroke merged 1 commit into
encode:mainfrom
ulgens:move-setuptools-testing-requirements
Nov 4, 2025
Merged

browniebroke merged 1 commit into
encode:mainfrom
ulgens:move-setuptools-testing-requirements

Conversation

@ulgens

@ulgens ulgens commented Nov 2, 2025 •

Copy link
Copy Markdown
Contributor

It was defined in testenv.deps for tox, making it a literal testing requirement. The version requirement is copied from pyproject.toml.

This change helps with the local testing, in a similar way to #9817 does. Because setuptools dependency was only defined for tox, the recommended testing method in https://www.django-rest-framework.org/community/contributing/#testing

# Setup the virtual environment
python3 -m venv env
source env/bin/activate
pip install -e .
pip install -r requirements.txt

# Run the tests
./runtests.py

were skipping coreapi related tests.

@ulgens
ulgens force-pushed the move-setuptools-testing-requirements branch from f55e8b9 to 1a88ae5 Compare November 2, 2025 11:53
It was defined in `testenv.deps` for tox, making it a literal testing requirement. The version requirement is copied from `pyproject.toml`.
@ulgens
ulgens force-pushed the move-setuptools-testing-requirements branch from 1a88ae5 to c096d18 Compare November 2, 2025 12:02
@auvipy
auvipy requested a review from browniebroke November 2, 2025 12:12
@browniebroke

Copy link
Copy Markdown
Collaborator

Do we need it at all? I would have thought we could remove it entirely but maybe it's needed by one of our deps?

@browniebroke

Copy link
Copy Markdown
Collaborator

Tests seems to pass without it, so I'm pretty sure we no longer meed it (I'm assuming since #9056). It's also added to GitHub actions here:

run: python -m pip install --upgrade pip setuptools virtualenv wheel

Can we remove it from all these places, please?

@ulgens

ulgens commented Nov 4, 2025

Copy link
Copy Markdown
Contributor Author

Tests seems to pass without it

It causes 61 tests to skip tho. I'll revisit this when I have the time, probably on the weekend.

@browniebroke

Copy link
Copy Markdown
Collaborator

it causes 61 tests to skip tho

Oh I missed that. I thought they were skipped purely because of the other missing dependency.

@browniebroke browniebroke left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, looks good to me

@browniebroke
browniebroke merged commit 2465f9b into encode:main Nov 4, 2025
@ulgens
ulgens deleted the move-setuptools-testing-requirements branch November 5, 2025 10:07
browniebroke added a commit that referenced this pull request Feb 7, 2026
Was added to testing requirements in
#9818

But that was lost in:
#9842

Moving to optional dep group as it's only needed for coreapi
browniebroke added a commit that referenced this pull request Feb 7, 2026
* Bump the optional group with 4 updates

Updates the requirements on [coreapi](https://github.com/core-api/python-client), [django-guardian](https://github.com/django-guardian/django-guardian), [pygments](https://github.com/pygments/pygments) and [pyyaml](https://github.com/yaml/pyyaml) to permit the latest version.

Updates `coreapi` from 2.3.1 to 2.3.3
- [Commits](core-api/python-client@2.3.1...2.3.3)

Updates `django-guardian` to 3.2.0
- [Release notes](https://github.com/django-guardian/django-guardian/releases)
- [Commits](django-guardian/django-guardian@v2.4.0...3.2.0)

Updates `pygments` to 2.19.2
- [Release notes](https://github.com/pygments/pygments/releases)
- [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES)
- [Commits](pygments/pygments@2.17.0...2.19.2)

Updates `pyyaml` to 6.0.3
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/6.0.3/CHANGES)
- [Commits](yaml/pyyaml@5.3.1...6.0.3)

---
updated-dependencies:
- dependency-name: coreapi
  dependency-version: 2.3.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: optional
- dependency-name: django-guardian
  dependency-version: 3.2.0
  dependency-type: direct:development
  dependency-group: optional
- dependency-name: pygments
  dependency-version: 2.19.2
  dependency-type: direct:development
  dependency-group: optional
- dependency-name: pyyaml
  dependency-version: 6.0.3
  dependency-type: direct:development
  dependency-group: optional
...

Signed-off-by: dependabot[bot] <[email protected]>

* Add back setuptools

Was added to testing requirements in
#9818

But that was lost in:
#9842

Moving to optional dep group as it's only needed for coreapi

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Asif Saif Uddin {"Auvi":"অভি"} <[email protected]>
Co-authored-by: Bruno Alla <[email protected]>
HosseinSayyedMousavi pushed a commit to HosseinSayyedMousavi/django-rest-framework that referenced this pull request Oct 8, 2026
HosseinSayyedMousavi pushed a commit to HosseinSayyedMousavi/django-rest-framework that referenced this pull request Oct 8, 2026
* Bump the optional group with 4 updates

Updates the requirements on [coreapi](https://github.com/core-api/python-client), [django-guardian](https://github.com/django-guardian/django-guardian), [pygments](https://github.com/pygments/pygments) and [pyyaml](https://github.com/yaml/pyyaml) to permit the latest version.

Updates `coreapi` from 2.3.1 to 2.3.3
- [Commits](core-api/python-client@2.3.1...2.3.3)

Updates `django-guardian` to 3.2.0
- [Release notes](https://github.com/django-guardian/django-guardian/releases)
- [Commits](django-guardian/django-guardian@v2.4.0...3.2.0)

Updates `pygments` to 2.19.2
- [Release notes](https://github.com/pygments/pygments/releases)
- [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES)
- [Commits](pygments/pygments@2.17.0...2.19.2)

Updates `pyyaml` to 6.0.3
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/6.0.3/CHANGES)
- [Commits](yaml/pyyaml@5.3.1...6.0.3)

---
updated-dependencies:
- dependency-name: coreapi
  dependency-version: 2.3.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: optional
- dependency-name: django-guardian
  dependency-version: 3.2.0
  dependency-type: direct:development
  dependency-group: optional
- dependency-name: pygments
  dependency-version: 2.19.2
  dependency-type: direct:development
  dependency-group: optional
- dependency-name: pyyaml
  dependency-version: 6.0.3
  dependency-type: direct:development
  dependency-group: optional
...

Signed-off-by: dependabot[bot] <[email protected]>

* Add back setuptools

Was added to testing requirements in
encode#9818

But that was lost in:
encode#9842

Moving to optional dep group as it's only needed for coreapi

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Asif Saif Uddin {"Auvi":"অভি"} <[email protected]>
Co-authored-by: Bruno Alla <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants