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

Pyproject.toml version resolution does not work as expected with "^..." notation #182

Open
davidraker opened this issue Oct 10, 2023 · 1 comment

Comments

@davidraker
Copy link
Contributor

Poetry's version checking documentation has the following:
image
We are frequently using the caret notation to mean ">=x.y.z,<x+1.0.0". This matches the behavior circled in blue. For some version numbers however (maybe ones that start with major version == 0, but this isn't clear) the behavior matches the red circled example --- ">=x.y.z,<x.y+1.0".

Because the actual expected behavior is unclear, we should change dependencies from "^x.y.z" to ">=x.y.z,<x+1.0.0" to more reliably get the same behavior.

To Reproduce
Until a recent pull request, the pyproject.toml for volttron-platform-driver had:
volttron-lib-base-driver = "^0.1.1a3"
The pyproject.toml for volttron-lib-fake-driver had:
volttron-lib-base-driver = "0.2.1rc2"

Because "^0.1.1a3" was interpreted as: ">=0.1.1a3,<0.2.0", "0.2.1rc2" was too high. As a result, you could install volttron-lib-fake-driver first and then volttron-platform-driver successfully, but installing volttron-platform-driver first and then volttron-lib-fake-driver would fail with a dependency resolution error from pip.

Expected behavior
It should not matter which order two related packages are installed in.

Dependency requirements which are intended to include some version x to the next major version x+1 number should all be marked as ">=x.y.z,<x+1.0.0" for all modular packages.

@schandrika
Copy link
Contributor

Couldn't agree more. I think the long format is more to type but it is explicit and clear for the reader. We should do this change for core and core agent and lib packages

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

2 participants