Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declare Django versions in install_requires #7063

Merged
merged 2 commits into from
Dec 12, 2019

Conversation

adamchainz
Copy link
Contributor

@adamchainz adamchainz commented Nov 21, 2019

Description

Pip's dependency resolver (used in pipenv, pip-compile, poetry, etc.) can use this to infer whether there's a verison collision in what it's being asked to install or not.

Pip's dependency resolver (used in pipenv, pip-compile, poetry, etc.) can use this to infer whether there's a verison collision in what it's being asked to install or not.
@tomchristie
Copy link
Member

We've avoided including a hard django package dependency in the past. I expect we have users who're doing things like running against a custom django codebase, that's just installed locally, rather than using a PyPI version.

I like the change for most users, but I think it might bite us.

@adamchainz
Copy link
Contributor Author

I've not had a complaint in django-cors-headers, at least since I added the requirement in March.

The (small) problem I ran into was the Scout test suite which runs from Django 1.8 to 3.0 (😱) was always pulling the latest DRF because there are no restrictions, and I had to go read the changelog to add the correct version pins for each environment.

@rpkilby
Copy link
Member

rpkilby commented Nov 21, 2019

I'd be -1 on enforcing a maximum supported version, but otherwise think this makes sense.

I expect we have users who're doing things like running against a custom django codebase, that's just installed locally, rather than using a PyPI version.

So long as their package is also named Django, this shouldn't matter, right?

@adamchainz
Copy link
Contributor Author

I'd be -1 on enforcing a maximum supported version, but otherwise think this makes sense.

Fair.

@rpkilby rpkilby added this to the 3.11 Release milestone Dec 11, 2019
@tomchristie
Copy link
Member

Let's do it. Thanks!

@tomchristie tomchristie merged commit 7c54596 into encode:master Dec 12, 2019
pchiquet pushed a commit to pchiquet/django-rest-framework that referenced this pull request Nov 17, 2020
* Declare Django versions in install_requires

Pip's dependency resolver (used in pipenv, pip-compile, poetry, etc.) can use this to infer whether there's a verison collision in what it's being asked to install or not.

* No max
sigvef pushed a commit to sigvef/django-rest-framework that referenced this pull request Dec 3, 2022
* Declare Django versions in install_requires

Pip's dependency resolver (used in pipenv, pip-compile, poetry, etc.) can use this to infer whether there's a verison collision in what it's being asked to install or not.

* No max
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants