Closed jhkennedy closed 4 months ago
@jhkennedy, how do you feel about the carat ^
still being used for the specified version of Python in pyproject.toml
?
@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.
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 asncompare
unless a new version ofncompre
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 breakncompare
(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