nasa / ncompare

Compare the structure of two netCDF files at the command line
https://ncompare.readthedocs.io
Apache License 2.0
27 stars 9 forks source link

Conders removing upper bounds from dependencies #231

Closed jhkennedy closed 4 months ago

jhkennedy commented 5 months ago

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 commented 4 months ago

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

jhkennedy commented 4 months ago

@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.