Skip to content

Incorrect upper bound prevents use of Django 4.1.1+ #1202

@adamchainz

Description

@adamchainz

Describe the bug

setup.cfg constrains the maximum Django version:

install_requires =
	django >= 2.2, <= 4.1

With this upper bound it disallows today's Django 4.1.1 bugfix release, and later security releases to come.

Upper bound version constraints are highly discouraged by many - see this blog post. They introduce unnecessary slowness and blocking into the softwawre ecosystem.

I recommend dropping the upper bound entirely.

To Reproduce

$ pip install django==4.1.1 django-oauth-toolkit==2.1.0
...
ERROR: Cannot install django-oauth-toolkit==2.1.0 and django==4.1.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested django==4.1.1
    django-oauth-toolkit 2.1.0 depends on django<=4.1 and >=2.2

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

Expected behavior

Allow upgrades of Django

Version
2.1.0

  • I have tested with the latest published release and it's still a problem.
  • I have tested with the master branch and it's still a problem.

Additional context
n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions