-
Notifications
You must be signed in to change notification settings - Fork 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
Add --unstable-feature=resolver #7845
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.
LGTM
Mypy is so hard to please 😞 |
Harder than I am, apparently 😃 |
3a8bb66
to
3730aa0
Compare
This introduces a new general option --unstable-feature that can be used to opt into "preview" features in pip not enabled by default. Currently the only available feature is "resolver". A stub resolver interface (which would fail on invocation) is provided to respond to the flag. The --unstable-feature option is hidden from --help since the resolver does not yet work. This suppression should be removed when we release the resolver for general/public testing.
Note: This now has merge conflicts with #7843. That's not a problem (they are shallow conflicts) but IMO we should get some of these enabling PRs merged ASAP, so that we can build on them rather than continually revising WIP PRs. |
I'm going to merge this and then rebase and merge #7843 We can iterate on either of them later, so this will keep things from getting blocked. |
Sounds reasonable to me! |
] | ||
|
||
|
||
class BaseResolver(object): |
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.
nit: add_metaclass using six and use abc.ABCMeta?
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.
Honestly I dislike abc.ABCMeta
in general since it adds unnecessary runtime overhead. But I’d be happy to fix this if there is a strong project preference to use 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.
I'm happy to leave this as it is. I don't particularly see much value in ABCMeta
.
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.
It was nit anyway, either works for me too!
@uranusjr is this syntax final? Is there a possibility of it being changed? |
@ei8fdb It is unless you propose a change! |
@uranusjr I'd like to try. I was just wondering if its possible to change. Are there any restrictions on the type of syntax I can propose? |
Not many. The usual restrictions of a flag apply (must start with a |
This introduces a new general option
--unstable-feature
that can be used to opt into “preview” features in pip not enabled by default. Currently the only available feature isresolver
.Based on #5727, but with a more bare-bone implementation since we have only one user (the resolver) at the moment. Refactoring can always come later :p
The
--unstable-feature
option is hidden from--help
since the resolver does not yet work. This suppression should be removed when we release the resolver for general/public testing. I am also intentionally not providing a news fragment for the same reason—that can be added when we lift the help message suppression.A stub resolver interface (which would fail on invocation) is provided to respond to the flag. Like #7843, this can be merged standalone, and implementation can be added after other PRs are added to flesh it out.
Fix #7603.