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

Support '--unstable-feature' in requirements files #8293

Closed

Conversation

rouge8
Copy link
Contributor

@rouge8 rouge8 commented May 22, 2020

This patch adds support for --unstable-feature in requirements files so that a project that wants all contributers using the same pip features can specify it in the requirements file. For example, to ensure a requirements file uses the new resolver:

--unstable-feature=resolver
boto3
boto3==1.13.13

This patch adds support for `--unstable-feature` in requirements files
so that a project that wants all contributers using the same pip
features can specify it in the requirements file. For example, to ensure
a requirements file uses the new resolver:

```
--unstable-feature=resolver
boto3
boto3==1.13.13
```
@pfmoore
Copy link
Member

pfmoore commented May 22, 2020

First of all, thanks for testing the new resolver, and for helping out by submitting this PR!

However, I'm not sure I consider it a good idea to support this. It feels to me like it's promoting unstable features (note: the flag is intended as a general mechanism, not just for the resolver) to something that should be "switched on" and then forgotten about, rather than something that should only be used deliberately, for testing the new feature. We already have "global" mechanisms for enabling the new resolver (environment variables and the config file), for cases like automation, if needed.

Also, those requirements files would be broken when the new resolver gets rolled out, and stops being "unstable" (and there may even be a stage where the new resolver is stable, but off by default, at which point we'd have a different flag to be set...)

@pradyunsg @uranusjr what are your views?

@rouge8
Copy link
Contributor Author

rouge8 commented May 22, 2020

It feels to me like it's promoting unstable features (note: the flag is intended as a general mechanism, not just for the resolver) to something that should be "switched on" and then forgotten about

Yeah, I guess that's my goal with this PR. We're currently stuck on pip 18.1 because of #5780, which is fixed in the new resolver. Environment variables are fine for CI and automation and etc, but putting it in requirements.txt would let us upgrade to 20.2 when it comes out and everybody would keep using the pip install -r requirements.txt workflow they've used forever. Maybe that's too niche though!

@uranusjr
Copy link
Member

The problem I have is that the --unstable-feature flag itself is also unstable. Once we stablise the new resolver, all requirements files specifying --unstable-feature=resolver will break (because resolver is no longer a valid value). I’m -0 on adding this since the consequence feels wrong to me.

@pfmoore
Copy link
Member

pfmoore commented May 22, 2020

Apart from niche, I'd be strongly against anyone running the new resolver in a production system at this point.

Having read the background, I get why you'd want to switch over as soon as possible. I can certainly see a valid reason for supporting the "official" use-new-resolver switch in a requirements file, but I think we should hold off on doing it for --unstable-feature.

@pradyunsg
Copy link
Member

I'm a strong -1 on this.

Thanks @rouge8! While I understand why you'd like this, it's likely that we'd add something like a --resolver=legacy/new flag for use cases like yours.

The --unstable-feature flag is meant for more general use within pip, for more than just the resolver rollout, and I'd prefer we avoid making it accessible from requirements file.

@rouge8 rouge8 closed this May 31, 2020
rouge8 added a commit to rouge8/pip that referenced this pull request Jul 18, 2020
This patch adds support for `--use-feature` in requirements files
so that a project that wants all contributers using the same pip
features can specify it in the requirements file. For example, to ensure
a requirements file uses the new resolver:

```
--use-feature=2020-resolver
boto3
boto3==1.13.13
```

This is a new version of pypa#8293.
rouge8 added a commit to rouge8/pip that referenced this pull request Jul 18, 2020
This patch adds support for `--use-feature` in requirements files
so that a project that wants all contributors using the same pip
features can specify it in the requirements file. For example, to ensure
a requirements file uses the new resolver:

```
--use-feature=2020-resolver
boto3
boto3==1.13.13
```

This is a new version of pypa#8293.
rouge8 added a commit to rouge8/pip that referenced this pull request Jul 18, 2020
This patch adds support for `--use-feature` in requirements files
so that a project that wants all contributors using the same pip
features can specify it in the requirements file. For example, to ensure
a requirements file uses the new resolver:

```
--use-feature=2020-resolver
boto3
boto3==1.13.13
```

This is a new version of pypa#8293.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants