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

Conders removing upper bounds from dependencies #231

Closed
jhkennedy opened this issue Jun 6, 2024 · 2 comments · Fixed by #236
Closed

Conders removing upper bounds from dependencies #231

jhkennedy opened this issue Jun 6, 2024 · 2 comments · Fixed by #236

Comments

@jhkennedy
Copy link

jhkennedy commented Jun 6, 2024

By default, Poetry uses caret (^) constraints for dependencies, which introduces upper bounds on dependencies.

For user tools and libraries (things installed into user-controlled environments), it's a good idea to remove upper bounds because Python has a flat-dependency tree, and strict version requirements lead to unnecessary conflicts. E.g., when a new version of a ncompre dependency is released, users cannot install it into the same environment as ncompare unless a new version of ncompre is also released.

Importantly, for user tools and libraries, upper bounds are guaranteed to make ncompare uninstallable (break) in user environments over time without regular releases that move the upper bounds. New versions of dependencies, however, are not guaranteed to break ncompare (even for major releases) as you may not be using the parts of the API that have changed. So upper bounds have a tendency to increase the maintenance of Python packages and decrease their usability.

The poetry-relax Poetry plugin helps ease this process and has a really good reference section on the discussion around this that'd be worth reading:
https://github.com/zanieb/poetry-relax?tab=readme-ov-file#references

@danielfromearth
Copy link
Collaborator

@jhkennedy, how do you feel about the carat ^ still being used for the specified version of Python in pyproject.toml?

@jhkennedy
Copy link
Author

@danielfromearth Poetry currently requires an upper bound on Python, so it's definitely one to leave. Python 4 is unlikely to ever happen after the 2->3 shenanigans, and with that experience, I think 4 would fit needly in the "expected incompatibility" category anyway.

@danielfromearth danielfromearth linked a pull request Jul 5, 2024 that will close this issue
4 tasks
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 a pull request may close this issue.

2 participants