Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7k
Removed requirements txt files from project.#9842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull request overview
This PR migrates dependency management from multiplerequirements/*.txt files to a centralizedpyproject.toml configuration, organizing dependencies into optional dependency groups (testing, optional, documentation, packaging). This modernizes the project's dependency management approach using PEP 621 standards.
Key Changes
- Migrated all dependencies from 5 requirements files into pyproject.toml optional-dependencies groups
- Updated tox.ini to use pyproject.toml optional dependencies instead of requirements files
- Updated installation instructions in documentation and CI workflows
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 20 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Added four optional-dependencies groups (documentation, optional, packaging, testing) with migrated dependencies |
| tox.ini | Updated all test environments to install dependencies using.[group] syntax instead of-r requirements/*.txt |
| docs/community/contributing.md | Updated installation instructions to use pyproject.toml optional dependencies |
| .github/workflows/main.yml | Updated CI workflow to install dependencies from pyproject.toml |
| requirements.txt | Removed root requirements file |
| requirements/requirements-*.txt | Removed all requirements directory files |
💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
tox.ini Outdated
| django<6.1 | ||
| -rrequirements/requirements-testing.txt | ||
| -rrequirements/requirements-optionals.txt | ||
| .[testing, optional] |
CopilotAIDec 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Inconsistent indentation: this line uses 7 spaces while line 25 uses 8 spaces. The indentation should be consistent across all deps entries. Use the same indentation as line 25.
| .[testing, optional] | |
| .[testing, optional] |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
tox.ini Outdated
| deps = | ||
| -rrequirements/requirements-testing.txt | ||
| -rrequirements/requirements-documentation.txt | ||
| .[testing, documentation] |
CopilotAIDec 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The syntax for specifying multiple optional dependencies should use a comma without space:.[testing,documentation] instead of.[testing, documentation]. The space after the comma may cause issues with some pip versions.
| .[testing,documentation] | |
| .[testing,documentation] |
tox.ini Outdated
CopilotAIDec 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Unnecessary trailing whitespace on this line. Remove the trailing spaces.
.github/workflows/main.yml Outdated
| -name:Install dependencies | ||
| run:pip install -r requirements/requirements-documentation.txt | ||
| run:pip install -e .[testing] |
CopilotAIDec 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Incorrect optional dependencies specified. This workflow step should install documentation dependencies to run mkdocs, not testing dependencies. Change topip install -e .[documentation] to match the original requirements-documentation.txt installation.
| run:pip install -e .[testing] | |
| run:pip install -e .[documentation] |
tox.ini Outdated
| djangomain: https://github.com/django/django/archive/main.tar.gz | ||
| -rrequirements/requirements-testing.txt | ||
| -rrequirements/requirements-optionals.txt | ||
| .[testing, optional] |
CopilotAIDec 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The syntax for specifying multiple optional dependencies should use a comma without space:.[testing,optional] instead of.[testing, optional]. The space after the comma may cause issues with some pip versions.
Uh oh!
There was an error while loading.Please reload this page.
0699662 to54a17b2Compare
browniebroke left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Usingoptional-dependencies for that is IMO the wrong way to solve this.
Uh oh!
There was an error while loading.Please reload this page.
c87972b to2f2086dCompare
browniebroke left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Nearly there
Uh oh!
There was an error while loading.Please reload this page.
2f2086d toe5a1a57Comparee5a1a57 to70b7949Compare70b7949 toc847be5Comparebrowniebroke commentedDec 8, 2025
I think there is still a mention here: django-rest-framework/docs/community/project-management.md Lines 84 to 88 inc847be5
This one should be removed:
And this one should be changed to pyproject.toml:
Also this:
|
* Removed references to `requirements.txt` in GitHub Actions workflows.* Updated `mkdocs-deploy.yml` and `main.yml` to install dependencies using `pyproject.toml`.* Cleaned up documentation to remove mentions of the `requirements` folder.
p-r-a-v-i-n commentedDec 9, 2025
Thanks for catching this. |
browniebroke left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks for taking this on, looks good to me
PS: will leave this open for a few days to give time to other maintainers to take a look
Project's URLs should be in the [project] table
browniebroke commentedDec 17, 2025
Looking atthe logs more closely, I think something isn't right: The |
p-r-a-v-i-n commentedDec 17, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
may be bcs of this step |
browniebroke commentedDec 17, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Right so tox does:
So I initially assumed step 3 overrides the version from step 1, but it's actually overridden in step 2 (by running So one of our testing or optional dependency is requesting a Django version newer than 4.2, causing it to upgrade. It's a bit annoying that the incompatibility is not flagged more loudly 😞 |
Uh oh!
There was an error while loading.Please reload this page.
we have migrated to pyproject.toml so now I think it is safe to remove requirements folder and requirements.txt file bcs pyproject.toml could take care of those installations. I have shifted those all dependencies in pyproject.toml.