-
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
solver: fix special case where a direct origin dependency without extras ... #5770
solver: fix special case where a direct origin dependency without extras ... #5770
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather hold off merging this until we bump the core version -- could you rebase this onto poetry-core main in the mean time, and then once we bump core we can switch back?
# TODO: remove https://github.com/python-poetry/poetry-core/pull/375 | ||
dep._extras = frozenset(term.dependency.features) | ||
positive_with_features = Term(dep, is_positive=True) | ||
self._positive[term.dependency.complete_name] = positive_with_features |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't look like a method that I would expect to be making updates to self
: is there some other moment at which this should have happened?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, you're right. I am not completely satisfied with the solution myself. Will take another look at it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved it to _register
. Looks better, doesn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this looks a much better place for it - thanks!
suggestion: we only need to look for old_positive_without_features
if the assignment dependency has features: else - which would usually be the case - we're just looking up the same thing twice. So
"""
name = assignment.dependency.complete_name
old_positive = self._positive.get(name)
- if old_positive is None:
+ if old_positive is None and assignment.dependency.features:
old_positive_without_features = self._positive.get(
assignment.dependency.name
)
?
6b13028
to
b3e637e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you might have taken a wrong turn -- please elaborate if you think these issues are somehow related (and use a regular comment instead of a review comment, please). |
…ras is requested by the project and the same dependency with extras is requested by another dependency
b3e637e
to
2ca6e08
Compare
Co-authored-by: Randy Döring <[email protected]>
Co-authored-by: Randy Döring <[email protected]>
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
… is requested by the project and the same dependency with extras is requested by another dependency
Pull Request Check List
Resolves: #5311