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

Relax version constraints? #6

Open
tony opened this issue Nov 10, 2024 · 0 comments
Open

Relax version constraints? #6

tony opened this issue Nov 10, 2024 · 0 comments

Comments

@tony
Copy link

tony commented Nov 10, 2024

  • graphene_django_sentry version: 0.4.0
  • Python version: 3.12
  • Operating System: Linux

Description

Installing via uv (repo, docs, PyPI) ran into the sentry-sdk constraint in setup.py: https://github.com/phalt/graphene-django-sentry/blob/49e05345d84605ddad7cec36da7410a3100658ec/setup.py#L13

  × No solution found when resolving dependencies:
  ╰─▶ Because graphene-sentry==0.4.0 depends on sentry-sdk>=0.5.2,<=0.10.1 and only graphene-sentry==0.4.0 is available, we can conclude that all versions of graphene-sentry depend on sentry-sdk>=0.5.2,<=0.10.1.
      And because your project depends on graphene-sentry and sentry-sdk>=2.14.0,<2.15, we can conclude that your project's requirements are unsatisfiable.

What I Did

uv 0.5.1 with these dependencies:

[project]
dependencies = [
  "python >=3.12,<4",
  "graphene-sentry >=0.4.0,<0.5",
  "sentry-sdk >=2.14.0,<2.15",
]

Suggested solution

To improve compatibility with other packages, it would be helpful to remove the strict version cap on sentry-sdk in setup.py. Instead of pinning it to an exact version range, consider specifying only a minimum version if certain APIs are required, while leaving the maximum version unbounded. This approach maximizes downstream compatibility and reduces the likelihood of dependency conflicts for users.

Currently, the setup.py specifies:

requirements = [
    'graphene_django>=2.2.0<=2.4.0',
    'graphene-file-upload==1.2.2',
    'sentry-sdk>=0.5.2<=0.10.1',
]

To make it more flexible, this could be changed to:

requirements = [
    'graphene_django',
    'graphene-file-upload',
    'sentry-sdk',
]

Or, if a minimum version is necessary:

requirements = [
    'graphene_django>=2.2.0',
    'graphene-file-upload>=1.2.2',
    'sentry-sdk>=0.5.2',
]

Removing or relaxing version caps for both graphene_django and sentry-sdk could prevent dependency resolution issues with other projects that depend on newer versions, as some package managers will block users from compatible releases due to strict constraints.

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

No branches or pull requests

1 participant