Skip to content

[BUG] Please allow installing this package alongside Django 6.x and Python 3.12 #161

Description

@cb109

Describe the bug

  • I have a project that I want to upgrade to Django 6 while still using Python 3.12, which is an officially supported combination.
  • Trying to install the latest django-guid into that environment/venv (with Django 6 already installed) fails, as it cannot resolve a supported version.

To Reproduce

  • Install Python 3.12, e.g. via uv
  • Init a new project: mkdir testdir; cd testdir; uv init --python=3.12
  • Add Django 6: uv add django==6
  • Add django-guid 3.6.1: uv add django-guid==3.6.1
  • Should fail like:
uv add django-guid==3.6.1
  × No solution found when resolving dependencies for split (markers: python_full_version >= '3.10' and python_full_version < '3.13'):
  ╰─▶ Because django-guid==3.6.1 depends on django{python_full_version < '3.13'}>=4.2,<6.0 and your project depends on django==6, we can conclude that django-guid==3.6.1 and your project
      are incompatible.
      And because your project depends on django-guid==3.6.1, we can conclude that your project's requirements are unsatisfiable.
  help: If you want to add the package regardless of the failed resolution, provide the `--frozen` flag to skip locking and syncing.

The whole thing solves fine when using Python 3.13+. It should support 3.12 as well, though.


I believe the problem is a wrong compatibility limitation from: https://github.com/snok/django-guid/pull/158/changes#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R55

Removing the entire django limitation block allows the installation to succeed, as I have tested locally. The test matrix has the same issue, see PR below.

I personally think a library should not try to forcefully limit which combinations of other packages are "valid", especially not with a complex pyproject.toml syntax like this (I tried to modify it and it's hard!) making it very easy to get it wrong. Fixes require publishing new package releases and this slows things down unnecessarily. The assumption of what is compatible can also be wrong, even when following official recommendations to the book.

In my humble opinion, please let people install what they want, document supported versions instead (your test matrix is basically that) and refer to that or the official Django releases that state valid combinations, I believe that is the better way for everyone and also less maintenance work for the library authors.

This PR is to illustrate my point: #160

If you could consider allowing the combination of Python 3.12 and Django 6 somehow through any change you prefer, I would be grateful.

Thanks for your time,
Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions