3 ms·
Why not depend on package1>=0.4.0 rather than specifying an explicit version? Then uv will upgrade it to the latest version. pyproject.toml is meant to encode
by Eridrus 1y ago
Why not depend on package1>=0.4.0 rather than specifying an explicit version? Then uv will upgrade it to the latest version.
pyproject.toml is meant to encode the actual constraints for when your app will function correctly, not hardcode exact versions, which is what the lockfile is for.
- IshKebab 1y agoBecause then you don't get to use the new features in 0.5.0. Though I do think with Python in particular it's probably better to manually upgrade when needed, rather than opportunistically require the latest, because Python can't handle two versions of the same package in one venv.
- lucky_cloud 1y agoThen make your dependency package1>=0.4 https://packaging.python.org/en/latest/specifications/dependency-specifiers/#dependency-specifiers https://packaging.python.org/en/latest/specifications/depend...
- IshKebab 1y ago> then you don't get to use the new features in 0.5.0.
- lucky_cloud 1y agoYes you do package1>=0.4.0 means 0.4.0, 0.4.1, 0.4.100, 0.4.100.1 and so on package1>=0.4 includes the above plus 0.5.0, 0.5.1, 0.6.0, 0.100.0 and so on