-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
What's the expected behavior of Term.satisfies()
when one term has optional deps and the other doesn't?
#5469
Comments
I'm not sure but my first thought is: I would not say that
Maybe, but raising an error would probably break something because the callers of I noticed that the comparison in
Considering this information, I would expect that the current behavior should be fine. What's your actual use case? (Maybe, there is another place for a fix.) |
Thanks for the great info! My use case: I have two requirements-1.txt and requirements-2.txt. 2's deps' version ranges must be narrower or equal to 1's. I have
Currently |
I don't know. Maybe, it should return |
I see. No worries. It seems the backwards incompat are not worth any benefits here. I'm able to workaround this by stripping out the brackets from the package string and creating a new Term with it. Feel free to close this issue and thanks for the help. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).Issue
I don't think poetry's
Term.satisfies()
currently supports optional dependencies correctly.I expect the last statement to return True because
tfx
is narrower thantfx[gcp]
sincetfx[gcp]
installs more packages thantfx
.b.satisfies(a)
return?satisfies()
should throw an error instead of returning False? If yes, would you be open to a PR?The text was updated successfully, but these errors were encountered: